Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Internal module of Prose, allowing breaking the abstraction.
Prefer to use Data.StringVariants.Prose instead.
Synopsis
- newtype Prose = Prose Text
- mkProse :: Text -> Maybe Prose
- proseFromNonEmptyText :: NonEmptyText n -> Prose
- compileProse :: QuasiQuoter
- type IsProse s = (KnownSymbol s, SymbolWithNoSpaceAround s)
- literalProse :: forall (s :: Symbol). IsProse s => Prose
- proseToText :: Prose -> Text
Documentation
Whitespace-trimmed, non-empty text, for use with API endpoints.
The rationale is that there are many situations where if a client sends
text that is empty or all whitespace, there's probably a client error.
Not suitable for database fields, as there is no character limit (see
ProsePersistFieldMsg
).
Instances
FromJSON Prose Source # | |
Defined in Data.StringVariants.Prose.Internal | |
ToJSON Prose Source # | |
ToJSONKey Prose Source # | |
Defined in Data.StringVariants.Prose.Internal | |
Semigroup Prose Source # | |
Show Prose Source # | |
Eq Prose Source # | |
Ord Prose Source # | |
ConvertibleStrings Prose Text Source # | |
Defined in Data.StringVariants.Prose.Internal convertString :: Prose -> Text # | |
ConvertibleStrings Prose Text Source # | |
Defined in Data.StringVariants.Prose.Internal convertString :: Prose -> Text # | |
Lift Prose Source # | |
proseFromNonEmptyText :: NonEmptyText n -> Prose Source #
type IsProse s = (KnownSymbol s, SymbolWithNoSpaceAround s) Source #
proseToText :: Prose -> Text Source #