ideas-1.8: Feedback services for intelligent tutoring systems

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

Ideas.Common.Rule.Parameter

Contents

Description

This module defines transformations. Given a term, a transformation returns a list of results (often a singleton list or the empty list). A transformation can be parameterized with one or more Bindables. Transformations rules can be lifted to work on more complex domains with the LiftView type class.

Synopsis

Reading inputs

input :: Ref i -> Trans (i, a) b -> Trans a b Source #

inputWith :: Trans a i -> Trans (i, a) b -> Trans a b Source #

transInput1 :: Ref i -> (i -> a -> Maybe b) -> Trans a b Source #

transInput2 :: Ref i1 -> Ref i2 -> (i1 -> i2 -> a -> Maybe b) -> Trans a b Source #

transInput3 :: Ref i1 -> Ref i2 -> Ref i3 -> (i1 -> i2 -> i3 -> a -> Maybe b) -> Trans a b Source #

transInputWith :: MakeTrans f => Trans a i -> (i -> a -> f b) -> Trans a b Source #

readRef2 :: Ref a -> Ref b -> Trans x (a, b) Source #

readRef3 :: Ref a -> Ref b -> Ref c -> Trans x (a, b, c) Source #

Writing outputs

output :: Ref o -> Trans a (b, o) -> Trans a b Source #

outputWith :: Trans o x -> Trans a (b, o) -> Trans a b Source #

outputOnly :: Ref o -> Trans a o -> Trans a a Source #

outputOnly2 :: Ref o1 -> Ref o2 -> Trans a (o1, o2) -> Trans a a Source #

outputOnly3 :: Ref o1 -> Ref o2 -> Ref o3 -> Trans a (o1, o2, o3) -> Trans a a Source #

outputOnlyWith :: Trans o x -> Trans a o -> Trans a a Source #

writeRef2 :: Ref a -> Ref b -> Trans (a, b) (a, b) Source #

writeRef3 :: Ref a -> Ref b -> Ref c -> Trans (a, b, c) (a, b, c) Source #

writeRef2_ :: Ref a -> Ref b -> Trans (a, b) () Source #

writeRef3_ :: Ref a -> Ref b -> Ref c -> Trans (a, b, c) () Source #

Named parameters

type ParamTrans i a = Trans (i, a) a Source #

parameter1 :: Ref a -> (a -> b -> Maybe b) -> ParamTrans a b Source #

parameter2 :: Ref a -> Ref b -> (a -> b -> c -> Maybe c) -> ParamTrans (a, b) c Source #

parameter3 :: Ref a -> Ref b -> Ref c -> (a -> b -> c -> d -> Maybe d) -> ParamTrans (a, b, c) d Source #

transRef :: Ref a -> Trans a a Source #