prolog-programming-task
Safe HaskellNone
LanguageHaskell2010

Prolog.Programming.Task

Synopsis

Documentation

checkTask :: MonadIO m => (forall a. Doc -> m a) -> (Doc -> m ()) -> (ByteString -> m ()) -> TaskInstance -> [ProgramClause] -> m () Source #

Runs the following checks in this order:

  1. Does the program parse?
  2. Does the program respect a configured ban of head/tail pattern-matching on lists?
  3. Are all required predicates-to-be-defined present?
  4. Is the specification (the tests) fulfilled by the program together with task and hidden predicates?
  5. Does the code analysis - minus dead code detection - run through without rejections?
  6. Is there no dead code?

The procedure aborts once the first check fails.

data TaskInstance Source #

Instances

Instances details
Reader TaskInstance Source # 
Instance details

Defined in Prolog.Programming.Types

ToDoc TaskInstance Source # 
Instance details

Defined in Prolog.Programming.Types

Generic TaskInstance Source # 
Instance details

Defined in Prolog.Programming.Types

Associated Types

type Rep TaskInstance 
Instance details

Defined in Prolog.Programming.Types

type Rep TaskInstance = D1 ('MetaData "TaskInstance" "Prolog.Programming.Types" "prolog-programming-task-0.1.0.0-7IUtSVNNcc2AE96f0GC5ls" 'False) (C1 ('MetaCons "TaskInstance" 'PrefixI 'True) ((S1 ('MetaSel ('Just "taskConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TaskConfig) :*: S1 ('MetaSel ('Just "sampleSolution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ProgramClause])) :*: (S1 ('MetaSel ('Just "taskDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Code) :*: (S1 ('MetaSel ('Just "visiblePredicates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ProgramClause]) :*: S1 ('MetaSel ('Just "hiddenPredicates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ProgramClause])))))
Show TaskInstance Source # 
Instance details

Defined in Prolog.Programming.Types

type Rep TaskInstance Source # 
Instance details

Defined in Prolog.Programming.Types

type Rep TaskInstance = D1 ('MetaData "TaskInstance" "Prolog.Programming.Types" "prolog-programming-task-0.1.0.0-7IUtSVNNcc2AE96f0GC5ls" 'False) (C1 ('MetaCons "TaskInstance" 'PrefixI 'True) ((S1 ('MetaSel ('Just "taskConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TaskConfig) :*: S1 ('MetaSel ('Just "sampleSolution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ProgramClause])) :*: (S1 ('MetaSel ('Just "taskDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Code) :*: (S1 ('MetaSel ('Just "visiblePredicates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ProgramClause]) :*: S1 ('MetaSel ('Just "hiddenPredicates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ProgramClause])))))