rawr
rawr copied to clipboard
`:=` and `:=!` too losely bound
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.
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.