unique-logic-0.4: Solve simple simultaneous equations

Safe HaskellSafe
LanguageHaskell98

UniqueLogic.ST.Duplicate

Description

This module provides several ways to cope with over-determined values.

Synopsis

Documentation

class C a where Source #

Minimal complete definition

accept

Methods

accept :: a -> a -> Bool Source #

Instances

Eq a => C (Verify a) Source # 

Methods

accept :: Verify a -> Verify a -> Bool Source #

C (Forbid a) Source # 

Methods

accept :: Forbid a -> Forbid a -> Bool Source #

C (Ignore a) Source # 

Methods

accept :: Ignore a -> Ignore a -> Bool Source #

Eq a => C (TrackedNumber a) Source # 
(C a, C b) => C (a, b) Source # 

Methods

accept :: (a, b) -> (a, b) -> Bool Source #

(C a, C b, C c) => C (a, b, c) Source # 

Methods

accept :: (a, b, c) -> (a, b, c) -> Bool Source #

accept :: C a => a -> a -> Bool Source #

newtype Ignore a Source #

Ignore duplicate ways to determine a variable. The chosen value depends on the particular algorithm.

Constructors

Ignore a 

Instances

Eq a => Eq (Ignore a) Source # 

Methods

(==) :: Ignore a -> Ignore a -> Bool #

(/=) :: Ignore a -> Ignore a -> Bool #

Floating a => Floating (Ignore a) Source # 

Methods

pi :: Ignore a #

exp :: Ignore a -> Ignore a #

log :: Ignore a -> Ignore a #

sqrt :: Ignore a -> Ignore a #

(**) :: Ignore a -> Ignore a -> Ignore a #

logBase :: Ignore a -> Ignore a -> Ignore a #

sin :: Ignore a -> Ignore a #

cos :: Ignore a -> Ignore a #

tan :: Ignore a -> Ignore a #

asin :: Ignore a -> Ignore a #

acos :: Ignore a -> Ignore a #

atan :: Ignore a -> Ignore a #

sinh :: Ignore a -> Ignore a #

cosh :: Ignore a -> Ignore a #

tanh :: Ignore a -> Ignore a #

asinh :: Ignore a -> Ignore a #

acosh :: Ignore a -> Ignore a #

atanh :: Ignore a -> Ignore a #

log1p :: Ignore a -> Ignore a #

expm1 :: Ignore a -> Ignore a #

log1pexp :: Ignore a -> Ignore a #

log1mexp :: Ignore a -> Ignore a #

Fractional a => Fractional (Ignore a) Source # 

Methods

(/) :: Ignore a -> Ignore a -> Ignore a #

recip :: Ignore a -> Ignore a #

fromRational :: Rational -> Ignore a #

Num a => Num (Ignore a) Source # 

Methods

(+) :: Ignore a -> Ignore a -> Ignore a #

(-) :: Ignore a -> Ignore a -> Ignore a #

(*) :: Ignore a -> Ignore a -> Ignore a #

negate :: Ignore a -> Ignore a #

abs :: Ignore a -> Ignore a #

signum :: Ignore a -> Ignore a #

fromInteger :: Integer -> Ignore a #

Ord a => Ord (Ignore a) Source # 

Methods

compare :: Ignore a -> Ignore a -> Ordering #

(<) :: Ignore a -> Ignore a -> Bool #

(<=) :: Ignore a -> Ignore a -> Bool #

(>) :: Ignore a -> Ignore a -> Bool #

(>=) :: Ignore a -> Ignore a -> Bool #

max :: Ignore a -> Ignore a -> Ignore a #

min :: Ignore a -> Ignore a -> Ignore a #

Show a => Show (Ignore a) Source # 

Methods

showsPrec :: Int -> Ignore a -> ShowS #

show :: Ignore a -> String #

showList :: [Ignore a] -> ShowS #

C (Ignore a) Source # 

Methods

accept :: Ignore a -> Ignore a -> Bool Source #

newtype Forbid a Source #

Duplicate ways to determine a variable value are always considered an error. If you use Rules or Expressions this is not a good idea, since every rule is over-determined.

Constructors

Forbid a 

Instances

Eq a => Eq (Forbid a) Source # 

Methods

(==) :: Forbid a -> Forbid a -> Bool #

(/=) :: Forbid a -> Forbid a -> Bool #

Floating a => Floating (Forbid a) Source # 

Methods

pi :: Forbid a #

exp :: Forbid a -> Forbid a #

log :: Forbid a -> Forbid a #

sqrt :: Forbid a -> Forbid a #

(**) :: Forbid a -> Forbid a -> Forbid a #

logBase :: Forbid a -> Forbid a -> Forbid a #

sin :: Forbid a -> Forbid a #

cos :: Forbid a -> Forbid a #

