Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
- class Converter f where
- fromOptions :: (Options a -> t) -> f a s t
- run :: Monad m => f a s t -> Options a -> s -> m t
- getExercise :: Converter f => f a s (Exercise a)
- getQCGen :: Converter f => f a s QCGen
- getScript :: Converter f => f a s Script
- getRequest :: Converter f => f a s Request
- withExercise :: (Converter f, Monad (f a s)) => (Exercise a -> f a s t) -> f a s t
- withOpenMath :: (Converter f, Monad (f a s)) => (Bool -> f a s t) -> f a s t
- withJSONTerm :: (Converter f, Monad (f a s)) => (Bool -> f a s t) -> f a s t
- (//) :: (Converter f, Monad (f a s2)) => f a s t -> s -> f a s2 t
- termToJSON :: Term -> JSON
- jsonToTerm :: JSON -> Term
- jsonTermView :: InJSON a => View Term a
- data Options a
- simpleOptions :: Exercise a -> Options a
- makeOptions :: DomainReasoner -> Request -> IO (Some Options)
- data Encoder a s t
- type TypedEncoder a = Encoder a (TypedValue (Type a))
- makeEncoder :: (s -> t) -> Encoder a s t
- encoderFor :: (s -> Encoder a s t) -> Encoder a s t
- exerciseEncoder :: (Exercise a -> s -> t) -> Encoder a s t
- (<?>) :: (Encoder a t b, Type a1 t) -> Encoder a (TypedValue (Type a1)) b -> Encoder a (TypedValue (Type a1)) b
- encodeTyped :: Encoder st t b -> Type a t -> Encoder st (TypedValue (Type a)) b
- data Decoder a s t
- type TypedDecoder a s = forall t. Type a t -> Decoder a s t
- makeDecoder :: (s -> t) -> Decoder a s t
- decoderFor :: (s -> Decoder a s t) -> Decoder a s t
- split :: (s -> Either String (t, s)) -> Decoder a s t
- symbol :: Decoder a [s] s
- setInput :: s -> Decoder a s ()
Converter type class
class Converter f where Source
fromOptions :: (Options a -> t) -> f a s t Source
getExercise :: Converter f => f a s (Exercise a) Source
getRequest :: Converter f => f a s Request 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
JSON terms
termToJSON :: Term -> JSON Source
jsonToTerm :: JSON -> Term Source
jsonTermView :: InJSON a => View Term a Source
Options
simpleOptions :: Exercise a -> Options a Source
makeOptions :: DomainReasoner -> Request -> IO (Some Options) Source
Encoder datatype
Converter Encoder Source | |
Category * (Encoder a) Source | |
Arrow (Encoder a) Source | |
Monad (Encoder a s) Source | |
Functor (Encoder a s) Source | |
Applicative (Encoder a s) Source | |
Alternative (Encoder a s) Source | |
MonadPlus (Encoder a s) Source | |
Monoid t => Monoid (Encoder a s t) Source | |
BuildXML t => BuildXML (Encoder a s t) Source |
type TypedEncoder a = Encoder a (TypedValue (Type a)) Source
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