It's because you're doing === Nothing and the type of the Nothing is ambiguous (Maybe a1).On Wed, Jul 20, 2016 at 5:18 PM, Corentin Dupont <corentin.dupont@gmail.com> wrote:_______________________________________________Hi all,I'm surprised this doesn't work:data SomeData = forall e. (Typeable e, Eq e) => SomeData e
(===) :: (Typeable a, Typeable b, Eq a, Eq b) => a -> b -> Bool
(===) x y = cast x == Just y
test :: SomeData' -> Bool
test (SomeData' e) | e === Nothing = True
test _ = FalseIt says
Could not deduce (Eq a1) arising from a use of ‘===’How can I achieve something of the same effect?ThanksCorentin
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.