| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Language.Drasil.Code.Imperative.Logging
Synopsis
- logBody :: forall {k} r (typ :: k) (val :: k) (var :: k) (scope :: k) (stmt :: k) (bod :: k) (block :: k). (TypeSym r typ, Literal r val typ, VariableSym r var typ, VariableValue r var val, ScopeSym r scope, MultiStatement r stmt, DeclStatement r bod stmt var scope val, FileHandling r stmt var val, PrintFile r stmt val, BlockSym r block stmt, BodySym r bod block, VariableElim r var typ) => Label -> [VS (r var)] -> [MS (r block)] -> GenState (MS (r bod))
- loggedMethod :: forall {k} r (typ :: k) (val :: k) (var :: k) (scope :: k) (stmt :: k) (bod :: k) (block :: k). (TypeSym r typ, Literal r val typ, VariableSym r var typ, VariableValue r var val, ScopeSym r scope, MultiStatement r stmt, DeclStatement r bod stmt var scope val, FileHandling r stmt var val, PrintFile r stmt val, BlockSym r block stmt, VariableElim r var typ) => FilePath -> Label -> [VS (r var)] -> MS (r block)
- varLogFile :: forall {k} r (typ :: k) (var :: k). (TypeSym r typ, VariableSym r var typ) => VS (r var)
Documentation
logBody :: forall {k} r (typ :: k) (val :: k) (var :: k) (scope :: k) (stmt :: k) (bod :: k) (block :: k). (TypeSym r typ, Literal r val typ, VariableSym r var typ, VariableValue r var val, ScopeSym r scope, MultiStatement r stmt, DeclStatement r bod stmt var scope val, FileHandling r stmt var val, PrintFile r stmt val, BlockSym r block stmt, BodySym r bod block, VariableElim r var typ) => Label -> [VS (r var)] -> [MS (r block)] -> GenState (MS (r bod)) Source #
Generates the body of a function with the given name, list of parameters, and blocks to include in the body. If the user chose to turn on logging of function calls, statements that log how the function was called are added to the beginning of the body.
loggedMethod :: forall {k} r (typ :: k) (val :: k) (var :: k) (scope :: k) (stmt :: k) (bod :: k) (block :: k). (TypeSym r typ, Literal r val typ, VariableSym r var typ, VariableValue r var val, ScopeSym r scope, MultiStatement r stmt, DeclStatement r bod stmt var scope val, FileHandling r stmt var val, PrintFile r stmt val, BlockSym r block stmt, VariableElim r var typ) => FilePath -> Label -> [VS (r var)] -> MS (r block) Source #
Generates a block that logs, to the given FilePath, the name of a function,
and the names and values of the passed list of variables. Intended to be
used as the first block in the function, to log that it was called and what
inputs it was called with.
varLogFile :: forall {k} r (typ :: k) (var :: k). (TypeSym r typ, VariableSym r var typ) => VS (r var) Source #
The variable representing the log file in write mode.