Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
- class Converter f where
- getExercise :: Converter f => f a s (Exercise a)
- getBaseUrl :: Converter f => f a s String
- 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
- hasJSONView :: Exercise a -> Maybe (View JSON a)
- addJSONView :: View JSON a -> Exercise a -> Exercise a
- jsonEncoding :: InJSON a => Exercise a -> Exercise a
- termToJSON :: Term -> JSON
- jsonToTerm :: JSON -> Term
- hasLatexEncoding :: Exercise a -> Bool
- latexPrinter :: Exercise a -> a -> Latex
- latexPrinterContext :: Exercise a -> Context a -> Latex
- latexEncoding :: ToLatex a => Exercise a -> Exercise a
- latexEncodingWith :: (a -> Latex) -> Exercise a -> Exercise a
- 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
getExercise :: Converter f => f a s (Exercise a) Source #
getBaseUrl :: Converter f => f a s String Source #
getRequest :: Converter f => f a s Request Source #
JSON support
termToJSON :: Term -> JSON Source #
jsonToTerm :: JSON -> Term Source #
Latex support
hasLatexEncoding :: Exercise a -> Bool Source #
latexPrinter :: Exercise a -> a -> Latex Source #
Uses exercise pretty-printer in case latex encoding is missing.
latexPrinterContext :: Exercise a -> Context a -> Latex Source #
Uses exercise pretty-printer in case latex encoding is missing.
Encoder datatype
Converter Encoder Source # | |
Arrow (Encoder a) Source # | |
Category * (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 #