Copyright | (c) NoviSci Inc 2020 |
---|---|
License | BSD3 |
Maintainer | bsaul@novisci.com |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- data Show b => FeatureSpec b f e d = MkFeatureSpec {
- getSpecName :: Text
- getSpecAttr :: b
- getDefn :: FeatureDefinition f e d
- data Show b => Feature b d = MkFeature {
- getName :: Text
- getAttr :: b
- getData :: FeatureData d
- newtype FeatureData d = MkFeatureData {}
- data MissingReason
- data FeatureDefinition f e d
- = FD0 (e -> FeatureData d)
- | FD1 (FeatureData e -> FeatureData d)
- | FD2 (FeatureData f -> FeatureData e -> FeatureData d)
- makeFeatureSpec :: Show b => Text -> b -> FeatureDefinition f e d -> FeatureSpec b f e d
- featureDataR :: d -> FeatureData d
- featureDataL :: MissingReason -> FeatureData d
- define0 :: (e -> FeatureData d) -> FeatureDefinition * e d
- define1 :: (e -> d) -> FeatureDefinition * e d
- define2 :: (f -> e -> d) -> FeatureDefinition f e d
- define2d :: (f -> e -> FeatureData d) -> FeatureDefinition f e d
- eval0 :: FeatureDefinition * e d -> e -> FeatureData d
- eval1 :: FeatureDefinition * e d -> FeatureData e -> FeatureData d
- eval2 :: FeatureDefinition f e d -> FeatureData f -> FeatureData e -> FeatureData d
- evalSpec0 :: Show b => FeatureSpec b * e d -> e -> Feature b d
- evalSpec1 :: Show b => FeatureSpec b * e d -> Feature b e -> Feature b d
- evalSpec2 :: Show b => FeatureSpec b f e d -> Feature b f -> Feature b e -> Feature b d
Types
data Show b => FeatureSpec b f e d Source #
A FeatureSpec
contains all the information needed to derive a Feature
:
* its name
* its attributes
* the function needed to derive a feature (i.e. the FeatureDefinition
)
MkFeatureSpec | |
|
data Show b => Feature b d Source #
A Feature
contains the following:
* a name
* its attributes
* FeatureData
newtype FeatureData d Source #
FeatureData
is
, where Either
MissingReason
dd
can be any type
of data derivable from Events
.
Instances
data MissingReason Source #
FeatureData
may be missing for any number of reasons.
Instances
data FeatureDefinition f e d Source #
A type to hold FeatureData definitions; i.e. functions that return features.
FD0 (e -> FeatureData d) | |
FD1 (FeatureData e -> FeatureData d) | |
FD2 (FeatureData f -> FeatureData e -> FeatureData d) |
makeFeatureSpec :: Show b => Text -> b -> FeatureDefinition f e d -> FeatureSpec b f e d Source #
TODO
featureDataR :: d -> FeatureData d Source #
Create the Right
side of FeatureData
.
featureDataL :: MissingReason -> FeatureData d Source #
Create the Left
side of FeatureData
.
define0 :: (e -> FeatureData d) -> FeatureDefinition * e d Source #
define1 :: (e -> d) -> FeatureDefinition * e d Source #
define2 :: (f -> e -> d) -> FeatureDefinition f e d Source #
define2d :: (f -> e -> FeatureData d) -> FeatureDefinition f e d Source #
eval0 :: FeatureDefinition * e d -> e -> FeatureData d Source #
eval1 :: FeatureDefinition * e d -> FeatureData e -> FeatureData d Source #
eval2 :: FeatureDefinition f e d -> FeatureData f -> FeatureData e -> FeatureData d Source #