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.Positive0.1.0

Description

A data type for integers greater than zero.

Synopsis

Documentation

data Positive Source 0.1.0#

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

Instances

Enum Positive  
Eq Positive  
Integral Positive  
Num Positive

This instance uses error to preserve the Positive invariant.0.1.0

Ord Positive  
Read Positive  
Real Positive  
Show Positive  
Generic Positive  

Associated Types

type Rep Positive :: * -> * #

Methods

from :: Positive -> Rep Positive x #

to :: Rep Positive x -> Positive #

Hashable Positive  

Methods

hashWithSalt :: Int -> Positive -> Int #

hash :: Positive -> Int #

ToJSON Positive  
FromJSON Positive  
NFData Positive  

Methods

rnf :: Positive -> () #

Monad m => Serial m Positive

Uses the underlying Int instance.0.1.0

Methods

series :: Series m Positive #

Monad m => CoSerial m Positive

Uses the underlying Int instance.0.1.0

Methods

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

type Rep Positive  
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 0.1.0#

Constructor for a Positive.

fromPositive :: Getter Positive Int Source 0.1.0#

A Getter for the Int underlying a Positive.