unique-logic-0.4.0.1: Solve simple simultaneous equations
Safe HaskellSafe-Inferred
LanguageHaskell98

UniqueLogic.ST.Duplicate

Description

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

Synopsis

Documentation

class C a Source #

Minimal complete definition

accept

Instances

Instances details
C (Forbid a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

C (Ignore a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

Eq a => C (Verify a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

Eq a => C (TrackedNumber a) Source # 
Instance details

Defined in UniqueLogic.ST.Example.Verify

(C a, C b) => C (a, b) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

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

Defined in UniqueLogic.ST.Duplicate

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

Instances details
Floating a => Floating (Ignore a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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 #

Num a => Num (Ignore a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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 #

Fractional a => Fractional (Ignore a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

recip :: Ignore a -> Ignore a #

fromRational :: Rational -> Ignore a #

Show a => Show (Ignore a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

show :: Ignore a -> String #

showList :: [Ignore a] -> ShowS #

Eq a => Eq (Ignore a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

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

Ord a => Ord (Ignore a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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 #

C (Ignore a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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

Instances details
Floating a => Floating (Forbid a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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 #

Num a => Num (Forbid a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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 #

Fractional a => Fractional (Forbid a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

recip :: Forbid a -> Forbid a #

fromRational :: Rational -> Forbid a #

Show a => Show (Forbid a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

show :: Forbid a -> String #

showList :: [Forbid a] -> ShowS #

Eq a => Eq (Forbid a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

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

Ord a => Ord (Forbid a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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 #

C (Forbid a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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

Instances details
Floating a => Floating (Verify a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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 #

Num a => Num (Verify a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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 #

Fractional a => Fractional (Verify a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

recip :: Verify a -> Verify a #

fromRational :: Rational -> Verify a #

Show a => Show (Verify a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

show :: Verify a -> String #

showList :: [Verify a] -> ShowS #

Eq a => Eq (Verify a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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

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

Ord a => Ord (Verify a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

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 #

Eq a => C (Verify a) Source # 
Instance details

Defined in UniqueLogic.ST.Duplicate

Methods

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