StrictData and the parser
Edward Z. Yang
ezyang at mit.edu
Thu Jun 4 20:05:21 UTC 2015
At a guess, ~ is ambiguous with the type equality syntax a ~ b.
You'll probably have to add a new production for types (similar
to atype) which are at the top level of a data constructor definition.
I recently wrote some documentation on how to interpret Happy
info files. There hasn't been a release yet but the docs
Excerpts from Adam Sandberg Eriksson's message of 2015-06-04 12:52:02 -0700:
> Hello *,
> I'm working on the -XStrict language extension for this years Google
> summer of code. I've started with the smaller -XStrictData (as
> documented at the wiki) and have the internals mostly figured out.
> However after adding relevant rules for '~' in the parser I get an
> explosion of shift/reduce conflicts as well as 4 extra reduce/reduce
> conflicts, see  for the happy info (the states with 36 shift/reduce
> conflicts seem to be the problematic ones), I also fail to parse the
> test file  with the error
> DsStrictData.hs:15:1: error:
> parse error (possibly incorrect indentation or mismatched brackets)
> Can anyone offer some guidance on what the appropriate changes to the
> parser are to make these "lazyness" marks work?
> : https://ghc.haskell.org/trac/ghc/wiki/StrictPragma
More information about the ghc-devs