| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Language.Drasil.Constraint
Description
Defines types and functions for constrained values.
Synopsis
- data Constraint a where
- Range :: ConstraintReason -> RealInterval a a -> Constraint a
 - Elem :: ConstraintReason -> a -> Constraint a
 
 - type ConstraintE = Constraint Expr
 - data ConstraintReason
 - physRange :: RealInterval Expr Expr -> ConstraintE
 - sfwrRange :: RealInterval Expr Expr -> ConstraintE
 - physElem :: Expr -> ConstraintE
 - sfwrElem :: Expr -> ConstraintE
 - isPhysC :: Constraint e -> Bool
 - isSfwrC :: Constraint e -> Bool
 
Types
data Constraint a where Source #
Constructors
| Range :: ConstraintReason -> RealInterval a a -> Constraint a | By default, physical and software constraints are ranges.  | 
| Elem :: ConstraintReason -> a -> Constraint a | 
type ConstraintE = Constraint Expr Source #
Type synonym for ConstraintE
data ConstraintReason Source #
The reason behind the constraint's existence.
Functions
physRange :: RealInterval Expr Expr -> ConstraintE Source #
Smart constructor for range of Physical constraints between two given expressions.
sfwrRange :: RealInterval Expr Expr -> ConstraintE Source #
Smart constructor for range of Software constraints between two given expressions.
physElem :: Expr -> ConstraintE Source #
sfwrElem :: Expr -> ConstraintE Source #