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

Safe HaskellNone
LanguageHaskell2010

Duckling.Resolve

Synopsis

Documentation

data Context Source #

Constructors

Context 

newtype DucklingTime Source #

Internal time reference. We work as if we were in UTC time and use ZoneSeriesTime to house the info. We convert to local time at resolution, using fromUTC.

class ToJSON (ResolvedValue a) => Resolve a where Source #

Minimal complete definition

resolve

Associated Types

type ResolvedValue a Source #

Methods

resolve :: Context -> a -> Maybe (ResolvedValue a) Source #

Instances

Resolve NumeralData Source # 
Resolve OrdinalData Source # 
Resolve PhoneNumberData Source # 
Resolve QuantityData Source # 
Resolve GroupMatch Source # 
Resolve TemperatureData Source # 
Resolve Grain Source # 

Associated Types

type ResolvedValue Grain :: * Source #

Resolve TimeData Source # 
Resolve UrlData Source # 

Associated Types

type ResolvedValue UrlData :: * Source #

Resolve VolumeData Source # 
Resolve EmailData Source # 
Resolve DurationData Source # 
Resolve DistanceData Source # 
Resolve AmountOfMoneyData Source # 

fromUTC :: UTCTime -> TimeZone -> ZonedTime Source #

Given a UTCTime and an TimeZone, build a ZonedTime (no conversion)

toUTC :: LocalTime -> UTCTime Source #

Given a LocalTime, build a UTCTime (no conversion)