diff --git a/.gitignore b/.gitignore index 466a68f..2ed9caf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,11 @@ # CABAL /dist +/dist-newstyle /cabal-dev /.cabal-sandbox /cabal.sandbox.config +.ghc.environment.* # Haskell Program Coverage /.hpc diff --git a/lets-lens.cabal b/lets-lens.cabal index 8e625f0..912bfe7 100644 --- a/lets-lens.cabal +++ b/lets-lens.cabal @@ -4,8 +4,8 @@ license: BSD3 license-file: LICENCE author: Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> maintainer: Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> -copyright: Copyright (C) 2015-2016 National ICT Australia Limited -copyright: Copyright (c) 2017-2018, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230. +copyright: Copyright (C) 2015-2016 National ICT Australia Limited, + Copyright (c) 2017-2018, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230. synopsis: Source code for exercises on the lens concept category: Education description: Source code for exercises on the lens concept @@ -27,7 +27,7 @@ library build-depends: base >= 4.8 && < 5 , containers >= 0.4.0.0 - + ghc-options: -Wall -fno-warn-unused-binds -fno-warn-unused-do-bind @@ -44,7 +44,7 @@ library Lets.OpticPolyLens Lets.Profunctor Lets.StoreLens - + test-suite doctests type: exitcode-stdio-1.0 diff --git a/src/Lets/Data.hs b/src/Lets/Data.hs index 42a9df7..fb141ec 100644 --- a/src/Lets/Data.hs +++ b/src/Lets/Data.hs @@ -16,7 +16,6 @@ module Lets.Data ( , Identity(..) , AlongsideLeft(..) , AlongsideRight(..) -, bool ) where import Control.Applicative(Applicative(..)) @@ -172,22 +171,10 @@ instance Functor f => Functor (AlongsideLeft f b) where data AlongsideRight f a b = AlongsideRight { - getAlongsideRight :: + getAlongsideRight :: f (a, b) } instance Functor f => Functor (AlongsideRight f a) where fmap f (AlongsideRight x) = AlongsideRight (fmap (\(a, b) -> (a, f b)) x) - ----- - -bool :: - a - -> a - -> Bool - -> a -bool f _ False = - f -bool _ t True = - t diff --git a/src/Lets/GetSetLens.hs b/src/Lets/GetSetLens.hs index 481ac31..0ecb04e 100644 --- a/src/Lets/GetSetLens.hs +++ b/src/Lets/GetSetLens.hs @@ -7,6 +7,7 @@ module Lets.GetSetLens ( , set , modify , (%~) +, (.~) , fmodify , (|=) , fstL diff --git a/src/Lets/OpticPolyLens.hs b/src/Lets/OpticPolyLens.hs index 066ca16..943135a 100644 --- a/src/Lets/OpticPolyLens.hs +++ b/src/Lets/OpticPolyLens.hs @@ -9,6 +9,7 @@ module Lets.OpticPolyLens ( , set , modify , (%~) +, (.~) , fmodify , (|=) , fstL diff --git a/src/Lets/StoreLens.hs b/src/Lets/StoreLens.hs index 349775c..df4a6d8 100644 --- a/src/Lets/StoreLens.hs +++ b/src/Lets/StoreLens.hs @@ -14,6 +14,7 @@ module Lets.StoreLens ( , set , modify , (%~) +, (.~) , fmodify , (|=) , fstL @@ -28,6 +29,7 @@ module Lets.StoreLens ( , choice , (|||) , cityL +, stateL , countryL , streetL , suburbL @@ -51,7 +53,7 @@ import Data.Map(Map) import qualified Data.Map as Map(insert, delete, lookup) import Data.Set(Set) import qualified Data.Set as Set(insert, delete, member) -import Lets.Data(Store(Store), Person(Person), Locality(Locality), Address(Address), bool) +import Lets.Data(Store(Store), Person(Person), Locality(Locality), Address(Address)) import Prelude hiding (product) -- $setup