duckling-0.2.0.0: A Haskell library for parsing text into structured data.
Safe HaskellNone
LanguageHaskell2010

Duckling.Types

Synopsis

Documentation

data Token Source #

Constructors

forall a.(Resolve a, Eq a, Hashable a, Show a, NFData a) => Token (Dimension a) a 

Instances

Instances details
Eq Token Source # 
Instance details

Defined in Duckling.Types

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Show Token Source # 
Instance details

Defined in Duckling.Types

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Hashable Token Source # 
Instance details

Defined in Duckling.Types

Methods

hashWithSalt :: Int -> Token -> Int #

hash :: Token -> Int #

NFData Token Source # 
Instance details

Defined in Duckling.Types

Methods

rnf :: Token -> () #

data Seal s where Source #

Constructors

Seal :: s a -> Seal s 

Instances

Instances details
GEq s => Eq (Seal s) Source # 
Instance details

Defined in Duckling.Types

Methods

(==) :: Seal s -> Seal s -> Bool #

(/=) :: Seal s -> Seal s -> Bool #

GShow s => Show (Seal s) Source # 
Instance details

Defined in Duckling.Types

Methods

showsPrec :: Int -> Seal s -> ShowS #

show :: Seal s -> String #

showList :: [Seal s] -> ShowS #

Hashable (Seal Dimension) Source # 
Instance details

Defined in Duckling.Types

TextShow (Seal Dimension) Source # 
Instance details

Defined in Duckling.Types

withSeal :: Seal s -> (forall t. s t -> r) -> r Source #

class (Show a, Typeable a, Typeable (DimensionData a)) => CustomDimension a where Source #

Associated Types

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

Instances

Instances details
Show (Dimension a) Source # 
Instance details

Defined in Duckling.Types

Hashable (Dimension a) Source # 
Instance details

Defined in Duckling.Types

Methods

hashWithSalt :: Int -> Dimension a -> Int #

hash :: Dimension a -> Int #

Hashable (Seal Dimension) Source # 
Instance details

Defined in Duckling.Types

TextShow (Dimension a) Source # 
Instance details

Defined in Duckling.Types

TextShow (Seal Dimension) Source # 
Instance details

Defined in Duckling.Types

GShow Dimension Source # 
Instance details

Defined in Duckling.Types

Methods

gshowsPrec :: forall (a :: k). Int -> Dimension a -> ShowS #

GEq Dimension Source # 
Instance details

Defined in Duckling.Types

Methods

geq :: forall (a :: k) (b :: k). Dimension a -> Dimension b -> Maybe (a :~: b) #

data ResolvedVal Source #

Constructors

forall a.(Resolve a, Eq (ResolvedValue a), Show (ResolvedValue a), ToJSON (ResolvedValue a)) => RVal (Dimension a) (ResolvedValue a) 

Instances

Instances details
Eq ResolvedVal Source # 
Instance details

Defined in Duckling.Types

Show ResolvedVal Source # 
Instance details

Defined in Duckling.Types

data Node Source #

Constructors

Node 

Fields

Instances

Instances details
Eq Node Source # 
Instance details

Defined in Duckling.Types

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

Show Node Source # 
Instance details

Defined in Duckling.Types

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

Generic Node Source # 
Instance details

Defined in Duckling.Types

Associated Types

type Rep Node :: Type -> Type #

Methods

from :: Node -> Rep Node x #

to :: Rep Node x -> Node #

Hashable Node Source # 
Instance details

Defined in Duckling.Types

Methods

hashWithSalt :: Int -> Node -> Int #

hash :: Node -> Int #

NFData Node Source # 
Instance details

Defined in Duckling.Types

Methods

rnf :: Node -> () #

type Rep Node Source # 
Instance details

Defined in Duckling.Types

type Rep Node = D1 ('MetaData "Node" "Duckling.Types" "duckling-0.2.0.0-4AU1pRwMU7E8YjNdB7ILfy" 'False) (C1 ('MetaCons "Node" 'PrefixI 'True) ((S1 ('MetaSel ('Just "nodeRange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Range) :*: S1 ('MetaSel ('Just "token") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Token)) :*: (S1 ('MetaSel ('Just "children") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Node]) :*: S1 ('MetaSel ('Just "rule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

data Candidate Source #

Instances

Instances details
Eq Candidate Source # 
Instance details

Defined in Duckling.Types

Ord Candidate Source # 
Instance details

Defined in Duckling.Types

Show Candidate Source # 
Instance details

Defined in Duckling.Types

data Range Source #

Constructors

Range Int Int 

Instances

Instances details
Eq Range Source # 
Instance details

Defined in Duckling.Types

Methods

(==) :: Range -> Range -> Bool #

(/=) :: Range -> Range -> Bool #

Ord Range Source # 
Instance details

Defined in Duckling.Types

Methods

compare :: Range -> Range -> Ordering #

(<) :: Range -> Range -> Bool #

(<=) :: Range -> Range -> Bool #

(>) :: Range -> Range -> Bool #

(>=) :: Range -> Range -> Bool #

max :: Range -> Range -> Range #

min :: Range -> Range -> Range #

Show Range Source # 
Instance details

Defined in Duckling.Types

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

Generic Range Source # 
Instance details

Defined in Duckling.Types

Associated Types

type Rep Range :: Type -> Type #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

Hashable Range Source # 
Instance details

Defined in Duckling.Types

Methods

hashWithSalt :: Int -> Range -> Int #

hash :: Range -> Int #

NFData Range Source # 
Instance details

Defined in Duckling.Types

Methods

rnf :: Range -> () #

type Rep Range Source # 
Instance details

Defined in Duckling.Types

type Rep Range = D1 ('MetaData "Range" "Duckling.Types" "duckling-0.2.0.0-4AU1pRwMU7E8YjNdB7ILfy" 'False) (C1 ('MetaCons "Range" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data Rule Source #

Constructors

Rule 

Fields

Instances

Instances details
Show Rule Source # 
Instance details

Defined in Duckling.Types

Methods

showsPrec :: Int -> Rule -> ShowS #

show :: Rule -> String #

showList :: [Rule] -> ShowS #

data Entity Source #

Constructors

Entity 

Fields

Instances

Instances details
Eq Entity Source # 
Instance details

Defined in Duckling.Types

Methods

(==) :: Entity -> Entity -> Bool #

(/=) :: Entity -> Entity -> Bool #

Show Entity Source # 
Instance details

Defined in Duckling.Types

Generic Entity Source # 
Instance details

Defined in Duckling.Types

Associated Types

type Rep Entity :: Type -> Type #

Methods

from :: Entity -> Rep Entity x #

to :: Rep Entity x -> Entity #

ToJSON Entity Source # 
Instance details

Defined in Duckling.Types

type Rep Entity Source # 
Instance details

Defined in Duckling.Types

toJText :: ToJSON x => x -> Text Source #