never executed always true always false
    1 module HelVM.HelMA.Automata.WhiteSpace.SimpleParams 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 
    7 import           HelVM.HelMA.Automaton.Types.FormatType
    8 import           HelVM.HelMA.Automaton.Types.RAMType
    9 import           HelVM.HelMA.Automaton.Types.StackType
   10 import           HelVM.HelMA.Automaton.Types.TokenType
   11 
   12 -- | Construction for tests
   13 simpleParamsWithDefaultsAndWhiteTokenType :: FormatType -> Source -> SimpleParams
   14 simpleParamsWithDefaultsAndWhiteTokenType = simpleParamsWithDefaults WhiteTokenType
   15 
   16 simpleParamsWithDefaultsAndVisibleTokenType :: FormatType -> Source -> SimpleParams
   17 simpleParamsWithDefaultsAndVisibleTokenType = simpleParamsWithDefaults VisibleTokenType
   18 
   19 simpleParamsWithDefaults :: TokenType -> FormatType -> Source -> SimpleParams
   20 simpleParamsWithDefaults tt = simpleParams tt (defaultStackType , defaultRAMType)
   21 
   22 -- | Construction for benchmark
   23 simpleParamsWithWhiteTokenType :: (StackType, RAMType) -> FormatType -> Source -> SimpleParams
   24 simpleParamsWithWhiteTokenType = simpleParams WhiteTokenType
   25 
   26 simpleParamsWithVisibleTokenType :: (StackType, RAMType) -> FormatType -> Source -> SimpleParams
   27 simpleParamsWithVisibleTokenType = simpleParams VisibleTokenType
   28 
   29 automatonOptions :: SimpleParams -> Automaton.AutomatonOptions
   30 automatonOptions p = Automaton.AutomatonOptions (stackType p) (ramType p) (autoOptions p)
   31 
   32 simpleParams :: TokenType -> (StackType, RAMType) -> FormatType -> Source -> SimpleParams
   33 simpleParams tt (st , rt) al s = SimpleParams
   34   { tokenType = tt
   35   , source = s
   36   , formatType = al
   37   , stackType = st
   38   , ramType = rt
   39   , autoOptions = simpleAutoParams
   40   }
   41 
   42 -- | Type
   43 data SimpleParams = SimpleParams
   44   { tokenType   :: !TokenType
   45   , source      :: !Source
   46   , formatType  :: !FormatType
   47   , stackType   :: !StackType
   48   , ramType     :: !RAMType
   49   , autoOptions :: !AutoOptions
   50   }