⟨/⟩ AT Protocol Record Source
at://did:plc:pi6woz4d47bkuws673w2il2r/site.standard.document/3mnrlsfyg4bi2
← Back to post
{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreib4psvwszmmddwlohi33u5zikkch3idgvonwqmc6ooixqwqo624oy",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mnrlsfyg3ai2"
  },
  "path": "/t/serokell-s-work-on-ghc-dependent-types-part-5/14184#post_10",
  "publishedAt": "2026-06-08T10:10:04.000Z",
  "site": "https://discourse.haskell.org",
  "textContent": "AntC2:\n\n> Is there a risk of confusing the kind `->` with a `ViewPattern`?\n\nYes. Tried initially in 9.10 with no extensions\n\n\n    ghci> let f ((+ 2) -> x) = x in f 7\n        Illegal view pattern; suggest enable the extension [correct, same reporting as prev GHCs]\n\n    — instead :set -XRequiredTypeArguments; try same input\n        error: [GHC-72516] Parse error in pattern: +2\n\n    — Ok, :set -XViewPatterns; parsed ok.\n    — BTW, advance warning:\n\n    ghci> let f ((+ 2) -> x :: Int) = x in f 7\n        warning: [GHC-00834] …\n        * Found an unparenthesized pattern signature …\n        * This code might stop working in a future GHC release …\n\n\n(I was trying to break it :: I wouldn’t usually code that signature like that — yeuch! So I agree with the planned change to the precedence.)",
  "title": "Serokell’s Work on GHC: Dependent Types, Part 5"
}