1
我想用ghc 7.10.2和alex 3.1.4编译lex.x,但是它给出了下面的错误。 我检查了Lex.hs,确实没有'Alex'的应用实例。Alex wrappers.hs没有应用的实例
注:此错误开始来后,我从包装“单子”搬到“单子-字节字符串”
templates/wrappers.hs:287:10:
No instance for (Applicative Alex)
arising from the superclasses of an instance declaration
In the instance declaration for ‘Monad Alex’
我看到,在亚历克斯3.1.4本固定http://hackage.haskell.org/package/alex
Changes in 3.1.4:
Add Applicative/Functor instances for GHC 7.10
下面的提交介绍了应用实例,但它不存在于我生成的Lex.h中。我可以手动使用下面的包装来生成Lex.hs吗?
https://github.com/simonmar/alex/commit/b1472bfbb7b95bcd6c66558197e2603997d9ce0b
这看起来像用cabal/stack构建alex的问题。如果我从最新的github源码构建alex,那么它的包装看起来很好。在此处打开此问题以跟踪https://github.com/simonmar/alex/issues/73。 – dfordivam