Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (8 sloc) 239 Bytes
{-# LANGUAGE DatatypeContexts #-}
data Foo a = Foo a
instance Functor Foo where
fmap f (Foo a) = Foo (f a)
-- -- Can't compile these lines
-- data Eq a => Bar a = Bar a
-- instance Functor Bar where
-- fmap f (Bar a) = Bar (f a)
Something went wrong with that request. Please try again.