duckling-0.1.2.0: A Haskell library for parsing text into structured data.

Safe HaskellNone
LanguageHaskell2010

Duckling.Quantity.Types

Documentation

data Unit Source #

Instances

Eq Unit Source # 

Methods

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

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

Ord Unit Source # 

Methods

compare :: Unit -> Unit -> Ordering #

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

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

(>) :: Unit -> Unit -> Bool #

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

max :: Unit -> Unit -> Unit #

min :: Unit -> Unit -> Unit #

Show Unit Source # 

Methods

showsPrec :: Int -> Unit -> ShowS #

show :: Unit -> String #

showList :: [Unit] -> ShowS #

Generic Unit Source # 

Associated Types

type Rep Unit :: * -> * #

Methods

from :: Unit -> Rep Unit x #

to :: Rep Unit x -> Unit #

Hashable Unit Source # 

Methods

hashWithSalt :: Int -> Unit -> Int #

hash :: Unit -> Int #

ToJSON Unit Source # 
NFData Unit Source # 

Methods

rnf :: Unit -> () #

type Rep Unit Source # 
type Rep Unit = D1 (MetaData "Unit" "Duckling.Quantity.Types" "duckling-0.1.2.0-4kNLeMarmI05ZcZPmDT5Pl" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Bowl" PrefixI False) U1) (C1 (MetaCons "Cup" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Custom" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))) ((:+:) (C1 (MetaCons "Dish" PrefixI False) U1) (C1 (MetaCons "Gram" PrefixI False) U1)))) ((:+:) ((:+:) (C1 (MetaCons "Pint" PrefixI False) U1) ((:+:) (C1 (MetaCons "Pound" PrefixI False) U1) (C1 (MetaCons "Quart" PrefixI False) U1))) ((:+:) (C1 (MetaCons "Tablespoon" PrefixI False) U1) ((:+:) (C1 (MetaCons "Teaspoon" PrefixI False) U1) (C1 (MetaCons "Unnamed" PrefixI False) U1)))))

data QuantityData Source #

Constructors

QuantityData 

Fields

Instances

Eq QuantityData Source # 
Ord QuantityData Source # 
Show QuantityData Source # 
Generic QuantityData Source # 

Associated Types

type Rep QuantityData :: * -> * #

Hashable QuantityData Source # 
ToJSON QuantityData Source # 
NFData QuantityData Source # 

Methods

rnf :: QuantityData -> () #

Resolve QuantityData Source # 
type Rep QuantityData Source # 
type Rep QuantityData = D1 (MetaData "QuantityData" "Duckling.Quantity.Types" "duckling-0.1.2.0-4kNLeMarmI05ZcZPmDT5Pl" False) (C1 (MetaCons "QuantityData" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "unit") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Unit)) ((:*:) (S1 (MetaSel (Just Symbol "value") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)) (S1 (MetaSel (Just Symbol "product") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))))))
type ResolvedValue QuantityData Source #