Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- type Variable w = Variable (WriterT w)
- globalVariable :: (Monoid w, C a) => (a -> Writer w a) -> ST s (Variable w s a)
- type T w = T (WriterT w)
- localVariable :: (C w, C a) => T w s (Variable w s a)
- constant :: (C w, C a) => a -> T w s (Variable w s a)
- assignment2 :: C w => (a -> b) -> Variable w s a -> Variable w s b -> T w s ()
- assignment3 :: C w => (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s ()
- data Apply w s a
- arg :: Variable w s a -> Apply w s a
- runApply :: C w => Apply w s a -> Variable w s a -> T w s ()
- solve :: C w => T w s a -> w (ST s) a
- query :: Variable w s a -> ST s (Maybe a)
- queryForbid :: Variable w s (Forbid a) -> ST s (Maybe a)
- queryIgnore :: Variable w s (Ignore a) -> ST s (Maybe a)
- queryVerify :: Variable w s (Verify a) -> ST s (Maybe a)
Preparation
Posing statements
assignment3 :: C w => (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s () Source #
arg :: Variable w s a -> Apply w s a Source #
This function allows to generalize assignment2
and assignment3
to more arguments.
You could achieve the same with nested applications of assignment3 (,)
.