monadiccp-0.7.7: Constraint Programming

Safe HaskellSafe
LanguageHaskell98

Data.Expr.Sugar

Contents

Synopsis

Documentation

(@+) :: (Eq t, Eq c, Eq b, ToExpr t c b p, ToExpr t c b q) => p -> q -> Expr t c b infixl 6 Source #

integer operators/functions | --

(@-) :: (Eq t, Eq c, Eq b, ToExpr t c b p, ToExpr t c b q) => p -> q -> Expr t c b infixl 6 Source #

(@*) :: (Eq t, Eq c, Eq b, ToExpr t c b p, ToExpr t c b q) => p -> q -> Expr t c b infixl 7 Source #

(@/) :: (Eq t, Eq c, Eq b, ToExpr t c b p, ToExpr t c b q) => p -> q -> Expr t c b infixl 7 Source #

(@%) :: (Eq t, Eq c, Eq b, ToExpr t c b p, ToExpr t c b q) => p -> q -> Expr t c b infixl 7 Source #

(@?) :: (Eq t, Eq c, Eq b) => BoolExpr t c b -> (Expr t c b, Expr t c b) -> Expr t c b infix 4 Source #

(@??) :: (Eq t, Eq c, Eq b) => BoolExpr t c b -> (BoolExpr t c b, BoolExpr t c b) -> BoolExpr t c b infix 4 Source #

(@:) :: ExprRange tt cc bb r => Expr tt cc bb -> r -> BoolExpr tt cc bb infix 5 Source #

(!) :: (Eq t, Eq c, Eq b) => ColExpr t c b -> Expr t c b -> Expr t c b infix 9 Source #

list operators/functions | --

(@!!) :: (Eq t, Eq c, Eq b) => ColExpr t c b -> Integer -> Expr t c b infix 9 Source #

(@++) :: (Eq t, Eq c, Eq b) => ColExpr t c b -> ColExpr t c b -> ColExpr t c b infixr 5 Source #

(@..) :: (Eq t, Eq c, Eq b) => Expr t c b -> Expr t c b -> ColExpr t c b infix 9 Source #

size :: (Eq t, Eq c, Eq b) => ColExpr t c b -> Expr t c b Source #

slice :: (Eq t, Eq c, Eq b) => ColExpr t c b -> ColExpr t c b -> ColExpr t c b Source #

xhead :: (Eq t, Eq c, Eq b, ToColExpr t c b p) => p -> Expr t c b Source #

xtail :: (Eq t, Eq c, Eq b, ToColExpr t c b p) => p -> ColExpr t c b Source #

xmap :: (Eq t, Eq c, Eq b) => (Expr t c b -> Expr t c b) -> ColExpr t c b -> ColExpr t c b Source #

xfold :: (Eq t, Eq c, Eq b) => (Expr t c b -> Expr t c b -> Expr t c b) -> Expr t c b -> ColExpr t c b -> Expr t c b Source #

list :: (Eq t, Eq c, Eq b) => [Expr t c b] -> ColExpr t c b Source #

channel :: (Eq t, Eq c, Eq b) => BoolExpr t c b -> Expr t c b Source #

xsum :: (Num (Expr t c b), Eq t, Eq c, Eq b) => ColExpr t c b -> Expr t c b Source #

(@||) :: (ToBoolExpr s c b1 b3, ToBoolExpr s c b1 b2, Eq b1, Eq c, Eq s) => b2 -> b3 -> BoolExpr s c b1 infixr 2 Source #

(@&&) :: (ToBoolExpr s c b1 b3, ToBoolExpr s c b1 b2, Eq b1, Eq c, Eq s) => b2 -> b3 -> BoolExpr s c b1 infixr 3 Source #

inv :: (Eq t, Eq c, Eq b, ToBoolExpr t c b p) => p -> BoolExpr t c b Source #

boolean operators/functions | --

(@/=) :: ExprClass tt cc bb a => a -> a -> BoolExpr tt cc bb Source #

(@>) :: (Eq t, Eq c, Eq b) => Expr t c b -> Expr t c b -> BoolExpr t c b infixr 4 Source #

