Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Token = (Resolve a, Eq a, Hashable a, Show a, NFData a) => Token (Dimension a) a
- class (Show a, Typeable a) => CustomDimension a where
- type DimensionData a
- data Dimension a where
- RegexMatch :: Dimension GroupMatch
- AmountOfMoney :: Dimension AmountOfMoneyData
- Distance :: Dimension DistanceData
- Duration :: Dimension DurationData
- Email :: Dimension EmailData
- Numeral :: Dimension NumeralData
- Ordinal :: Dimension OrdinalData
- PhoneNumber :: Dimension PhoneNumberData
- Quantity :: Dimension QuantityData
- Temperature :: Dimension TemperatureData
- Time :: Dimension TimeData
- TimeGrain :: Dimension Grain
- Url :: Dimension UrlData
- Volume :: Dimension VolumeData
- CustomDimension :: CustomDimension a => a -> Dimension (DimensionData a)
- isDimension :: Dimension a -> Token -> Bool
- data ResolvedVal = (Resolve a, Eq (ResolvedValue a), Show (ResolvedValue a), ToJSON (ResolvedValue a)) => RVal (Dimension a) (ResolvedValue a)
- data Node = Node {}
- data ResolvedToken = Resolved {}
- data Candidate = Candidate ResolvedToken Double Bool
- data Range = Range Int Int
- type Production = [Token] -> Maybe Token
- type Predicate = Token -> Bool
- data PatternItem
- type Pattern = [PatternItem]
- data Rule = Rule {}
- data Entity = Entity {}
- toJText :: ToJSON x => x -> Text
- regex :: String -> PatternItem
- dimension :: Typeable a => Dimension a -> PatternItem
Documentation
class (Show a, Typeable a) => CustomDimension a where Source #
type DimensionData a Source #
data Dimension a where Source #
GADT for differentiating between dimensions Each dimension should have its own constructor and provide the data structure for its parsed data
data ResolvedVal Source #
(Resolve a, Eq (ResolvedValue a), Show (ResolvedValue a), ToJSON (ResolvedValue a)) => RVal (Dimension a) (ResolvedValue a) |
data ResolvedToken Source #
type Pattern = [PatternItem] Source #
regex :: String -> PatternItem Source #