Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
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.
- input :: Ref i -> Trans (i, a) b -> Trans a b
- inputWith :: Trans a i -> Trans (i, a) b -> Trans a b
- transInput1 :: Ref i -> (i -> a -> Maybe b) -> Trans a b
- transInput2 :: Ref i1 -> Ref i2 -> (i1 -> i2 -> a -> Maybe b) -> Trans a b
- transInput3 :: Ref i1 -> Ref i2 -> Ref i3 -> (i1 -> i2 -> i3 -> a -> Maybe b) -> Trans a b
- transInputWith :: MakeTrans f => Trans a i -> (i -> a -> f b) -> Trans a b
- readRef2 :: Ref a -> Ref b -> Trans x (a, b)
- readRef3 :: Ref a -> Ref b -> Ref c -> Trans x (a, b, c)
- output :: Ref o -> Trans a (b, o) -> Trans a b
- outputWith :: Trans o x -> Trans a (b, o) -> Trans a b
- outputOnly :: Ref o -> Trans a o -> Trans a a
- outputOnly2 :: Ref o1 -> Ref o2 -> Trans a (o1, o2) -> Trans a a
- outputOnly3 :: Ref o1 -> Ref o2 -> Ref o3 -> Trans a (o1, o2, o3) -> Trans a a
- outputOnlyWith :: Trans o x -> Trans a o -> Trans a a
- writeRef2 :: Ref a -> Ref b -> Trans (a, b) (a, b)
- writeRef3 :: Ref a -> Ref b -> Ref c -> Trans (a, b, c) (a, b, c)
- writeRef2_ :: Ref a -> Ref b -> Trans (a, b) ()
- writeRef3_ :: Ref a -> Ref b -> Ref c -> Trans (a, b, c) ()
- type ParamTrans i a = Trans (i, a) a
- parameter1 :: Ref a -> (a -> b -> Maybe b) -> ParamTrans a b
- parameter2 :: Ref a -> Ref b -> (a -> b -> c -> Maybe c) -> ParamTrans (a, b) c
- parameter3 :: Ref a -> Ref b -> Ref c -> (a -> b -> c -> d -> Maybe d) -> ParamTrans (a, b, c) d
- transRef :: Ref a -> Trans a a
- supplyParameters :: ParamTrans b a -> Trans a b -> Transformation (Context a)
Reading inputs
Writing outputs
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 #
supplyParameters :: ParamTrans b a -> Trans a b -> Transformation (Context a) Source #