never executed always true always false
    1 module HelVM.HelMA.Automaton.API.EvalParams where
    2 
    3 import qualified HelVM.HelMA.Automaton.API.AutomatonOptions as Automaton
    4 import           HelVM.HelMA.Automaton.API.AutoOptions
    5 import           HelVM.HelMA.Automaton.API.IOTypes
    6 import           HelVM.HelMA.Automaton.API.MemoryOptions
    7 
    8 import           HelVM.HelMA.Automaton.Types.CellType
    9 import           HelVM.HelMA.Automaton.Types.DumpType
   10 import           HelVM.HelMA.Automaton.Types.FormatType
   11 import           HelVM.HelMA.Automaton.Types.IntCellType
   12 import           HelVM.HelMA.Automaton.Types.RAMType
   13 import           HelVM.HelMA.Automaton.Types.StackType
   14 
   15 -- | Accessors
   16 ramAutoOptions :: EvalParams -> RAMType
   17 ramAutoOptions = ram . memoryOptions
   18 
   19 stackAutoOptions :: EvalParams -> StackType
   20 stackAutoOptions = stack . memoryOptions
   21 
   22 cellAutoOptions :: EvalParams -> CellType
   23 cellAutoOptions = cell . memoryOptions
   24 
   25 intCellAutoOptions :: EvalParams -> IntCellType
   26 intCellAutoOptions = intCell . memoryOptions
   27 
   28 dumpAutoOptions :: EvalParams -> DumpType
   29 dumpAutoOptions = dumpType . autoOptions
   30 
   31 automatonOptions :: EvalParams -> Automaton.AutomatonOptions
   32 automatonOptions p = Automaton.AutomatonOptions (stackAutoOptions p) (ramAutoOptions p) (autoOptions p)
   33 
   34 -- | Type
   35 data EvalParams = EvalParams
   36   { formatType    :: !FormatType
   37   , source        :: !Source
   38   , memoryOptions :: !MemoryOptions
   39   , autoOptions   :: !AutoOptions
   40   }