string-variants-0.2.0.0: Constrained text newtypes
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.StringVariants.Prose

Description

Prose type: arbitrary length non-empty text that is trimmed.

Synopsis

Documentation

data Prose Source #

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

Instances details
FromJSON Prose Source # 
Instance details

Defined in Data.StringVariants.Prose.Internal

ToJSON Prose Source # 
Instance details

Defined in Data.StringVariants.Prose.Internal

ToJSONKey Prose Source # 
Instance details

Defined in Data.StringVariants.Prose.Internal

Semigroup Prose Source # 
Instance details

Defined in Data.StringVariants.Prose.Internal

Methods

(<>) :: Prose -> Prose -> Prose #

sconcat :: NonEmpty Prose -> Prose #

stimes :: Integral b => b -> Prose -> Prose #

Show Prose Source # 
Instance details

Defined in Data.StringVariants.Prose.Internal

Methods

showsPrec :: Int -> Prose -> ShowS #

show :: Prose -> String #

showList :: [Prose] -> ShowS #

Eq Prose Source # 
Instance details

Defined in Data.StringVariants.Prose.Internal

Methods

(==) :: Prose -> Prose -> Bool #

(/=) :: Prose -> Prose -> Bool #

Ord Prose Source # 
Instance details

Defined in Data.StringVariants.Prose.Internal

Methods

compare :: Prose -> Prose -> Ordering #

(<) :: Prose -> Prose -> Bool #

(<=) :: Prose -> Prose -> Bool #

(>) :: Prose -> Prose -> Bool #

(>=) :: Prose -> Prose -> Bool #

max :: Prose -> Prose -> Prose #

min :: Prose -> Prose -> Prose #

ConvertibleStrings Prose Text Source # 
Instance details

Defined in Data.StringVariants.Prose.Internal

Methods

convertString :: Prose -> Text #

ConvertibleStrings Prose Text Source # 
Instance details

Defined in Data.StringVariants.Prose.Internal

Methods

convertString :: Prose -> Text #

Lift Prose Source # 
Instance details

Defined in Data.StringVariants.Prose.Internal

Methods

lift :: Quote m => Prose -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Prose -> Code m Prose #