[Haskell] Dependent Types in Haskell [was: Eliminating Array Bound Checking through Non-dependent] types

MR K P SCHUPKE k.schupke at imperial.ac.uk
Wed Aug 11 04:56:19 EDT 2004

Actually the data statement wasnt quite right:

data Cons a b = Cons a b

Would work, but now there is nothing keeping each
element in the list as the same type,

I guess we could add a class to constrain to a normal list,,,

class List l x
instance List Nil x
instance List l x => List (Cons x l) x

Erm, which is of course what I meant in the first place 


More information about the Haskell mailing list