
22 Sep
2008
22 Sep
'08
11:03 p.m.
On Mon, Sep 22, 2008 at 10:20 PM, Anatoly Yakovenko
Is there a way to define a function that only takes a list with a max of 1? Because
only1 :: MaxList (S a) -> String only1 _ = "only1"
will work over
a = Cons n02 $ Cons n02 $ Cons n01 $ Nil without any problems
only1 :: MaxList (S Z) -> String
If you like, you may declare
type One = S Z
type Two = S One
etc.
--
Dave Menendez