Theory
Haskell has a static, Hindley-Milner, parametric polymorphic type system.
Annotation
haskellIsAwesome :: BoolType Inference
Compilers infer principal type, annotations are optional but recommended.
Arrow Types
(Int -> Bool) -> [Int] -> [Bool]Polymorphism
id :: a -> aType Classes: Num, Eq, Show give adโhoc polymorphism (overloading).
Implementation
Check types in GHCi:
:t map
-- map :: (a -> b) -> [a] -> [b]