servant-util-0.1.0.2: Servant servers utilities.
Safe HaskellNone
LanguageHaskell2010

Servant.Util.Internal.Util

Documentation

newtype Positive a Source #

Constructors

PositiveUnsafe 

Fields

Instances

Instances details
Eq a => Eq (Positive a) Source # 
Instance details

Defined in Servant.Util.Internal.Util

Methods

(==) :: Positive a -> Positive a -> Bool #

(/=) :: Positive a -> Positive a -> Bool #

Ord a => Ord (Positive a) Source # 
Instance details

Defined in Servant.Util.Internal.Util

Methods

compare :: Positive a -> Positive a -> Ordering #

(<) :: Positive a -> Positive a -> Bool #

(<=) :: Positive a -> Positive a -> Bool #

(>) :: Positive a -> Positive a -> Bool #

(>=) :: Positive a -> Positive a -> Bool #

max :: Positive a -> Positive a -> Positive a #

min :: Positive a -> Positive a -> Positive a #

Show a => Show (Positive a) Source # 
Instance details

Defined in Servant.Util.Internal.Util

Methods

showsPrec :: Int -> Positive a -> ShowS #

show :: Positive a -> String #

showList :: [Positive a] -> ShowS #

Buildable x => Buildable (Positive x) Source # 
Instance details

Defined in Servant.Util.Internal.Util

Methods

build :: Positive x -> Builder #

ToHttpApiData a => ToHttpApiData (Positive a) Source # 
Instance details

Defined in Servant.Util.Internal.Util

(FromHttpApiData a, Show a, Ord a, Num a) => FromHttpApiData (Positive a) Source # 
Instance details

Defined in Servant.Util.Internal.Util

toPositive :: (Show a, Ord a, Num a) => a -> Either Text (Positive a) Source #

type family IsNotZero (k :: Nat) :: Constraint where ... Source #

Equations

IsNotZero 0 = TypeError ('Text "Null is now allowed here") 
IsNotZero k = () 

positiveVal :: forall k i. (KnownPositive k, Num i) => Positive i Source #