diff --git a/brittany.cabal b/brittany.cabal index 054563f..9e3487f 100644 --- a/brittany.cabal +++ b/brittany.cabal @@ -80,7 +80,6 @@ library { , pretty >=1.1.3.3 && <1.2 , bytestring >=0.10.8.1 && <0.11 , directory >=1.2.6.2 && <1.4 - , lens , butcher >=1.0.0.0 && <1.1 , yaml >=0.8.18 && <0.9 , aeson >=1.0.1.0 && <1.3 @@ -141,7 +140,6 @@ executable brittany , pretty , bytestring , directory - , lens , butcher , yaml , extra @@ -209,7 +207,6 @@ test-suite unittests , pretty , bytestring , directory - , lens , butcher , yaml , extra @@ -277,7 +274,6 @@ test-suite littests , pretty , bytestring , directory - , lens , butcher , yaml , extra diff --git a/docs/implementation/dataflow.md b/docs/implementation/dataflow.md index 8a6c8df..69b87e2 100644 --- a/docs/implementation/dataflow.md +++ b/docs/implementation/dataflow.md @@ -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 sense; we do a pure transformation involving multiple steps 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. Firstly, the topmost layer, the IO bits: diff --git a/src/Language/Haskell/Brittany/Config/Types.hs b/src/Language/Haskell/Brittany/Config/Types.hs index d7cb098..90a8d96 100644 --- a/src/Language/Haskell/Brittany/Config/Types.hs +++ b/src/Language/Haskell/Brittany/Config/Types.hs @@ -14,7 +14,6 @@ where import Data.Yaml import qualified Data.Aeson.Types as Aeson import GHC.Generics -import Control.Lens 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 f c = cZip (\_ -> f) c c -makeLenses ''DebugConfigF -makeLenses ''ConfigF -makeLenses ''LayoutConfigF diff --git a/src/Language/Haskell/Brittany/Utils.hs b/src/Language/Haskell/Brittany/Utils.hs index 823bb2d..b55b3d3 100644 --- a/src/Language/Haskell/Brittany/Utils.hs +++ b/src/Language/Haskell/Brittany/Utils.hs @@ -2,9 +2,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Language.Haskell.Brittany.Utils - ( (.=+) - , (%=+) - , parDoc + ( parDoc , fromMaybeIdentity , fromOptionIdentity , traceIfDumpConf @@ -55,20 +53,10 @@ import DataTreePrint import Language.Haskell.Brittany.Config.Types import Language.Haskell.Brittany.Types -import qualified Control.Lens as Lens - 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 = PP.fsep . fmap PP.text . List.words diff --git a/srcinc/prelude.inc b/srcinc/prelude.inc index ea97715..71226c3 100644 --- a/srcinc/prelude.inc +++ b/srcinc/prelude.inc @@ -42,7 +42,7 @@ import qualified System.Process.Extra import qualified System.Time.Extra -- import qualified Control.Exception.Lens -import qualified Control.Lens +-- import qualified Control.Lens -- import qualified Control.Lens.At -- import qualified Control.Lens.Combinators -- import qualified Control.Lens.Cons