Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Constraint z r c where
- (:==) :: Linear z r c k1 -> Linear z r c k2 -> Constraint z r c
- (:<=) :: Linear z r c k1 -> Linear z r c k2 -> Constraint z r c
- (:<) :: Linear z r c KZ -> Linear z r c KZ -> Constraint z r c
- (:>=) :: Linear z r c k1 -> Linear z r c k2 -> Constraint z r c
- (:>) :: Linear z r c KZ -> Linear z r c KZ -> Constraint z r c
- Between :: Linear z r c k1 -> Linear z r c k2 -> Linear z r c k3 -> Constraint z r c
- (:&&) :: Constraint z r c -> Constraint z r c -> Constraint z r c
- (:!) :: String -> Constraint z r c -> Constraint z r c
- CTrue :: Constraint z r c
Documentation
data Constraint z r c where Source #
Different kind of constraints.
These are not all necessary, but I have a hunch that keeping some structure may be helpful in the future.
Constructors:
:==
- Equality constraint
:<=
- Less than or equal
:<
- Strictly less than: this is only allowed for purely integer functions
:>=
- Greater than or equal
:>
- Strictly greater than: this is only allowed for purely integer functions
Between
Between a b c
is equivalent toa :<= b :&& b :<= c
:&&
- Conjunction of two constraints
:!
"name" :! constr
Annotate a constraint with a name, or other useless informationCTrue
- Trivially true constraint
(:==) :: Linear z r c k1 -> Linear z r c k2 -> Constraint z r c infix 5 | |
(:<=) :: Linear z r c k1 -> Linear z r c k2 -> Constraint z r c infix 5 | |
(:<) :: Linear z r c KZ -> Linear z r c KZ -> Constraint z r c infix 5 | |
(:>=) :: Linear z r c k1 -> Linear z r c k2 -> Constraint z r c infix 5 | |
(:>) :: Linear z r c KZ -> Linear z r c KZ -> Constraint z r c infix 5 | |
Between :: Linear z r c k1 -> Linear z r c k2 -> Linear z r c k3 -> Constraint z r c | |
(:&&) :: Constraint z r c -> Constraint z r c -> Constraint z r c infixr 3 | |
(:!) :: String -> Constraint z r c -> Constraint z r c infix 4 | |
CTrue :: Constraint z r c |
Instances
(Show z, Show r, Show (Z c), Show (R c)) => Show (Constraint z r c) Source # | |
Defined in Numeric.Limp.Program.Constraint showsPrec :: Int -> Constraint z r c -> ShowS # show :: Constraint z r c -> String # showList :: [Constraint z r c] -> ShowS # | |
Semigroup (Constraint z r c) Source # | |
Defined in Numeric.Limp.Program.Constraint (<>) :: Constraint z r c -> Constraint z r c -> Constraint z r c # sconcat :: NonEmpty (Constraint z r c) -> Constraint z r c # stimes :: Integral b => b -> Constraint z r c -> Constraint z r c # | |
Monoid (Constraint z r c) Source # | |
Defined in Numeric.Limp.Program.Constraint mempty :: Constraint z r c # mappend :: Constraint z r c -> Constraint z r c -> Constraint z r c # mconcat :: [Constraint z r c] -> Constraint z r c # |