rawr icon indicating copy to clipboard operation
rawr copied to clipboard

`:=` and `:=!` too losely bound

Open 3noch opened this issue 8 years ago • 1 comments

I'm not sure it's even possible to fix this but you'll notice that when defining a record with function types, you must use parenthesis like this:

type MyRec = R ( "runThing" := (a -> IO b) )

Without parens, the parser thinks you are defining ("runThing" := a) -> IO b as an unlabeled record.

3noch avatar Feb 08 '17 21:02 3noch

I don't think this is fixable, since (->) is hard-wired as infixr 0 in GHC. As you mentioned, adding parentheses around would be the easiest workaround of this issue.

PkmX avatar Mar 19 '17 05:03 PkmX