language-ninja-0.2.0: A library for dealing with the Ninja build language.

CopyrightCopyright 2017 Awake Security
LicenseApache-2.0
Maintaineropensource@awakesecurity.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Language.Ninja.Misc.Positive

Description

A data type for integers greater than zero.

Since: 0.1.0

Synopsis

Documentation

data Positive Source #

This type represents a positive number; i.e.: an integer greater than zero.

Since: 0.1.0

Instances

Enum Positive Source # 
Eq Positive Source # 
Integral Positive Source # 
Num Positive Source #

This instance uses error to preserve the Positive invariant.

Since: 0.1.0

Ord Positive Source # 
Read Positive Source # 
Real Positive Source # 
Show Positive Source # 
Generic Positive Source # 

Associated Types

type Rep Positive :: * -> * #

Methods

from :: Positive -> Rep Positive x #

to :: Rep Positive x -> Positive #

Hashable Positive Source # 

Methods

hashWithSalt :: Int -> Positive -> Int #

hash :: Positive -> Int #

ToJSON Positive Source # 
FromJSON Positive Source # 
NFData Positive Source # 

Methods

rnf :: Positive -> () #

Monad m => Serial m Positive Source #

Uses the underlying Int instance.

Since: 0.1.0

Methods

series :: Series m Positive #

Monad m => CoSerial m Positive Source #

Uses the underlying Int instance.

Since: 0.1.0

Methods

coseries :: Series m b -> Series m (Positive -> b) #

type Rep Positive Source # 
type Rep Positive = D1 (MetaData "Positive" "Language.Ninja.Misc.Positive" "language-ninja-0.2.0-4aVVODOvkNMFxGcRpnztag" True) (C1 (MetaCons "MkPositive" PrefixI True) (S1 (MetaSel (Just Symbol "_fromPositive") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

makePositive :: Int -> Maybe Positive Source #

Constructor for a Positive.

Since: 0.1.0

fromPositive :: Getter Positive Int Source #

A Getter for the Int underlying a Positive.

Since: 0.1.0