unique-logic-tf-0.4.1.2: Solve simple simultaneous equations

Safe HaskellSafe
LanguageHaskell98

UniqueLogic.ST.TF.System.Simple

Contents

Synopsis

Preparation

Posing statements

constant :: a -> T s (Variable s a) Source

assignment2 :: C w => (a -> b) -> Variable w s a -> Variable w s b -> T w s () Source

assignment3 :: C w => (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s () Source

data Apply w s a Source

Instances

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 (,).

runApply :: C w => Apply w s a -> Variable w s a -> T w s () Source

Solution

solve :: T s a -> ST s a Source

query :: Variable s a -> ST s (Maybe a) Source