(@<) :: (Eq t, Eq c, Eq b) => Expr t c b -> Expr t c b -> BoolExpr t c b infixr 4 Source #

(@>=) :: (Eq t, Eq c, Eq b) => Expr t c b -> Expr t c b -> BoolExpr t c b infixr 4 Source #

(@<=) :: (Eq t, Eq c, Eq b) => Expr t c b -> Expr t c b -> BoolExpr t c b infixr 4 Source #

(@=) :: ExprClass tt cc bb a => a -> a -> BoolExpr tt cc bb Source #

loopall :: (Eq t, Eq c, Eq b) => (Expr t c b, Expr t c b) -> (Expr t c b -> BoolExpr t c b) -> BoolExpr t c b Source #

loopany :: (Eq t, Eq c, Eq b) => (Expr t c b, Expr t c b) -> (Expr t c b -> BoolExpr t c b) -> BoolExpr t c b Source #

forall :: (Eq t, Eq c, Eq b) => ColExpr t c b -> (Expr t c b -> BoolExpr t c b) -> BoolExpr t c b Source #

forany :: (Eq t, Eq c, Eq b) => ColExpr t c b -> (Expr t c b -> BoolExpr t c b) -> BoolExpr t c b Source #

data Expr t c b Source #

Data types | --

Instances

ModelTermType ModelInt Source # 
(Eq b, Eq a, Eq t) => ToColExpr t a b [Expr t a b] Source # 

Methods

toColExpr :: [Expr t a b] -> ColExpr t a b Source #

(Eq t, Eq c, Eq b) => ExprRange t c b (Expr t c b, Expr t c b) Source # 

Methods

(@:) :: Expr t c b -> (Expr t c b, Expr t c b) -> BoolExpr t c b Source #

(Eq t, Eq c, Eq b) => ExprClass t c b (Expr t c b) Source #

relational operators/functions | --

Methods

(@=) :: Expr t c b -> Expr t c b -> BoolExpr t c b Source #

(@/=) :: Expr t c b -> Expr t c b -> BoolExpr t c b Source #

(Eq t, Eq a, Eq b) => ToColExpr t a b (Expr t a b) Source # 

Methods

toColExpr :: Expr t a b -> ColExpr t a b Source #

ToExpr t a b (Expr t a b) Source # 

Methods

toExpr :: Expr t a b -> Expr t a b Source #

FDSolver s => Term (FDInstance s) ModelInt Source # 

Associated Types

type Help (FDInstance s :: * -> *) ModelInt :: * Source #

(FDSolver s, EnumTerm s (FDIntTerm s)) => EnumTerm (FDInstance s) ModelInt Source # 
Eq (EGPar -> EGPar) # 

Methods

(==) :: (EGPar -> EGPar) -> (EGPar -> EGPar) -> Bool #

(/=) :: (EGPar -> EGPar) -> (EGPar -> EGPar) -> Bool #

Ord (EGPar -> EGPar) # 

Methods

compare :: (EGPar -> EGPar) -> (EGPar -> EGPar) -> Ordering #

(<) :: (EGPar -> EGPar) -> (EGPar -> EGPar) -> Bool #

(<=) :: (EGPar -> EGPar) -> (EGPar -> EGPar) -> Bool #

(>) :: (EGPar -> EGPar) -> (EGPar -> EGPar) -> Bool #

(>=) :: (EGPar -> EGPar) -> (EGPar -> EGPar) -> Bool #

max :: (EGPar -> EGPar) -> (EGPar -> EGPar) -> EGPar -> EGPar #

min :: (EGPar -> EGPar) -> (EGPar -> EGPar) -> EGPar -> EGPar #

Show (EGPar -> EGPar) # 

Methods

showsPrec :: Int -> (EGPar -> EGPar) -> ShowS #

show :: (EGPar -> EGPar) -> String #

showList :: [EGPar -> EGPar] -> ShowS #

(Eq t, Eq c, Eq b) => Eq (Expr t c b) Source # 

Methods

(==) :: Expr t c b -> Expr t c b -> Bool #

