mirror of
https://github.com/fjvallarino/monomer.git
synced 2024-11-10 11:21:50 +03:00
Use Lens package instead of MicroLens. Main reason is needing ALens, but we were already relying on -platform and -ghc so it was not really lightweight
This commit is contained in:
parent
7a4a9b625f
commit
fc728f1ea2
@ -8,14 +8,13 @@ module KeysComposite (
|
||||
import Debug.Trace
|
||||
|
||||
import Control.Concurrent (threadDelay)
|
||||
import Control.Lens hiding (Empty, (|>), (<|))
|
||||
import Control.Monad (forM_)
|
||||
|
||||
import Data.Default
|
||||
import Data.Sequence (Seq(..), (|>))
|
||||
import Data.Text (Text)
|
||||
import Data.Typeable (Typeable)
|
||||
import Lens.Micro.GHC
|
||||
import Lens.Micro.TH (makeLenses)
|
||||
import TextShow
|
||||
|
||||
import qualified Data.Sequence as Seq
|
||||
|
@ -8,10 +8,10 @@ module Main where
|
||||
import Debug.Trace
|
||||
|
||||
import Control.Concurrent (threadDelay)
|
||||
import Control.Lens (Lens', (&), (<&>), (^.), (.~), (%~))
|
||||
import Control.Monad.State
|
||||
import Data.Default
|
||||
import Foreign.C.Types
|
||||
import Lens.Micro
|
||||
import NanoVG (Context(..), createGL3, CreateFlags(..), createFont, FileName(..), beginFrame, endFrame)
|
||||
import SDL (($=))
|
||||
import TextShow
|
||||
|
@ -5,12 +5,11 @@ module TestComposite (testComposite) where
|
||||
import Debug.Trace
|
||||
|
||||
import Control.Concurrent (threadDelay)
|
||||
import Control.Lens
|
||||
import Control.Monad (forM_)
|
||||
|
||||
import Data.Default
|
||||
import Data.Typeable (Typeable)
|
||||
import Lens.Micro
|
||||
import Lens.Micro.TH (makeLenses)
|
||||
import TextShow
|
||||
|
||||
import Monomer.Common.Style
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
module Types where
|
||||
|
||||
import Lens.Micro.TH (makeLenses)
|
||||
import Control.Lens (makeLenses)
|
||||
|
||||
import Data.Default
|
||||
import Data.Text (Text)
|
||||
|
@ -28,9 +28,7 @@ dependencies:
|
||||
- containers
|
||||
- data-default
|
||||
- extra
|
||||
- microlens
|
||||
- microlens-mtl
|
||||
- microlens-th
|
||||
- lens
|
||||
- mtl
|
||||
- nanovg
|
||||
- OpenGL
|
||||
@ -67,7 +65,7 @@ executables:
|
||||
|
||||
dependencies:
|
||||
- ekg
|
||||
- microlens-ghc
|
||||
- lens
|
||||
- monomer
|
||||
|
||||
tests:
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
module Monomer.Common.Geometry where
|
||||
|
||||
import Control.Lens.TH (makeLenses)
|
||||
import Data.Default
|
||||
import Lens.Micro.TH (makeLenses)
|
||||
|
||||
data Point = Point {
|
||||
_x :: !Double,
|
||||
|
@ -8,6 +8,7 @@ module Monomer.Main.Core (
|
||||
) where
|
||||
|
||||
import Control.Concurrent (threadDelay)
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
import Control.Monad.Extra
|
||||
import Control.Monad.IO.Class
|
||||
@ -16,7 +17,6 @@ import Data.List (foldl')
|
||||
import Data.Maybe
|
||||
import Data.Sequence (Seq, (><))
|
||||
import Data.Typeable (Typeable)
|
||||
import Lens.Micro.Mtl
|
||||
|
||||
import qualified Data.Map as M
|
||||
import qualified Graphics.Rendering.OpenGL as GL
|
||||
|
@ -8,6 +8,7 @@ module Monomer.Main.Handlers (
|
||||
) where
|
||||
|
||||
import Control.Concurrent.Async (async)
|
||||
import Control.Lens (use, (.=))
|
||||
import Control.Monad.STM (atomically)
|
||||
import Control.Concurrent.STM.TChan (TChan, newTChanIO, writeTChan)
|
||||
import Control.Applicative ((<|>))
|
||||
@ -15,7 +16,6 @@ import Control.Monad
|
||||
import Control.Monad.IO.Class
|
||||
import Data.Maybe
|
||||
import Data.Sequence (Seq(..), (><))
|
||||
import Lens.Micro.Mtl
|
||||
|
||||
import qualified Data.Sequence as Seq
|
||||
import qualified SDL
|
||||
|
@ -7,10 +7,10 @@ module Monomer.Main.Types where
|
||||
|
||||
import Control.Concurrent.Async
|
||||
import Control.Concurrent.STM.TChan
|
||||
import Control.Lens.TH (makeLenses)
|
||||
import Control.Monad.State
|
||||
import Data.Typeable (Typeable)
|
||||
import Data.Sequence (Seq)
|
||||
import Lens.Micro.TH (makeLenses)
|
||||
|
||||
import Monomer.Common.Geometry
|
||||
import Monomer.Common.Tree
|
||||
|
@ -7,6 +7,7 @@ import Debug.Trace
|
||||
import Control.Concurrent.Async (poll)
|
||||
import Control.Concurrent.STM.TChan (tryReadTChan)
|
||||
import Control.Exception.Base
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
import Control.Monad.Extra
|
||||
import Control.Monad.IO.Class
|
||||
@ -15,7 +16,6 @@ import Data.Foldable (toList)
|
||||
import Data.Maybe
|
||||
import Data.Sequence ((><))
|
||||
import Data.Typeable
|
||||
import Lens.Micro.Mtl
|
||||
|
||||
import qualified Data.Sequence as Seq
|
||||
|
||||
|
@ -8,6 +8,7 @@ module Monomer.Widget.Widgets.Dropdown (dropdown) where
|
||||
import Debug.Trace
|
||||
|
||||
import Control.Applicative ((<|>))
|
||||
import Control.Lens (Lens', (&), (^.), (.~))
|
||||
import Control.Monad
|
||||
import Data.Default
|
||||
import Data.Foldable (find)
|
||||
@ -16,7 +17,6 @@ import Data.Maybe (fromMaybe)
|
||||
import Data.Sequence (Seq(..), (<|), (|>))
|
||||
import Data.Text (Text)
|
||||
import Data.Traversable
|
||||
import Lens.Micro
|
||||
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Sequence as Seq
|
||||
|
@ -7,6 +7,7 @@ module Monomer.Widget.Widgets.ListView (listView) where
|
||||
import Debug.Trace
|
||||
|
||||
import Control.Applicative ((<|>))
|
||||
import Control.Lens (Lens', (&), (^.), (.~))
|
||||
import Control.Monad
|
||||
import Data.Default
|
||||
import Data.Foldable (find)
|
||||
@ -16,7 +17,6 @@ import Data.Sequence (Seq(..), (<|), (|>))
|
||||
import Data.Text (Text)
|
||||
import Data.Traversable
|
||||
import Data.Typeable (Typeable, cast)
|
||||
import Lens.Micro
|
||||
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Sequence as Seq
|
||||
|
@ -4,10 +4,10 @@
|
||||
module Monomer.Widget.Widgets.TextField (textField) where
|
||||
|
||||
import Control.Monad
|
||||
import Control.Lens (Lens', (&), (^.), (.~))
|
||||
import Data.Maybe
|
||||
import Data.Text (Text)
|
||||
import Data.Typeable
|
||||
import Lens.Micro
|
||||
|
||||
import qualified Data.Text as T
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user