Changes between Version 3 and Version 4 of InstanceTemplates


Ignore:
Timestamp:
Mar 14, 2016 9:49:17 AM (3 years ago)
Author:
bgamari
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstanceTemplates

    v3 v4  
    33== Example ==
    44
    5 {{{
     5{{{#!hs
    66class Monad m where
    77  return :: a -> m a
     
    9090For example:
    9191
    92 {{{
     92{{{#!hs
    9393class Functor f where
    9494  fmap :: (a -> b) -> f a -> f b
     
    120120Here is a class we want to split:
    121121
    122 {{{
     122{{{#!hs
    123123class Num a where
    124124  (+) :: a -> a -> a
     
    127127
    128128And here is how we might split it:
    129 {{{
     129{{{#!hs
    130130class Additive a where
    131131  add :: a -> a -> a