Copyright | (c) NoviSci Inc 2020 |
---|---|
License | BSD3 |
Maintainer | bsaul@novisci.com |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- data Context
- context :: Concepts -> Context
- emptyContext :: Context
- data Concept
- data Concepts
- toConcepts :: Set Concept -> Concepts
- fromConcepts :: Concepts -> Set Concept
- packConcept :: Text -> Concept
- unpackConcept :: Concept -> Text
- packConcepts :: [Text] -> Concepts
- unpackConcepts :: Concepts -> [Text]
- class HasConcept a where
- hasConcept :: a -> Text -> Bool
- hasConcepts :: a -> [Text] -> Bool
- hasAllConcepts :: a -> [Text] -> Bool
Documentation
A Context
consists of three parts: concepts
, facts
, and source
.
At this time, facts
and source
are simply stubs to be fleshed out in
later versions of hasklepias.
Instances
Eq Context Source # | |
Show Context Source # | |
Semigroup Context Source # | |
Monoid Context Source # | |
Arbitrary Context Source # | |
FromJSON Context Source # | |
HasConcept Context Source # | |
Defined in Hasklepias.Types.Context | |
Arbitrary (Interval a) => Arbitrary (Event a) Source # | |
FromJSON (Event Int) Source # | |
FromJSON (Event Day) Source # | |
HasConcept (Event a) Source # | |
Defined in Hasklepias.Types.Event | |
Defineable (Events a) Source # | |
Defined in Hasklepias.Types.Feature define :: (Events a -> FeatureData d) -> FeatureDefinition (Events a) d Source # eval :: FeatureDefinition (Events a) d -> Events a -> FeatureData d Source # | |
Defineable (FeatureData e, Events a) Source # | |
Defined in Hasklepias.Types.Feature define :: ((FeatureData e, Events a) -> FeatureData d) -> FeatureDefinition (FeatureData e, Events a) d Source # eval :: FeatureDefinition (FeatureData e, Events a) d -> (FeatureData e, Events a) -> FeatureData d Source # |
emptyContext :: Context Source #
Just an empty Context
A Concept
is textual "tag" for a context.
Instances
Eq Concepts Source # | |
Show Concepts Source # | |
Semigroup Concepts Source # | |
Monoid Concepts Source # | |
FromJSON Concepts Source # | |
HasConcept Concepts Source # | |
Defined in Hasklepias.Types.Context | |
(Ord a, Show a, Arbitrary (Interval a)) => Arbitrary (ConceptEvent a) Source # | |
Defined in Hasklepias.Types.Event.Arbitrary arbitrary :: Gen (ConceptEvent a) # shrink :: ConceptEvent a -> [ConceptEvent a] # | |
HasConcept (ConceptEvent a) Source # | |
Defined in Hasklepias.Types.Event hasConcept :: ConceptEvent a -> Text -> Bool Source # hasConcepts :: ConceptEvent a -> [Text] -> Bool Source # hasAllConcepts :: ConceptEvent a -> [Text] -> Bool Source # |
packConcept :: Text -> Concept Source #
Pack text into a concept
unpackConcept :: Concept -> Text Source #
Unpack text from a concept
packConcepts :: [Text] -> Concepts Source #
Put a list of text into a set concepts.
unpackConcepts :: Concepts -> [Text] Source #
Take a set of concepts to a list of text.
class HasConcept a where Source #
The HasConcept
typeclass provides predicate functions for determining whether
an a
has a concept.
hasConcept :: a -> Text -> Bool Source #
Does an a
have a particular Concept
?
hasConcepts :: a -> [Text] -> Bool Source #
Does an a
have *any* of a list of Concept
s?
hasAllConcepts :: a -> [Text] -> Bool Source #
Does an a
have *all* of a list of Concept
s?
Instances
HasConcept Concepts Source # | |
Defined in Hasklepias.Types.Context | |
HasConcept Context Source # | |
Defined in Hasklepias.Types.Context | |
HasConcept (ConceptEvent a) Source # | |
Defined in Hasklepias.Types.Event hasConcept :: ConceptEvent a -> Text -> Bool Source # hasConcepts :: ConceptEvent a -> [Text] -> Bool Source # hasAllConcepts :: ConceptEvent a -> [Text] -> Bool Source # | |
HasConcept (Event a) Source # | |
Defined in Hasklepias.Types.Event |