Frames-0.1.2: Data frames For working with tabular data files

Safe HaskellNone
LanguageHaskell2010

Frames.ColumnTypeable

Synopsis

Documentation

data Parsed a Source

Constructors

Possibly a 
Definitely a 

Instances

Functor Parsed 
Eq a => Eq (Parsed a) 
Ord a => Ord (Parsed a) 
Show a => Show (Parsed a) 

class Parseable a where Source

Values that can be read from a Text with more or less discrimination.

Minimal complete definition

Nothing

Methods

parse :: (Functor m, MonadPlus m) => Text -> m (Parsed a) Source

Returns Nothing if a value of the given type can not be read; returns 'Just Possibly' if a value can be read, but is likely ambiguous (e.g. an empty string); returns 'Just Definitely' if a value can be read and is unlikely to be ambiguous."

discardConfidence :: Parsed a -> a Source

Discard any estimate of a parse's ambiguity.

parse' :: (Functor m, MonadPlus m, Parseable a) => Text -> m a Source

Acts just like fromText: tries to parse a value from a Text and discards any estimate of the parse's ambiguity.

class ColumnTypeable a where Source

This class relates a universe of possible column types to Haskell types, and provides a mechanism to infer which type best represents some textual data.

Methods

colType :: a -> Q Type Source

inferType :: Text -> a Source