Remove lens dependency (was not used)
parent
d56c4f5e6b
commit
4770dbdb7c
|
@ -80,7 +80,6 @@ library {
|
||||||
, pretty >=1.1.3.3 && <1.2
|
, pretty >=1.1.3.3 && <1.2
|
||||||
, bytestring >=0.10.8.1 && <0.11
|
, bytestring >=0.10.8.1 && <0.11
|
||||||
, directory >=1.2.6.2 && <1.4
|
, directory >=1.2.6.2 && <1.4
|
||||||
, lens
|
|
||||||
, butcher >=1.0.0.0 && <1.1
|
, butcher >=1.0.0.0 && <1.1
|
||||||
, yaml >=0.8.18 && <0.9
|
, yaml >=0.8.18 && <0.9
|
||||||
, aeson >=1.0.1.0 && <1.3
|
, aeson >=1.0.1.0 && <1.3
|
||||||
|
@ -141,7 +140,6 @@ executable brittany
|
||||||
, pretty
|
, pretty
|
||||||
, bytestring
|
, bytestring
|
||||||
, directory
|
, directory
|
||||||
, lens
|
|
||||||
, butcher
|
, butcher
|
||||||
, yaml
|
, yaml
|
||||||
, extra
|
, extra
|
||||||
|
@ -209,7 +207,6 @@ test-suite unittests
|
||||||
, pretty
|
, pretty
|
||||||
, bytestring
|
, bytestring
|
||||||
, directory
|
, directory
|
||||||
, lens
|
|
||||||
, butcher
|
, butcher
|
||||||
, yaml
|
, yaml
|
||||||
, extra
|
, extra
|
||||||
|
@ -277,7 +274,6 @@ test-suite littests
|
||||||
, pretty
|
, pretty
|
||||||
, bytestring
|
, bytestring
|
||||||
, directory
|
, directory
|
||||||
, lens
|
|
||||||
, butcher
|
, butcher
|
||||||
, yaml
|
, yaml
|
||||||
, extra
|
, extra
|
||||||
|
|
|
@ -9,7 +9,7 @@ Brittany makes heavy usage of mtl-on-steroids-style transformers, mostly
|
||||||
limited to Reader, Writer and State. For this kind of task it makes a lot of
|
limited to Reader, Writer and State. For this kind of task it makes a lot of
|
||||||
sense; we do a pure transformation involving multiple steps
|
sense; we do a pure transformation involving multiple steps
|
||||||
that each requires certain local state during traversals of recursive data
|
that each requires certain local state during traversals of recursive data
|
||||||
structures. By using MultiRWS we can avoid using lens for the most part without
|
structures. By using MultiRWS we can even entirely avoid using lens without
|
||||||
inducing too much boilerplate.
|
inducing too much boilerplate.
|
||||||
|
|
||||||
Firstly, the topmost layer, the IO bits:
|
Firstly, the topmost layer, the IO bits:
|
||||||
|
|
|
@ -14,7 +14,6 @@ where
|
||||||
import Data.Yaml
|
import Data.Yaml
|
||||||
import qualified Data.Aeson.Types as Aeson
|
import qualified Data.Aeson.Types as Aeson
|
||||||
import GHC.Generics
|
import GHC.Generics
|
||||||
import Control.Lens
|
|
||||||
|
|
||||||
import Data.Data ( Data )
|
import Data.Data ( Data )
|
||||||
|
|
||||||
|
@ -395,6 +394,3 @@ instance CZip ConfigF where
|
||||||
cMap :: CZip k => (forall a . f a -> g a) -> k f -> k g
|
cMap :: CZip k => (forall a . f a -> g a) -> k f -> k g
|
||||||
cMap f c = cZip (\_ -> f) c c
|
cMap f c = cZip (\_ -> f) c c
|
||||||
|
|
||||||
makeLenses ''DebugConfigF
|
|
||||||
makeLenses ''ConfigF
|
|
||||||
makeLenses ''LayoutConfigF
|
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||||
|
|
||||||
module Language.Haskell.Brittany.Utils
|
module Language.Haskell.Brittany.Utils
|
||||||
( (.=+)
|
( parDoc
|
||||||
, (%=+)
|
|
||||||
, parDoc
|
|
||||||
, fromMaybeIdentity
|
, fromMaybeIdentity
|
||||||
, fromOptionIdentity
|
, fromOptionIdentity
|
||||||
, traceIfDumpConf
|
, traceIfDumpConf
|
||||||
|
@ -55,20 +53,10 @@ import DataTreePrint
|
||||||
import Language.Haskell.Brittany.Config.Types
|
import Language.Haskell.Brittany.Config.Types
|
||||||
import Language.Haskell.Brittany.Types
|
import Language.Haskell.Brittany.Types
|
||||||
|
|
||||||
import qualified Control.Lens as Lens
|
|
||||||
|
|
||||||
import qualified Data.Generics.Uniplate.Direct as Uniplate
|
import qualified Data.Generics.Uniplate.Direct as Uniplate
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(.=+) :: MonadMultiState s m
|
|
||||||
=> Lens.ASetter s s a b -> b -> m ()
|
|
||||||
l .=+ b = mModify $ l Lens..~ b
|
|
||||||
|
|
||||||
(%=+) :: MonadMultiState s m
|
|
||||||
=> Lens.ASetter s s a b -> (a -> b) -> m ()
|
|
||||||
l %=+ f = mModify (l Lens.%~ f)
|
|
||||||
|
|
||||||
parDoc :: String -> PP.Doc
|
parDoc :: String -> PP.Doc
|
||||||
parDoc = PP.fsep . fmap PP.text . List.words
|
parDoc = PP.fsep . fmap PP.text . List.words
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ import qualified System.Process.Extra
|
||||||
import qualified System.Time.Extra
|
import qualified System.Time.Extra
|
||||||
|
|
||||||
-- import qualified Control.Exception.Lens
|
-- import qualified Control.Exception.Lens
|
||||||
import qualified Control.Lens
|
-- import qualified Control.Lens
|
||||||
-- import qualified Control.Lens.At
|
-- import qualified Control.Lens.At
|
||||||
-- import qualified Control.Lens.Combinators
|
-- import qualified Control.Lens.Combinators
|
||||||
-- import qualified Control.Lens.Cons
|
-- import qualified Control.Lens.Cons
|
||||||
|
|
Loading…
Reference in New Issue