Module RW.Monad

State monad with goodies.

Author: Lasse Züngel

Summary of exported operations:

rwNaming :: Naming  Deterministic 
Default naming for the ReadWrite code generation
get :: RWM Runtime  Deterministic 
put :: Runtime -> RWM ()  Deterministic 
getFunctionLayouts :: RWM [FunctionLayout]  Deterministic 
getModuleName :: RWM String  Deterministic 
getProgram :: RWM CurryProg  Deterministic 
logIllTypedDefinition :: String -> RWM ()  Deterministic 
getIllTypedDefinitions :: Runtime -> [String]  Deterministic 
logError :: String -> RWM ()  Deterministic 
getErrors :: Runtime -> [String]  Deterministic 

Exported datatypes:


Runtime

Runtime data for the code generation:

Constructors:


CLOptions

Command line options:

Constructors:

  • CLOptions :: Int -> Int -> String -> Bool -> Bool -> CLOptions

    Fields:

    • optStringLength :: Int
    • optAlphabetLength :: Int
    • optOutDir :: String
    • optGenOpsFile :: Bool
    • optHelp :: Bool

newtype RWM

Constructor:


FunctionLayout

A function layout describes how a function is generated.

Constructors:


FunctionGenerator

A function generator is a function that takes a type declaration and returns the appropriate function rule(s).

Type synonym: FunctionGenerator = CTypeDecl -> RWM [CRule]


Naming

Constructors:

  • Naming :: String -> String -> String -> Naming

    Fields:

    • rwBaseModuleName :: String
    • rwClassName :: String
    • rwParametrizedModuleName :: String

Exported operations:

rwNaming :: Naming  Deterministic 

Default naming for the ReadWrite code generation

Further infos:
  • solution complete, i.e., able to compute all solutions

get :: RWM Runtime  Deterministic 

put :: Runtime -> RWM ()  Deterministic 

getModuleName :: RWM String  Deterministic 

logIllTypedDefinition :: String -> RWM ()  Deterministic 

getIllTypedDefinitions :: Runtime -> [String]  Deterministic 

logError :: String -> RWM ()  Deterministic 

getErrors :: Runtime -> [String]  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions