ideas-1.5: Feedback services for intelligent tutoring systems

Maintainerbastiaan.heeren@ou.nl
Stabilityprovisional
Portabilityportable (depends on ghc)
Safe HaskellNone
LanguageHaskell98

Ideas.Encoding.Encoder

Contents

Description

 

Synopsis

Converter type class

class Converter f where Source

Methods

fromOptions :: (Options a -> t) -> f a s t Source

run :: Monad m => f a s t -> Options a -> s -> m t Source

withExercise :: (Converter f, Monad (f a s)) => (Exercise a -> f a s t) -> f a s t Source

withOpenMath :: (Converter f, Monad (f a s)) => (Bool -> f a s t) -> f a s t Source

withJSONTerm :: (Converter f, Monad (f a s)) => (Bool -> f a s t) -> f a s t Source

(//) :: (Converter f, Monad (f a s2)) => f a s t -> s -> f a s2 t Source

JSON terms

Options

Encoder datatype

makeEncoder :: (s -> t) -> Encoder a s t Source

encoderFor :: (s -> Encoder a s t) -> Encoder a s t Source

exerciseEncoder :: (Exercise a -> s -> t) -> Encoder a s t Source

(<?>) :: (Encoder a t b, Type a1 t) -> Encoder a (TypedValue (Type a1)) b -> Encoder a (TypedValue (Type a1)) b infixr 5 Source

encodeTyped :: Encoder st t b -> Type a t -> Encoder st (TypedValue (Type a)) b Source

Decoder datatype

type TypedDecoder a s = forall t. Type a t -> Decoder a s t Source

makeDecoder :: (s -> t) -> Decoder a s t Source

decoderFor :: (s -> Decoder a s t) -> Decoder a s t Source

split :: (s -> Either String (t, s)) -> Decoder a s t Source

symbol :: Decoder a [s] s Source

setInput :: s -> Decoder a s () Source