
You need to understand why the shift/reduce conflicts are happening. Happy has a flag that makes it dump out the state transition tables, and you have to look at them. there probably is some genuine ambiguity. Simon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Adam | Sandberg Eriksson | Sent: 04 June 2015 20:52 | To: ghc-devs@haskell.org; johan.tibell@gmail.com | Subject: StrictData and the parser | | Hello *, | | I'm working on the -XStrict language extension[1] 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[2] I get an | explosion of shift/reduce conflicts as well as 4 extra reduce/reduce | conflicts, see [3] 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 [4] 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? | | Thanks, | Adam | | [1]: https://ghc.haskell.org/trac/ghc/wiki/StrictPragma | [2]: | https://github.com/adamse/ghc/blob/strict- | pragma/compiler/parser/Parser.y#L1547-L1563 | [3]: | https://gist.githubusercontent.com/adamse/8d6c54b6ae660fca8b97/raw/detail | ed-info | [4]: | https://github.com/adamse/ghc/blob/strict- | pragma/testsuite/tests/deSugar/should_run/DsStrictData.hs#L13 | -- | Adam Sandberg Eriksson | _______________________________________________ | ghc-devs mailing list | ghc-devs@haskell.org | http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs