ollef / Earley

Parsing all context-free grammars using Earley's algorithm in Haskell.
BSD 3-Clause "New" or "Revised" License
361 stars 24 forks source link

Kind error trying examples/expr.hs at GHCi (7.10.2 with Stack) #25

Closed GetContented closed 8 years ago

GetContented commented 8 years ago

Trying out the mentioned example, I encountered this error in stack lts-3.15 GHC 7.10.2 using GHCi:

Expecting one more argument to ‘Grammar r (Prod r String String Expr)’
Expected a type,
  but ‘Grammar r (Prod r String String Expr)’ has kind ‘* -> *’
In the type signature for ‘expr’:
  expr :: Grammar r (Prod r String String Expr)

Sorry to ask here, I'm assuming it's something I've done wrong, but I'm not sure what it is.

I made sure to copy the example verbatim from the github raw representation. Any help would be greatly appreciated!

GetContented commented 8 years ago

As @ollef mentioned to me on IRC, this was because I had the incorrect version of Earley for the example I was using. Updated to LTS 5.6 and everything works fine.