(/=) :: Expr t c b -> Expr t c b -> Bool #

(Ord s, Ord c, Ord b) => Ord (Expr s c b) Source # 

Methods

compare :: Expr s c b -> Expr s c b -> Ordering #

(<) :: Expr s c b -> Expr s c b -> Bool #

(<=) :: Expr s c b -> Expr s c b -> Bool #

(>) :: Expr s c b -> Expr s c b -> Bool #

(>=) :: Expr s c b -> Expr s c b -> Bool #

max :: Expr s c b -> Expr s c b -> Expr s c b #

min :: Expr s c b -> Expr s c b -> Expr s c b #

(Show t, Show c, Show b) => Show (Expr t c b) Source # 

Methods

showsPrec :: Int -> Expr t c b -> ShowS #

show :: Expr t c b -> String #

showList :: [Expr t c b] -> ShowS #

type Help (FDInstance s) ModelInt Source # 
type Help (FDInstance s) ModelInt = ()
type TermBaseType (FDInstance s) ModelInt Source # 

data ColExpr t c b Source #

Instances

ModelTermType ModelCol Source # 
(Eq t, Eq c, Eq b) => ExprRange t c b (ColExpr t c b) Source # 

Methods

(@:) :: Expr t c b -> ColExpr t c b -> BoolExpr t c b Source #

(Eq t, Eq c, Eq b) => ExprClass t c b (ColExpr t c b) Source # 

Methods

(@=) :: ColExpr t c b -> ColExpr t c b -> BoolExpr t c b Source #

(@/=) :: ColExpr t c b -> ColExpr t c b -> BoolExpr t c b Source #

ToColExpr t a b (ColExpr t a b) Source # 

Methods

toColExpr :: ColExpr t a b -> ColExpr t a b Source #

FDSolver s => Term (FDInstance s) ModelCol Source # 

Associated Types

type Help (FDInstance s :: * -> *) ModelCol :: * Source #

(Eq t, Eq c, Eq b) => Eq (ColExpr t c b) Source # 

Methods

(==) :: ColExpr t c b -> ColExpr t c b -> Bool #

(/=) :: ColExpr t c b -> ColExpr t c b -> Bool #

(Ord s, Ord c, Ord b) => Ord (ColExpr s c b) Source # 

Methods

compare :: ColExpr s c b -> ColExpr s c b -> Ordering #

(<) :: ColExpr s c b -> ColExpr s c b -> Bool #

(<=) :: ColExpr s c b -> ColExpr s c b -> Bool #

(>) :: ColExpr s c b -> ColExpr s c b -> Bool #

(>=) :: ColExpr s c b -> ColExpr s c b -> Bool #

max :: ColExpr s c b -> ColExpr s c b -> ColExpr s c b #

min :: ColExpr s c b -> ColExpr s c b -> ColExpr s c b #

(Show t, Show c, Show b) => Show (ColExpr t c b) Source # 

Methods

showsPrec :: Int -> ColExpr t c b -> ShowS #

show :: ColExpr t c b -> String #

showList :: [ColExpr t c b] -> ShowS #

type Help (FDInstance s) ModelCol Source # 
type Help (FDInstance s) ModelCol = ()

data BoolExpr t c b Source #

Instances

ModelTermType ModelBool Source # 
(Eq t, Eq c, Eq b) => ExprClass t c b (BoolExpr t c b) Source # 

Methods

(@=) :: BoolExpr t c b -> BoolExpr t c b -> BoolExpr t c b Source #

(@/=) :: BoolExpr t c b -> BoolExpr t c b -> BoolExpr t c b Source #

ToBoolExpr t a b (BoolExpr t a b) Source # 

Methods

toBoolExpr :: BoolExpr t a b -> BoolExpr t a b Source #

(Eq t, Eq a, Eq b) => ToExpr t a b (BoolExpr t a b) Source # 

Methods

toExpr :: BoolExpr t a b -> Expr t a b Source #

FDSolver s => Term (FDInstance s) ModelBool Source # 

Associated Types

type Help (FDInstance s :: * -> *) ModelBool :: * Source #

