René's URL Explorer Experiment


Title: Annotation only required for function within let block · Issue #3922 · purescript/purescript · GitHub

Open Graph Title: Annotation only required for function within let block · Issue #3922 · purescript/purescript

X Title: Annotation only required for function within let block · Issue #3922 · purescript/purescript

Description: Description Some code fails to compile with an un-annotated function in a let block; however, the same code will compile if the un-annotated function is moved outside of the let block. To Reproduce map3 :: forall a b c d. (a -> b -> c ->...

Open Graph Description: Description Some code fails to compile with an un-annotated function in a let block; however, the same code will compile if the un-annotated function is moved outside of the let block. To Reproduce...

X Description: Description Some code fails to compile with an un-annotated function in a let block; however, the same code will compile if the un-annotated function is moved outside of the let block. To Reproduce...

Opengraph URL: https://github.com/purescript/purescript/issues/3922

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Annotation only required for function within let block","articleBody":"## Description\r\n\r\nSome code fails to compile with an un-annotated function in a `let` block; however, the same code _will_ compile if the un-annotated function is moved outside of the let block.\r\n\r\n## To Reproduce\r\n\r\n```purs\r\nmap3 :: forall a b c d. (a -> b -> c -> d) -> Array a -> Array b -> Array c -> Array d\r\nmap3 fn a b c =\r\n  let\r\n    -- Annotation is required if toZip is defined in let block\r\n    --toZip :: forall x. Array x -> ZipList x\r\n    toZip = ZipList \u003c\u003c\u003c LazyList.fromFoldable\r\n    la = toZip a\r\n    lb = toZip b\r\n    lc = toZip c\r\n  in\r\n    Array.fromFoldable $ lift3 fn la lb lc\r\n\r\n-- It's fine to define without annotation globally\r\n--toZip = ZipList \u003c\u003c\u003c LazyList.fromFoldable\r\n```\r\nhttps://try.ps.ai/?gist=87e51987560be0007e7291699afcacd4\r\n\r\nThere is no compilation issue with an un-annotated `toZip` within a `let` block if it can be monomorphic throughout the `let` block. Thanks to @3ddyy for discovering this.\r\n```purs\r\n-- Annotation not required for ?monomorphic? toZip\r\nmap3mono :: forall a. (a -> a -> a -> a) -> Array a -> Array a -> Array a -> Array a\r\nmap3mono fn a b c =\r\n  let\r\n    toZip = ZipList \u003c\u003c\u003c LazyList.fromFoldable\r\n    la = toZip a\r\n    lb = toZip b\r\n    lc = toZip c\r\n  in\r\n    Array.fromFoldable $ lift3 fn la lb lc\r\n```\r\n\r\n## Expected behavior\r\n\r\nI expect the version with an un-annotated `toZip` in the `let` block to compile.\r\n\r\n## PureScript version\r\n\r\n0.13.8\r\n","author":{"url":"https://github.com/milesfrain","@type":"Person","name":"milesfrain"},"datePublished":"2020-08-27T19:18:15Z","url":"https://github.com/purescript/purescript/issues/3922"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d410470e-c1e2-868a-6a56-162799f17b87
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8450:3A0CC0:14D29E:1B6E85:6AFBB0D7
html-safe-nonce5771ff314dc291af6faaad3cb34ff451c0b0cf374f93f127069bf6fcf751981a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDUwOjNBMENDMDoxNEQyOUU6MUI2RTg1OjZBRkJCMEQ3IiwidmlzaXRvcl9pZCI6IjYzNDM1Nzk0NTAwMjEyMjg3NTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb282d2d34eb0a7a54fc4dfb8b6f8bdb9a3cab5a2177c784ae46303f4d5393226
hovercard-subject-tagissue:687480318
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/purescript/purescript/3922/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1d00f9369d95311768f5081f43586d1faf07374521e9c8f0469a28b77fc74318/purescript/purescript/issues/3922
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1d00f9369d95311768f5081f43586d1faf07374521e9c8f0469a28b77fc74318/purescript/purescript/issues/3922
og:image:altDescription Some code fails to compile with an un-annotated function in a let block; however, the same code will compile if the un-annotated function is moved outside of the let block. To Reproduce...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemilesfrain
hostnamegithub.com
expected-hostnamegithub.com
Nonee25fbd830d3e6ad0e8935c105cf4fdc70c593dffcd27bb45b790ae4fece5ea55
turbo-cache-controlno-preview
go-importgithub.com/purescript/purescript git https://github.com/purescript/purescript.git
octolytics-dimension-user_id6556677
octolytics-dimension-user_loginpurescript
octolytics-dimension-repository_id13206906
octolytics-dimension-repository_nwopurescript/purescript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id13206906
octolytics-dimension-repository_network_root_nwopurescript/purescript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release08c8f17f9d27054a108b8b6254e405de0151f660
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/purescript/purescript/issues/3922#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript%2Fpurescript%2Fissues%2F3922
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript%2Fpurescript%2Fissues%2F3922
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=purescript%2Fpurescript
Reloadhttps://github.com/purescript/purescript/issues/3922
Reloadhttps://github.com/purescript/purescript/issues/3922
Reloadhttps://github.com/purescript/purescript/issues/3922
purescripthttps://github.com/purescript
purescripthttps://github.com/purescript/purescript
Codehttps://github.com/purescript/purescript
Issues280 (280)https://github.com/purescript/purescript/issues
Pull requests27 (27)https://github.com/purescript/purescript/pulls
Actionshttps://github.com/purescript/purescript/actions
Projectshttps://github.com/purescript/purescript/projects
Wikihttps://github.com/purescript/purescript/wiki
Security and qualityhttps://github.com/purescript/purescript/security
Insightshttps://github.com/purescript/purescript/pulse
https://github.com/purescript/purescript
New issuehttps://github.com/login?return_to=https://github.com/purescript/purescript/issues/3922
New issuehttps://github.com/login?return_to=https://github.com/purescript/purescript/issues/3922
Annotation only required for function within let blockhttps://github.com/purescript/purescript/issues/3922#top
type: bughttps://github.com/purescript/purescript/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/milesfrain
milesfrainhttps://github.com/milesfrain
on Aug 27, 2020https://github.com/purescript/purescript/issues/3922#issue-687480318
https://try.ps.ai/?gist=87e51987560be0007e7291699afcacd4https://try.ps.ai/?gist=87e51987560be0007e7291699afcacd4
milesfrainhttps://github.com/milesfrain
type: bughttps://github.com/purescript/purescript/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
on Aug 27, 2020https://github.com/purescript/purescript/issues/3922#event-3701064114
milesfrainhttps://github.com/milesfrain
on Aug 27, 2020https://github.com/purescript/purescript/issues/3922#event-3701066502
https://github.com/natefaubion
natefaubionhttps://github.com/natefaubion
on Aug 27, 2020https://github.com/purescript/purescript/issues/3922#issuecomment-682143743
https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tldi10-vytiniotis.pdfhttps://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tldi10-vytiniotis.pdf
https://github.com/natefaubion
natefaubionhttps://github.com/natefaubion
on Aug 27, 2020https://github.com/purescript/purescript/issues/3922#issuecomment-682156693
natefaubionhttps://github.com/natefaubion
completedhttps://github.com/purescript/purescript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 27, 2020https://github.com/purescript/purescript/issues/3922#event-3701169422
milesfrainhttps://github.com/milesfrain
on Aug 27, 2020https://github.com/purescript/purescript/issues/3922#event-3701242221
Note annotation requirements in let and wherehttps://github.com/milesfrain/documentation-1/commit/e84ee91b74d2fae280b9794a81c708e162e060b8
e84ee91https://github.com/milesfrain/documentation-1/commit/e84ee91b74d2fae280b9794a81c708e162e060b8
https://github.com/milesfrain
milesfrainhttps://github.com/milesfrain
on Aug 27, 2020https://github.com/purescript/purescript/issues/3922#issuecomment-682168454
purescript/documentation#350https://github.com/purescript/documentation/pull/350
Sign up for freehttps://github.com/signup?return_to=https://github.com/purescript/purescript/issues/3922
Sign in to commenthttps://github.com/login?return_to=https://github.com/purescript/purescript/issues/3922
type: bughttps://github.com/purescript/purescript/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.