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

Data.StringVariants.NonEmptyText.Internal

Description

Internal module of NonEmptyText, allowing breaking the abstraction.

Prefer to use Data.StringVariants.NonEmptyText instead.

Synopsis

Documentation

newtype NonEmptyText (n :: Nat) Source #

Non Empty Text, requires the input is between 1 and n chars and not just whitespace.

Constructors

NonEmptyText Text 

Instances

Instances details
KnownNat n => Arbitrary (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

KnownNat n => FromJSON (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

ToJSON (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

Semigroup (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

Generic (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

Associated Types

type Rep (NonEmptyText n) :: Type -> Type #

Methods

from :: NonEmptyText n -> Rep (NonEmptyText n) x #

to :: Rep (NonEmptyText n) x -> NonEmptyText n #

Read (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

Show (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

Eq (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

Ord (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

MonoFoldable (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

Methods

ofoldMap :: Monoid m => (Element (NonEmptyText n) -> m) -> NonEmptyText n -> m #

ofoldr :: (Element (NonEmptyText n) -> b -> b) -> b -> NonEmptyText n -> b #

ofoldl' :: (a -> Element (NonEmptyText n) -> a) -> a -> NonEmptyText n -> a #

otoList :: NonEmptyText n -> [Element (NonEmptyText n)] #

oall :: (Element (NonEmptyText n) -> Bool) -> NonEmptyText n -> Bool #

oany :: (Element (NonEmptyText n) -> Bool) -> NonEmptyText n -> Bool #

onull :: NonEmptyText n -> Bool #

olength :: NonEmptyText n -> Int #

olength64 :: NonEmptyText n -> Int64 #

ocompareLength :: Integral i => NonEmptyText n -> i -> Ordering #

otraverse_ :: Applicative f => (Element (NonEmptyText n) -> f b) -> NonEmptyText n -> f () #

ofor_ :: Applicative f => NonEmptyText n -> (Element (NonEmptyText n) -> f b) -> f () #

omapM_ :: Applicative m => (Element (NonEmptyText n) -> m ()) -> NonEmptyText n -> m () #

oforM_ :: Applicative m => NonEmptyText n -> (Element (NonEmptyText n) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (NonEmptyText n) -> m a) -> a -> NonEmptyText n -> m a #

ofoldMap1Ex :: Semigroup m => (Element (NonEmptyText n) -> m) -> NonEmptyText n -> m #

ofoldr1Ex :: (Element (NonEmptyText n) -> Element (NonEmptyText n) -> Element (NonEmptyText n)) -> NonEmptyText n -> Element (NonEmptyText n) #

ofoldl1Ex' :: (Element (NonEmptyText n) -> Element (NonEmptyText n) -> Element (NonEmptyText n)) -> NonEmptyText n -> Element (NonEmptyText n) #

headEx :: NonEmptyText n -> Element (NonEmptyText n) #

lastEx :: NonEmptyText n -> Element (NonEmptyText n) #

unsafeHead :: NonEmptyText n -> Element (NonEmptyText n) #

unsafeLast :: NonEmptyText n -> Element (NonEmptyText n) #

maximumByEx :: (Element (NonEmptyText n) -> Element (NonEmptyText n) -> Ordering) -> NonEmptyText n -> Element (NonEmptyText n) #

minimumByEx :: (Element (NonEmptyText n) -> Element (NonEmptyText n) -> Ordering) -> NonEmptyText n -> Element (NonEmptyText n) #

oelem :: Element (NonEmptyText n) -> NonEmptyText n -> Bool #

onotElem :: Element (NonEmptyText n) -> NonEmptyText n -> Bool #

ConvertibleStrings (NonEmptyText n) ByteString Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

ConvertibleStrings (NonEmptyText n) Text Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

ConvertibleStrings (NonEmptyText n) String Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

Lift (NonEmptyText n :: TYPE LiftedRep) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

Methods

lift :: Quote m => NonEmptyText n -> m Exp #

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

type Rep (NonEmptyText n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

type Rep (NonEmptyText n) = D1 ('MetaData "NonEmptyText" "Data.StringVariants.NonEmptyText.Internal" "string-variants-0.1.0.1-FzKJzNbSMeN1B3zsrHPi9w" 'True) (C1 ('MetaCons "NonEmptyText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
type Element (NonEmptyText _n) Source # 
Instance details

Defined in Data.StringVariants.NonEmptyText.Internal

unsafeMkNonEmptyText :: forall n. KnownNat n => Text -> NonEmptyText n Source #

Make a NonEmptyText when you can manually verify the length

widen :: (1 <= n, n <= m) => NonEmptyText n -> NonEmptyText m Source #

Converts a NonEmptyText to a wider NonEmptyText