[Haskell-cafe] Context for type parameters of type
constructors
Keith Wansbrough
Keith.Wansbrough at cl.cam.ac.uk
Tue Mar 30 13:05:55 EST 2004
> My question was why he doesn't believe that. My definition
> data (Num a) => VList a = VList [a]
> clearly states that VLists will ever get types of class Num as
> parameters.
Ah. Constraints on datatype declarations are a misfeature of Haskell, and
have no useful effect. You shouldn't use them.
--KW 8-)
--
Keith Wansbrough <kw217 at cl.cam.ac.uk>
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.
More information about the Haskell-Cafe
mailing list