Sunday, 18 August 2013

Seeing Typeclass definition in ghci for a specific type

Seeing Typeclass definition in ghci for a specific type

Is there a way to see Typeclass definition in ghci for a specific type?
For example, Maybe is defined like this:
instance Functor Maybe where
fmap f (Just x) = Just (f x)
fmap f Nothing = Nothing
Can I see this in ghci ?

No comments:

Post a Comment