
#10056: Inconsistent precedence of ~ -------------------------------------+------------------------------------- Reporter: crockeea | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 7.8.4 (Parser) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: #10059, #10431, | Differential Rev(s): Phab:D4876 #14316 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Ah! I'd forgotten about `-XStrict`. So the special treatment in `Parsery.y` is (only) here {{{ strictness :: { Located ([AddAnn], SrcStrictness) } : '!' { sL1 $1 ([mj AnnBang $1], SrcStrict) } | '~' { sL1 $1 ([mj AnnTilde $1], SrcLazy) } }}} So is `(~)` (in types) handled uniformly with `(!)`? It seems not. Perhaps that's because we don't want to give up `(~)` as an infix operator, but we are willing to give up `(!)`? I got as far as reading `splitTilde` but got lost in its invocations in `RdrHsSyn` and `Parser.y`. Anyway, it'd be good to summarise how the moving parts fit together, in a Note. There are some e.g. `Note [Parsing ~]`, but they are too brief to do justice to the question. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10056#comment:41 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler