[Haskell-cafe] Type synonym application
C Rodrigues
red5_2 at hotmail.com
Sun Mar 18 13:47:21 EDT 2007
Type synonyms aren't applied as I would expect during kind checking. What's
going on here?
type WithList a b = b [a]
type FooPair a b = (b, a -> b)
-- error: `WithList' is applied to too many type arguments
ints1 :: WithList Int FooPair [Int]
ints1 = ([1], id)
-- error: `FooPair' is not applied to enough type arguments
ints2 :: (WithList Int FooPair) [Int]
ints2 = ([1], id)
-- after manually applying the first type synonym
ints3 :: FooPair [Int] [Int]
ints3 = ([1], id)
_________________________________________________________________
Live Search Maps find all the local information you need, right when you
need it. http://maps.live.com/?icid=hmtag2&FORM=MGAC01
More information about the Haskell-Cafe
mailing list