tan :: Forbid a -> Forbid a #

asin :: Forbid a -> Forbid a #

acos :: Forbid a -> Forbid a #

atan :: Forbid a -> Forbid a #

sinh :: Forbid a -> Forbid a #

cosh :: Forbid a -> Forbid a #

tanh :: Forbid a -> Forbid a #

asinh :: Forbid a -> Forbid a #

acosh :: Forbid a -> Forbid a #

atanh :: Forbid a -> Forbid a #

log1p :: Forbid a -> Forbid a #

expm1 :: Forbid a -> Forbid a #

log1pexp :: Forbid a -> Forbid a #

log1mexp :: Forbid a -> Forbid a #

Fractional a => Fractional (Forbid a) Source # 

Methods

(/) :: Forbid a -> Forbid a -> Forbid a #

recip :: Forbid a -> Forbid a #

fromRational :: Rational -> Forbid a #

Num a => Num (Forbid a) Source # 

Methods

(+) :: Forbid a -> Forbid a -> Forbid a #

(-) :: Forbid a -> Forbid a -> Forbid a #

(*) :: Forbid a -> Forbid a -> Forbid a #

negate :: Forbid a -> Forbid a #

abs :: Forbid a -> Forbid a #

signum :: Forbid a -> Forbid a #

fromInteger :: Integer -> Forbid a #

Ord a => Ord (Forbid a) Source # 

Methods

compare :: Forbid a -> Forbid a -> Ordering #

(<) :: Forbid a -> Forbid a -> Bool #

(<=) :: Forbid a -> Forbid a -> Bool #

(>) :: Forbid a -> Forbid a -> Bool #

(>=) :: Forbid a -> Forbid a -> Bool #

max :: Forbid a -> Forbid a -> Forbid a #

min :: Forbid a -> Forbid a -> Forbid a #

Show a => Show (Forbid a) Source # 

Methods

showsPrec :: Int -> Forbid a -> ShowS #

show :: Forbid a -> String #

showList :: [Forbid a] -> ShowS #

C (Forbid a) Source # 

Methods

accept :: Forbid a -> Forbid a -> Bool Source #

newtype Verify a Source #

Duplicate ways to determine a variable value are allowed as long as every way yields the same result. "Same" is meant with respect to the Eq class.

Constructors

Verify a 

Instances

Eq a => Eq (Verify a) Source # 

Methods

(==) :: Verify a -> Verify a -> Bool #

(/=) :: Verify a -> Verify a -> Bool #

Floating a => Floating (Verify a) Source # 

Methods

pi :: Verify a #

exp :: Verify a -> Verify a #

log :: Verify a -> Verify a #

sqrt :: Verify a -> Verify a #

(**) :: Verify a -> Verify a -> Verify a #

logBase :: Verify a -> Verify a -> Verify a #

sin :: Verify a -> Verify a #

cos :: Verify a -> Verify a #

tan :: Verify a -> Verify a #

asin :: Verify a -> Verify a #

acos :: Verify a -> Verify a #

atan :: Verify a -> Verify a #

sinh :: Verify a -> Verify a #

cosh :: Verify a -> Verify a #

tanh :: Verify a -> Verify a #

asinh :: Verify a -> Verify a #

acosh :: Verify a -> Verify a #

atanh :: Verify a -> Verify a #

log1p :: Verify a -> Verify a #

expm1 :: Verify a -> Verify a #

log1pexp :: Verify a -> Verify a #

log1mexp :: Verify a -> Verify a #

Fractional a => Fractional (Verify a) Source # 

Methods

(/) :: Verify a -> Verify a -> Verify a #

recip :: Verify a -> Verify a #

fromRational :: Rational -> Verify a #

Num a => Num (Verify a) Source # 

Methods

(+) :: Verify a -> Verify a -> Verify a #

(-) :: Verify a -> Verify a -> Verify a #

(*) :: Verify a -> Verify a -> Verify a #

negate :: Verify a -> Verify a #

abs :: Verify a -> Verify a #

signum :: Verify a -> Verify a #

fromInteger :: Integer -> Verify a #

Ord a => Ord (Verify a) Source # 

Methods

compare :: Verify a -> Verify a -> Ordering #

(<) :: Verify a -> Verify a -> Bool #

(<=) :: Verify a -> Verify a -> Bool #

(>) :: Verify a -> Verify a -> Bool #

(>=) :: Verify a -> Verify a -> Bool #

max :: Verify a -> Verify a -> Verify a #

min :: Verify a -> Verify a -> Verify a #

Show a => Show (Verify a) Source # 

Methods

showsPrec :: Int -> Verify a -> ShowS #

show :: Verify a -> String #

showList :: [Verify a] -> ShowS #

Eq a => C (Verify a) Source # 

Methods

accept :: Verify a -> Verify a -> Bool Source #