Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Synopsis
- data Variable w s a
- globalVariable :: (C w, Value w a, C s) => SimpleUpdater w s a -> s (Variable w s a)
- class C w => C w
- update :: (C w, Value w a, C s) => Updater w s a
- simpleUpdate :: (C w, Value w a, C s) => SimpleUpdater w s a
- updateIfNew :: (C w, C s) => Updater w s a
- updateAndCheck :: (C w, C s) => (a -> a -> Wrap w s ()) -> Updater w s a
- class C t => Fragile t where
- class C w => Value w a
- data family ValueConstraint w a :: *
- valueConstraint :: Value w a => T s (Updates w s) -> T s (Maybe a) -> ValueConstraint w a
- data T w s a
- localVariable :: (C w, Value w a, C s) => T w s (Variable w s a)
- constant :: (C w, Value w a, C s) => a -> T w s (Variable w s a)
- assignment2 :: (C w, C s) => (a -> b) -> Variable w s a -> Variable w s b -> T w s ()
- assignment3 :: (C w, C s) => (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, C s) => Apply w s a -> Variable w s a -> T w s ()
- runApplyMaybe :: (C w, C s) => Apply w s (Maybe a) -> Variable w s a -> T w s ()
- solve :: (C w, C s) => T w s a -> w s a
- solveDepthFirst :: (C w, C s) => T w s a -> w s a
- solveBreadthFirst :: (C w, C s) => T w s a -> w s a
- query :: Variable w s a -> s (Maybe a)
Preparation
Handle duplicates
updateIfNew :: (C w, C s) => Updater w s a Source #
class C w => Value w a Source #
Instances
ToTrackedNumber tn => Value Track tn Source # | |
Defined in UniqueLogic.ST.TF.Example.Verify data ValueConstraint Track tn :: Type Source # valueConstraint :: T s (Updates Track s) -> T s (Maybe tn) -> ValueConstraint Track tn Source # | |
Monoid w => Value (WriterT w) a Source # | |
Defined in UniqueLogic.ST.TF.System data ValueConstraint (WriterT w) a :: Type Source # valueConstraint :: T s (Updates (WriterT w) s) -> T s (Maybe a) -> ValueConstraint (WriterT w) a Source # | |
Value (IdentityT :: (Type -> Type) -> Type -> Type) a Source # | |
Defined in UniqueLogic.ST.TF.System data ValueConstraint IdentityT a :: Type Source # valueConstraint :: T s (Updates IdentityT s) -> T s (Maybe a) -> ValueConstraint IdentityT a Source # | |
(Inconsistency e, Eq a) => Value (ExceptT e) a Source # | |
Defined in UniqueLogic.ST.TF.System data ValueConstraint (ExceptT e) a :: Type Source # valueConstraint :: T s (Updates (ExceptT e) s) -> T s (Maybe a) -> ValueConstraint (ExceptT e) a Source # |
data family ValueConstraint w a :: * Source #
Instances
data ValueConstraint Track tn Source # | |
Defined in UniqueLogic.ST.TF.Example.Verify data ValueConstraint Track tn where
| |
data ValueConstraint (WriterT w) a Source # | |
Defined in UniqueLogic.ST.TF.System | |
data ValueConstraint (IdentityT :: (Type -> Type) -> Type -> Type) a Source # | |
Defined in UniqueLogic.ST.TF.System | |
data ValueConstraint (ExceptT e) a Source # | |
Defined in UniqueLogic.ST.TF.System data ValueConstraint (ExceptT e) a where
|
valueConstraint :: Value w a => T s (Updates w s) -> T s (Maybe a) -> ValueConstraint w a Source #
Posing statements
assignment3 :: (C w, C s) => (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 (,)
.