| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Prolog.Programming.Task
Synopsis
- checkTask :: MonadIO m => (forall a. Doc -> m a) -> (Doc -> m ()) -> (ByteString -> m ()) -> TaskInstance -> [ProgramClause] -> m ()
- displaySampleSolution :: (Doc -> m ()) -> TaskInstance -> m ()
- exampleConfig :: Config
- verifyConfig :: (MonadFail m, MonadIO m) => Config -> m ()
- describeTask :: TaskInstance -> Doc
- taskDefinitions :: TaskInstance -> [Clause]
- taskDefinitionsIncluded :: TaskInstance -> Bool
- initialTask :: TaskInstance -> Code
- displaySWISHButton :: TaskInstance -> Bool
- data TaskInstance
- toInstance :: Config -> TaskInstance
Documentation
checkTask :: MonadIO m => (forall a. Doc -> m a) -> (Doc -> m ()) -> (ByteString -> m ()) -> TaskInstance -> [ProgramClause] -> m () Source #
Runs the following checks in this order:
- Does the program parse?
- Does the program respect a configured ban of head/tail pattern-matching on lists?
- Are all required predicates-to-be-defined present?
- Is the specification (the tests) fulfilled by the program together with task and hidden predicates?
- Does the code analysis - minus dead code detection - run through without rejections?
- Is there no dead code?
The procedure aborts once the first check fails.
displaySampleSolution :: (Doc -> m ()) -> TaskInstance -> m () Source #
describeTask :: TaskInstance -> Doc Source #
taskDefinitions :: TaskInstance -> [Clause] Source #
initialTask :: TaskInstance -> Code Source #
data TaskInstance Source #
Instances
toInstance :: Config -> TaskInstance Source #