Is there already a list class?

Dominic Steinitz dominic.steinitz at
Sun May 13 05:04:40 EDT 2007

Did anything ever come of this discussion?

I found myself writing this the other day to capture the fact that IA5
characters are the building blocks of IA5 strings.


newtype IA5String = IA5String {unIA5String :: String}

newtype IA5Char = IA5Char {unIA5Char :: Char}

class List a b | a -> b where
   nil  :: b
   cons :: a -> b -> b

instance List IA5Char IA5String where
   nil = IA5String []
   cons x y = IA5String ((unIA5Char x):(unIA5String y))

More information about the Libraries mailing list