Safe Haskell | None |
---|---|
Language | Haskell2010 |
FlexTask.Interpreter
Description
Synopsis
- checkSolution :: String -> String -> String -> String -> String -> [(String, String)] -> String -> FilePath -> IO (Either InterpreterError ([Output], Maybe (Maybe Rational, [Output])))
- genFlexInst :: FlexConf -> (Gen GenOutput -> a -> GenOutput) -> a -> IO FlexInst
- prettyError :: InterpreterError -> String
- validateSettings :: String -> String -> [(String, String)] -> IO (Either InterpreterError [Output])
- validDescription :: forall (m :: Type -> Type). OutputCapable m => String -> String -> String -> String -> [(String, String)] -> FilePath -> IO (LangM m)
Documentation
Arguments
:: String | Data made available to checker functions |
-> String | Global module |
-> String | Module containing configuration options |
-> String | Module containing parseSubmission |
-> String | Module containing checkSyntax and checkSemantics |
-> [(String, String)] | Additional code modules |
-> String | Student solution |
-> FilePath | Path images will be stored in |
-> IO (Either InterpreterError ([Output], Maybe (Maybe Rational, [Output]))) |
Use task data and interpret three code modules to evaluate a submission. The submission ist parsed by function parseSubmission. The result is evaluated by functions checkSyntax and checkSemantics. The result is a tuple of syntax feedback and optional semantics feedback. If the syntax check fails, then no semantics feedback is provided. Semantics feedback is coupled with a rating given as a Rational (0 to 1).
Arguments
:: FlexConf | |
-> (Gen GenOutput -> a -> GenOutput) | Method of running the random generator |
-> a | Generator seed |
-> IO FlexInst |
Use a FlexConf
to generate a FlexInst
.
Interprets taskDataModule
to generate the input form and task data.
Apply the given method to run the generator with a seed.
prettyError :: InterpreterError -> String Source #
Custom display of Hint InterpreterError messages.
Arguments
:: String | Global module |
-> String | Module containing configuration options |
-> [(String, String)] | Additional code modules |
-> IO (Either InterpreterError [Output]) |
Arguments
:: forall (m :: Type -> Type). OutputCapable m | |
=> String | Data available for making the description |
-> String | Global module |
-> String | Settings module |
-> String | Module containing the description function |
-> [(String, String)] | Additional code modules |
-> FilePath | Path images will be stored in |
-> IO (LangM m) |
|
Produce the task description by using task data and two interpreted modules or restore a cached result. Should the solution not yet exist on disc, then it will be created by interpreting description and saved in a file. If the task description already exists on disc, it is read. Then, if any of the image links of that description are invalid (have been deleted), the description is interpreted again to regenerate the missing files.