(FDSolver s, EnumTerm s (FDBoolTerm s)) => EnumTerm (FDInstance s) ModelBool Source # 
(Eq t, Eq c, Eq b) => Eq (BoolExpr t c b) Source # 

Methods

(==) :: BoolExpr t c b -> BoolExpr t c b -> Bool #

(/=) :: BoolExpr t c b -> BoolExpr t c b -> Bool #

(Ord s, Ord c, Ord b) => Ord (BoolExpr s c b) Source # 

Methods

compare :: BoolExpr s c b -> BoolExpr s c b -> Ordering #

(<) :: BoolExpr s c b -> BoolExpr s c b -> Bool #

(<=) :: BoolExpr s c b -> BoolExpr s c b -> Bool #

(>) :: BoolExpr s c b -> BoolExpr s c b -> Bool #

(>=) :: BoolExpr s c b -> BoolExpr s c b -> Bool #

max :: BoolExpr s c b -> BoolExpr s c b -> BoolExpr s c b #

min :: BoolExpr s c b -> BoolExpr s c b -> BoolExpr s c b #

(Show t, Show c, Show b) => Show (BoolExpr t c b) Source # 

Methods

showsPrec :: Int -> BoolExpr t c b -> ShowS #

show :: BoolExpr t c b -> String #

showList :: [BoolExpr t c b] -> ShowS #

type Help (FDInstance s) ModelBool Source # 
type Help (FDInstance s) ModelBool = ()
type TermBaseType (FDInstance s) ModelBool Source # 

class ToExpr tt cc bb t where Source #

convertion from/to expression types | --

Minimal complete definition

toExpr

Methods

toExpr :: t -> Expr tt cc bb Source #

Instances

ToExpr t a b t Source # 

Methods

toExpr :: t -> Expr t a b Source #

ToExpr tt cc bb Int Source # 

Methods

toExpr :: Int -> Expr tt cc bb Source #

ToExpr tt cc bb Integer Source # 

Methods

toExpr :: Integer -> Expr tt cc bb Source #

(Eq t, Eq a, Eq b) => ToExpr t a b (BoolExpr t a b) Source # 

Methods

toExpr :: BoolExpr t a b -> Expr t a b Source #

ToExpr t a b (Expr t a b) Source # 

Methods

toExpr :: Expr t a b -> Expr t a b Source #

class ToColExpr tt cc bb c where Source #

Minimal complete definition

toColExpr

Methods

toColExpr :: c -> ColExpr tt cc bb Source #

Instances

ToColExpr t a b a Source # 

Methods

toColExpr :: a -> ColExpr t a b Source #

(Eq b, Eq a, Eq t) => ToColExpr t a b [Expr t a b] Source # 

Methods

toColExpr :: [Expr t a b] -> ColExpr t a b Source #

(Eq t, Eq a, Eq b) => ToColExpr t a b (Expr t a b) Source # 

Methods

toColExpr :: Expr t a b -> ColExpr t a b Source #

ToColExpr t a b (ColExpr t a b) Source # 

Methods

toColExpr :: ColExpr t a b -> ColExpr t a b Source #

class ToBoolExpr tt cc bb b where Source #

Minimal complete definition

toBoolExpr

Methods

toBoolExpr :: b -> BoolExpr tt cc bb Source #

Instances

ToBoolExpr t a b b Source # 

Methods

toBoolExpr :: b -> BoolExpr t a b Source #

ToBoolExpr tt cc bb Bool Source # 

Methods

toBoolExpr :: Bool -> BoolExpr tt cc bb Source #

ToBoolExpr t a b (BoolExpr t a b) Source # 

Methods

toBoolExpr :: BoolExpr t a b -> BoolExpr t a b Source #

sorted :: (Eq b, Eq c, Eq s) => ColExpr s c b -> BoolExpr s c b Source #

sSorted :: (Eq b, Eq c, Eq s) => ColExpr s c b -> BoolExpr s c b Source #

allDiff :: (Eq b, Eq c, Eq s) => ColExpr s c b -> BoolExpr s c b Source #

