drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Constraint

Description

Defines types and functions for constrained values.

Synopsis

Types

data Constraint a where Source #

Holds constraints. May occur between an interval of Expr, a list of Doubles, or a list of Strings.

Constructors

Range :: ConstraintReason -> RealInterval a a -> Constraint a

By default, physical and software constraints are ranges.

data ConstraintReason Source #

The reason behind the constraint's existence.

Constructors

Physical 
Software 

Functions

physc :: RealInterval Expr Expr -> ConstraintE Source #

Smart constructor for range of Physical constraints between two given expressions.

sfwrc :: RealInterval Expr Expr -> ConstraintE Source #

Smart constructor for range of Software constraints between two given expressions.

isPhysC :: Constraint e -> Bool Source #

Helpful for filtering for Physical constraints. True if constraint is Physical.

isSfwrC :: Constraint e -> Bool Source #

Helpful for filtering for Software constraints. True if constraint is Software.