[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Re: GATD and pattern matching

Subject: Re: [Haskell-cafe] Re: GATD and pattern matching
From: Ben Millwood
Date: Fri, 11 Jun 2010 12:51:36 +0100
On Fri, Jun 11, 2010 at 12:46 AM, Felipe Lessa <[email protected]> wrote:
>
>  eqTypeable :: (Typeable a, Eq a, Typeable b, Eq b) => a -> b -> Bool
>  eqTypeable x y = case cast y of
>                     Just y' -> x == y'
>                     Nothing -> False
>

...or indeed:

eqTypeable x y = cast x == Just y
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>