Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Parsed a
- = Possibly a
- | Definitely a
- class Parseable a where
- discardConfidence :: Parsed a -> a
- parse' :: (MonadPlus m, Parseable a) => Text -> m a
- class ColumnTypeable a where
Documentation
Possibly a | |
Definitely a |
class Parseable a where Source #
Values that can be read from a Text
with more or less
discrimination.
parse :: 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."
parse :: (Readable a, 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.