On Mon, Sep 22, 2008 at 10:20 PM, Anatoly Yakovenko
<[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
<http://www.eyrie.org/~zednenem/>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to