From 56aaad1f95517c7c2428f7d0661fed30b8c11a38 Mon Sep 17 00:00:00 2001 From: Tony Morris Date: Thu, 20 Apr 2017 10:41:05 +1000 Subject: [PATCH] Compile with more recent versions of GHC. --- README.markdown | 2 +- src/Lets/Lens.hs | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.markdown b/README.markdown index 1916799..2026761 100644 --- a/README.markdown +++ b/README.markdown @@ -5,7 +5,7 @@ Let's Lens presents a series of exercises, in a similar format to [the Data61 functional programming course material](http://github.com/data61/fp-course). The subject of the exercises is around the concept of lenses, initially proposed -by Foster et al., to solve the view-update problem of relational databases. +by Foster et al., to solve the view-update problem of relational databases. The theories around lenses have been advanced significantly in recent years, resulting in a library, implemented in Haskell, called `lens`. diff --git a/src/Lets/Lens.hs b/src/Lets/Lens.hs index 7e21c99..f6ef642 100644 --- a/src/Lets/Lens.hs +++ b/src/Lets/Lens.hs @@ -314,14 +314,14 @@ setP :: Prism s t a b -> s -> Either t a -setP = +setP _ _ = error "todo: setP" getP :: Prism s t a b -> b -> t -getP = +getP _ _ = error "todo: getP" type Prism' a b = @@ -345,7 +345,7 @@ modify :: -> (a -> b) -> s -> t -modify = +modify _ _ _ = error "todo: modify" -- | An alias for @modify@. @@ -375,7 +375,7 @@ infixr 4 %~ -> b -> s -> t -(.~) = +(.~) _ _ _ = error "todo: (.~)" infixl 5 .~ @@ -396,7 +396,7 @@ fmodify :: -> (a -> f b) -> s -> f t -fmodify = +fmodify _ _ _ = error "todo: fmodify" -- | @@ -412,7 +412,7 @@ fmodify = -> f b -> s -> f t -(|=) = +(|=) _ _ _ = error "todo: (|=)" infixl 5 |= @@ -498,7 +498,7 @@ compose :: Lens s t a b -> Lens q r s t -> Lens q r a b -compose = +compose _ _ = error "todo: compose" -- | An alias for @compose@. @@ -534,7 +534,7 @@ product :: Lens s t a b -> Lens q r c d -> Lens (s, q) (t, r) (a, c) (b, d) -product = +product _ _ = error "todo: product" -- | An alias for @product@. @@ -564,7 +564,7 @@ choice :: Lens s t a b -> Lens q r a b -> Lens (Either s q) (Either t r) a b -choice = +choice _ _ = error "todo: choice" -- | An alias for @choice@.