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

Safe HaskellNone
LanguageHaskell2010

Duckling.Distance.Types

Documentation

data Unit Source #

Constructors

Foot 
Centimetre 
Kilometre 
Inch 
M 
Metre 
Mile 
Yard 

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.Distance.Types" "duckling-0.1.2.0-4kNLeMarmI05ZcZPmDT5Pl" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Foot" PrefixI False) U1) (C1 (MetaCons "Centimetre" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Kilometre" PrefixI False) U1) (C1 (MetaCons "Inch" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "M" PrefixI False) U1) (C1 (MetaCons "Metre" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Mile" PrefixI False) U1) (C1 (MetaCons "Yard" PrefixI False) U1))))

data DistanceData Source #

Constructors

DistanceData 

Fields

Instances

Eq DistanceData Source # 
Ord DistanceData Source # 
Show DistanceData Source # 
Generic DistanceData Source # 

Associated Types

type Rep DistanceData :: * -> * #

Hashable DistanceData Source # 
NFData DistanceData Source # 

Methods

rnf :: DistanceData -> () #

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