23 Sep
2008
23 Sep
'08
11:03 a.m.
On Mon, Sep 22, 2008 at 10:20 PM, Anatoly Yakovenko <aeyakovenko@gmail.com> wrote:
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 <dave@zednenem.com> <http://www.eyrie.org/~zednenem/>