this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'master' into answers

+17 -17
+3 -1
README.markdown
··· 2 2 3 3 ![NICTA](http://i.imgur.com/sMXB9XB.jpg) 4 4 5 - 6 5 ### Abstract 7 6 8 7 Let's Lens presents a series of exercises, in a similar format to ··· 20 19 best to start at the `Lets.GetSetLens` module. If you wish to derive the 21 20 structure of lenses from first principles, then derive the more modern theories, 22 21 start at the `Lets.Lens.Lens` module. 22 + 23 + Exercises can be recognised by filling in a function body that has a placeholder 24 + of `error "todo: <function-name>"`. 23 25 24 26 ---- 25 27
+2 -2
src/Lets/GetSetLens.hs
··· 37 37 , modifyCityUppercase 38 38 ) where 39 39 40 - import Control.Applicative((<*>)) 40 + import Control.Applicative(Applicative((<*>))) 41 41 import Data.Bool(bool) 42 42 import Data.Char(toUpper) 43 43 import Data.Map(Map) 44 44 import qualified Data.Map as Map(insert, delete, lookup) 45 45 import Data.Set(Set) 46 46 import qualified Data.Set as Set(insert, delete, member) 47 - import Lets.Data 47 + import Lets.Data(Person(Person), Locality(Locality), Address(Address)) 48 48 import Prelude hiding (product) 49 49 50 50 -- $setup
+1 -2
src/Lets/Lens/Choice.hs
··· 1 - module Lets.Lens.Choice 2 - ( 1 + module Lets.Lens.Choice ( 3 2 Choice(..) 4 3 ) where 5 4
+7 -7
src/Lets/Lens/Lens.hs
··· 73 73 , intOrLengthEven 74 74 ) where 75 75 76 - import Control.Applicative(Applicative(..)) 76 + import Control.Applicative(Applicative((<*>), pure)) 77 77 import Data.Bool(bool) 78 78 import Data.Char(toUpper) 79 - import Data.Foldable(Foldable(..)) 79 + import Data.Foldable(Foldable(foldMap)) 80 80 import Data.Functor((<$>)) 81 81 import Data.Map(Map) 82 82 import qualified Data.Map as Map(insert, delete, lookup) 83 - import Data.Monoid(Monoid(..)) 83 + import Data.Monoid(Monoid) 84 84 import qualified Data.Set as Set(Set, insert, delete, member) 85 - import Data.Traversable(Traversable(..)) 86 - import Lets.Data 87 - import Lets.Lens.Choice 88 - import Lets.Lens.Profunctor 85 + import Data.Traversable(Traversable(traverse)) 86 + import Lets.Data(AlongsideLeft(AlongsideLeft, getAlongsideLeft), AlongsideRight(AlongsideRight, getAlongsideRight), Identity(Identity, getIdentity), Const(Const, getConst), Tagged(Tagged, getTagged), IntOr(IntOrIs, IntOrIsNot), IntAnd(IntAnd), Person(Person), Locality(Locality), Address(Address)) 87 + import Lets.Lens.Choice(Choice(left, right)) 88 + import Lets.Lens.Profunctor(Profunctor(dimap)) 89 89 import Prelude hiding (product) 90 90 91 91 -- $setup
+1 -2
src/Lets/Lens/Profunctor.hs
··· 1 - module Lets.Lens.Profunctor 2 - ( 1 + module Lets.Lens.Profunctor ( 3 2 Profunctor(dimap) 4 3 ) where 5 4
+1 -1
src/Lets/OpticPolyLens.hs
··· 48 48 import qualified Data.Map as Map(insert, delete, lookup) 49 49 import Data.Set(Set) 50 50 import qualified Data.Set as Set(insert, delete, member) 51 - import Lets.Data 51 + import Lets.Data(AlongsideLeft(AlongsideLeft, getAlongsideLeft), AlongsideRight(AlongsideRight, getAlongsideRight), Identity(Identity, getIdentity), Const(Const, getConst), IntAnd(IntAnd), Person(Person), Locality(Locality), Address(Address)) 52 52 import Prelude hiding (product) 53 53 54 54 -- $setup
+2 -2
src/Lets/StoreLens.hs
··· 44 44 , modifyCityUppercase 45 45 ) where 46 46 47 - import Control.Applicative((<*>)) 47 + import Control.Applicative(Applicative((<*>))) 48 48 import Data.Bool(bool) 49 49 import Data.Char(toUpper) 50 50 import Data.Functor((<$>)) ··· 52 52 import qualified Data.Map as Map(insert, delete, lookup) 53 53 import Data.Set(Set) 54 54 import qualified Data.Set as Set(insert, delete, member) 55 - import Lets.Data 55 + import Lets.Data(Store(Store), Person(Person), Locality(Locality), Address(Address)) 56 56 import Prelude hiding (product) 57 57 58 58 -- $setup