allDiffD :: (Eq b, Eq c, Eq s) => ColExpr s c b -> BoolExpr s c b Source #

class (Eq tt, Eq cc, Eq bb) => ExprClass tt cc bb a where Source #

Minimal complete definition

(@=)

Methods

(@=) :: a -> a -> BoolExpr tt cc bb Source #

(@/=) :: a -> a -> BoolExpr tt cc bb Source #

Instances

(Eq t, Eq c, Eq b) => ExprClass t c b (ColExpr t c b) Source # 

Methods

(@=) :: ColExpr t c b -> ColExpr t c b -> BoolExpr t c b Source #

(@/=) :: ColExpr t c b -> ColExpr t c b -> BoolExpr t c b Source #

(Eq t, Eq c, Eq b) => ExprClass t c b (BoolExpr t c b) Source # 

Methods

(@=) :: BoolExpr t c b -> BoolExpr t c b -> BoolExpr t c b Source #

(@/=) :: BoolExpr t c b -> BoolExpr t c b -> BoolExpr t c b Source #

(Eq t, Eq c, Eq b) => ExprClass t c b (Expr t c b) Source #

relational operators/functions | --

Methods

(@=) :: Expr t c b -> Expr t c b -> BoolExpr t c b Source #

(@/=) :: Expr t c b -> Expr t c b -> BoolExpr t c b Source #

class (Eq tt, Eq cc, Eq bb) => ExprRange tt cc bb r where Source #

Minimal complete definition

(@:)

Methods

(@:) :: Expr tt cc bb -> r -> BoolExpr tt cc bb infix 5 Source #

Instances

(Eq t, Eq c, Eq b) => ExprRange t c b (Expr t c b, Expr t c b) Source # 

Methods

(@:) :: Expr t c b -> (Expr t c b, Expr t c b) -> BoolExpr t c b Source #

(Eq t, Eq c, Eq b) => ExprRange t c b (ColExpr t c b) Source # 

Methods

(@:) :: Expr t c b -> ColExpr t c b -> BoolExpr t c b Source #

Orphan instances

(Eq s, Eq c, Eq b) => Enum (Expr s c b) Source # 

Methods

succ :: Expr s c b -> Expr s c b #

pred :: Expr s c b -> Expr s c b #

toEnum :: Int -> Expr s c b #

fromEnum :: Expr s c b -> Int #

enumFrom :: Expr s c b -> [Expr s c b] #

enumFromThen :: Expr s c b -> Expr s c b -> [Expr s c b] #

enumFromTo :: Expr s c b -> Expr s c b -> [Expr s c b] #

enumFromThenTo :: Expr s c b -> Expr s c b -> Expr s c b -> [Expr s c b] #

(Ord s, Ord c, Ord b, Eq s, Eq c, Eq b, Show s, Show c, Show b) => Integral (Expr s c b) Source # 

Methods

quot :: Expr s c b -> Expr s c b -> Expr s c b #

rem :: Expr s c b -> Expr s c b -> Expr s c b #

div :: Expr s c b -> Expr s c b -> Expr s c b #

mod :: Expr s c b -> Expr s c b -> Expr s c b #

quotRem :: Expr s c b -> Expr s c b -> (Expr s c b, Expr s c b) #

divMod :: Expr s c b -> Expr s c b -> (Expr s c b, Expr s c b) #

toInteger :: Expr s c b -> Integer #

(Eq s, Eq c, Eq b, Show s, Show c, Show b) => Num (Expr s c b) Source #

Built-in class instances | --

Methods

(+) :: Expr s c b -> Expr s c b -> Expr s c b #

(-) :: Expr s c b -> Expr s c b -> Expr s c b #

(*) :: Expr s c b -> Expr s c b -> Expr s c b #

negate :: Expr s c b -> Expr s c b #

abs :: Expr s c b -> Expr s c b #

signum :: Expr s c b -> Expr s c b #

fromInteger :: Integer -> Expr s c b #

(Ord s, Ord c, Ord b, Eq s, Eq c, Eq b, Show s, Show c, Show b) => Real (Expr s c b) Source # 

Methods

toRational :: Expr s c b -> Rational #