Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Number space types and functions.
Synopsis
- data Space
- type Primitive = Space
- data RealInterval a b where
- Bounded :: (Inclusive, a) -> (Inclusive, b) -> RealInterval a b
- UpTo :: (Inclusive, a) -> RealInterval a b
- UpFrom :: (Inclusive, b) -> RealInterval a b
- data Inclusive
- data DomainDesc (tplgy :: RTopology) a b where
- BoundedDD :: Symbol -> RTopology -> a -> b -> DomainDesc 'Discrete a b
- AllDD :: Symbol -> RTopology -> DomainDesc 'Continuous a b
- data RTopology
- type DiscreteDomainDesc a b = DomainDesc 'Discrete a b
- type ContinuousDomainDesc a b = DomainDesc 'Continuous a b
- class HasSpace c where
- getActorName :: Space -> String
- getInnerSpace :: Space -> Space
- mkFunction :: [Primitive] -> Primitive -> Space
- isBasicNumSpace :: Space -> Bool
Types
The difference kinds of spaces that may exist. This type holds numerical spaces (such as the set of integers, rationals, etc.), a space for booleans, a space for characters, dimensional spaces (vectors, arrays, etc.), a space for Actors, discrete sets (both for numbers and strings), and a void space.
Integer | |
Rational | |
Real | |
Natural | |
Boolean | |
Char | |
String | |
Vect Space | |
Set Space | |
Matrix Int Int Space | |
Array Space | |
Actor String | |
Function (NonEmpty Primitive) Primitive | |
Void |
Instances
Show Space Source # | |
Eq Space Source # | |
Typed Expr Space Source # | |
Typed Literal Space Source # | |
RequiresChecking DifferentialModel Expr Space Source # | |
Defined in Language.Drasil.Chunk.DifferentialModel requiredChecks :: DifferentialModel -> [(Expr, Space)] Source # | |
RequiresChecking (QDefinition Expr) Expr Space Source # | |
Defined in Language.Drasil.Chunk.Eq requiredChecks :: QDefinition Expr -> [(Expr, Space)] Source # |
data RealInterval a b where Source #
A RealInterval is a subset of Space
(as a Space
).
These come in different flavours.
For now, we embed Expr
for the bounds, but that will change as well.
Bounded | |
| |
UpTo | |
| |
UpFrom | |
|
data DomainDesc (tplgy :: RTopology) a b where Source #
Describes the domain of a Symbol
given a topology. Can be bounded or encase all of the domain.
BoundedDD :: Symbol -> RTopology -> a -> b -> DomainDesc 'Discrete a b | |
AllDD :: Symbol -> RTopology -> DomainDesc 'Continuous a b |
type DiscreteDomainDesc a b = DomainDesc 'Discrete a b Source #
type ContinuousDomainDesc a b = DomainDesc 'Continuous a b Source #
Class
class HasSpace c where Source #
HasSpace is anything which has a Space
.
Instances
Functions
isBasicNumSpace :: Space -> Bool Source #
Is this Space a basic numeric space?