[Haskell-cafe] Problem with prepose.lhs and ghc6.10.1

andy morris andy at adradh.org.uk
Thu Apr 2 12:40:01 EDT 2009


2009/4/2 Henry Laxen <nadine.and.henry at pobox.com>:
> Dear Group,
>
> I'm trying to read the paper:
> "Functional Pearl: Implicit Configurations"
> at http://www.cs.rutgers.edu/~ccshan/prepose/
> and when running the code in prepose.lhs I get:
> ../haskell/prepose.lhs:707:0: Parse error in pattern
> which is pointing at:
> normalize a :: M s a = M (mod a (modulus (undefined :: s)))
>
> The paper says it uses lexically scoped type variables.  I tried reading about
> them at:
> http://www.haskell.org/ghc/docs/latest/html/users_guide/other-type-extensions.html#scoped-type-variables
>
> so I added -XScopedTypeVariables to my OPTIONS but I still get the same error
> message.  I would really like to play with the code in the paper, but I'm stuck
> at this point.  Any pointers would be appreciated.
> Best wishes,
> Henry Laxen

It probably needs brackets:
    normalize (a :: M s a) = ...


More information about the Haskell-Cafe mailing list