TypeMachine.TM
Contents
type TM a = WriterT [TypeMachineLog] Q a Source #
The TM (*TypeMachine*) monad can:
TM
Q
runTM :: TM a -> Q a Source #
Execute a TM computation and issue logs using the Q monad
execTM :: TM a -> Q (a, [TypeMachineLog]) Source #
Runs a TM, returns the logs to issue and the computation result
addLog :: TypeMachineLog -> TM () Source #
Add a log message to issue
addLogs :: [TypeMachineLog] -> TM () Source #
toType :: Name -> TM Type Source #
Takes an ADT name, returns the Type for that ADT
Type
A utilitary function to use reifyType in the TM monad
reifyType