Personal tools

Cookbook/Compilers and interpreters

From HaskellWiki

< Cookbook
Revision as of 08:27, 31 August 2009 by Lenny222 (Talk | contribs)

Jump to: navigation, search

1 GHC

TODO

2 GHCi

Problem Solution Examples
checking definitions  :i
Prelude> :i Maybe
data Maybe a = Nothing | Just a         -- Defined in Data.Maybe
instance (Eq a) => Eq (Maybe a) -- Defined in Data.Maybe
instance Monad Maybe -- Defined in Data.Maybe
instance Functor Maybe -- Defined in Data.Maybe
instance (Ord a) => Ord (Maybe a) -- Defined in Data.Maybe
instance (Read a) => Read (Maybe a) -- Defined in GHC.Read
instance (Show a) => Show (Maybe a) -- Defined in GHC.Show
checking types  :t
Prelude> :t "Hello"
"Hello" :: [Char]

3 Hugs

TODO