Skip to content

Commit

Permalink
exporting lenses
Browse files Browse the repository at this point in the history
  • Loading branch information
mstksg committed Jul 20, 2018
1 parent 2d57436 commit ada4df3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Interactive/Plot/Run.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}

module Interactive.Plot.Run (
runPlot
Expand All @@ -17,7 +16,6 @@ import Graphics.Vty
import Interactive.Plot.Core
import Interactive.Plot.Series
import Lens.Micro
import Lens.Micro.TH

data PEvent = PEQuit
| PEZoom Double
Expand Down Expand Up @@ -52,7 +50,8 @@ data PlotState = PlotState
, _psSerieses :: [Series]
}

makeLenses ''PlotState
psRange :: Lens' PlotState (Coord (Range Double))
psRange f (PlotState r s) = (`PlotState` s) <$> f r

displayRange :: Output -> IO (Coord (Range Int))
displayRange o = do
Expand Down

0 comments on commit ada4df3

Please sign in to comment.