1module Optimize.Environment
6 , getTailCall, setTailCall
10import qualified Control.Monad.State as State
12import qualified AST.Module.Name as ModuleName
13import qualified Optimize.DecisionTree as DT
20run :: DT.VariantDict -> ModuleName.Canonical -> Optimizer a -> a
21run variantDict home optimizer =
22 State.evalState optimizer (Env False 0 variantDict home)
26 { _hasTailCall :: Bool
28 , _variantDict :: DT.VariantDict
29 , _home :: ModuleName.Canonical
33getVariantDict :: Optimizer DT.VariantDict
35 State.gets _variantDict
38getHome :: Optimizer ModuleName.Canonical
43getTailCall :: Optimizer Bool
45 State.gets _hasTailCall
48setTailCall :: Bool -> Optimizer ()
51 State.put (env { _hasTailCall = bool })
54freshName :: Optimizer String
56 do (Env htc uid vd home) <- State.get
57 State.put (Env htc (uid + 1) vd home)
58 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