The definition of <icdecl> in the interface syntax is:

        <icdecl> ::= <vars> :: <type>

ie no context is allowed in the type signature.  The corresponding
definition in an implementation is:

        <csign> ::= <vars> :: [<context =>] <type>

This is used in PreludeCore at the top of page 92, where we have:

        class (Real a, Fractional a) => RealFrac a where
                properFraction          :: (Integral b) => a -> (b,a)
                ...

According to the definition of <icdecl>, the interface for PreludeCore would be:

        class (Real a, Fractional a) => RealFrac a where
                properFraction          :: a -> (b,a)
                ...

which is clearly quite different.  Shouldn't <icdecl> allow a context?


-Norman
-------
Messing about with signature files fills a much-needed gap in the working
day.


Reply via email to