1module Optimize.Environment
5 , getTailCall, setTailCall
9import qualified Control.Monad.State as State
11import qualified Optimize.Patterns.DecisionTree as DT
18run :: DT.VariantDict -> Optimizer a -> a
19run variantDict optimizer =
20 State.evalState optimizer (Env False 0 variantDict)
24 { _hasTailCall :: Bool
26 , _variantDict :: DT.VariantDict
30getVariantDict :: Optimizer DT.VariantDict
32 State.gets _variantDict
35getTailCall :: Optimizer Bool
37 State.gets _hasTailCall
40setTailCall :: Bool -> Optimizer ()
43 State.put (env { _hasTailCall = bool })
46freshName :: Optimizer String
48 do (Env htc uid vd) <- State.get
49 State.put (Env htc (uid + 1) vd)
50 return ("_p" ++ show uid)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list