Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
haskell_type_system [2015/04/21 16:35] nikolaj |
haskell_type_system [2015/04/21 16:37] nikolaj |
||
---|---|---|---|
Line 148: | Line 148: | ||
The type system derives which fmap to use from the fact that we apply the construction to a list. | The type system derives which fmap to use from the fact that we apply the construction to a list. | ||
- | The following example is the functor whose object map maps each type to a type which additionally contains the term '$\text{Nothing}$': | + | The following example is the functor whose object map maps each type to a type, where each of the old terms have a clone with the prefix '$\text{Just}$', and there is more over an additional term called nothing '$\text{Nothing}$': |
<code/Haskell> | <code/Haskell> | ||
Line 159: | Line 159: | ||
For all types $a$, the constructor $(\to)\,a$ is the object map of $\mathrm{Hom}_\mathrm{Hask}(a,-)$. | For all types $a$, the constructor $(\to)\,a$ is the object map of $\mathrm{Hom}_\mathrm{Hask}(a,-)$. | ||
- | In fact, all of the functors mentioned can be made into monads, and they are known as list, maybe and reader monad. | + | In fact, all of the functors mentioned can be made into [[monad_._haskell|monads]], and they are known as list, maybe and reader monad. |
=== Reference === | === Reference === |