Partial application of type constructors?

Conal Elliott conal at conal.net
Tue Apr 19 00:20:46 EDT 2005


GHC 6.4 objects to the following simple program, pointing to the partial
application of the type constructor AddL.  Is there a work-around?

    {-# OPTIONS -fglasgow-exts #-}
    data LMap a b
    type AddL arr a b = a `arr` LMap a b
    data DFunA arr a b = DFunA (a `arr` b) (DFunA (AddL arr) a b)

The complete error message:

    Type synonym `AddL' should have 3 arguments, but has been given 1
    When checking the data constructor:
      forall arr a b. DFunA (arr a b) (DFunA (AddL arr) a b)
    In the data type declaration for `DFunA'

Is there a serious difficulty with handling partial type applications?

	- Conal



More information about the Glasgow-haskell-users mailing list