pythia-0.1: A utility program for retrieving system information.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Pythia.Data.Percentage

Description

Provides the Percentage type.

Since: 0.1

Synopsis

Type

data Percentage where Source #

Represents a percentage.

Since: 0.1

Bundled Patterns

pattern MkPercentage :: Word8 -> Percentage

Pattern synonym for Percentage.

Since: 0.1

Instances

Instances details
Generic Percentage Source # 
Instance details

Defined in Pythia.Data.Percentage.Internal

Associated Types

type Rep Percentage :: Type -> Type #

Show Percentage Source #

Since: 0.1

Instance details

Defined in Pythia.Data.Percentage.Internal

NFData Percentage Source #

Since: 0.1

Instance details

Defined in Pythia.Data.Percentage.Internal

Methods

rnf :: Percentage -> () #

Eq Percentage Source #

Since: 0.1

Instance details

Defined in Pythia.Data.Percentage.Internal

Ord Percentage Source #

Since: 0.1

Instance details

Defined in Pythia.Data.Percentage.Internal

Display Percentage Source #

Since: 0.1

Instance details

Defined in Pythia.Data.Percentage.Internal

Lift Percentage Source #

Since: 0.1

Instance details

Defined in Pythia.Data.Percentage.Internal

Methods

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

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

type Rep Percentage Source #

Since: 0.1

Instance details

Defined in Pythia.Data.Percentage.Internal

type Rep Percentage = D1 ('MetaData "Percentage" "Pythia.Data.Percentage.Internal" "pythia-0.1-inplace" 'True) (C1 ('MetaCons "InternalPercentage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Interval ('Closed 0) ('Closed 100) Word8))))

Creation

mkPercentage :: Word8 -> Maybe Percentage Source #

Creates a percentage for x in [0, 100].

Since: 0.1

mkPercentageTH :: Word8 -> Code Q Percentage Source #

Safely creates a percentage at compile-time.

Since: 0.1

unsafePercentage :: HasCallStack => Word8 -> Percentage Source #

Unsafely creates a percentage for x in [0, 100]. Calls error otherwise.

Since: 0.1

Elimination

unPercentage :: Percentage -> Word8 Source #

Retrieve the raw percentage.

Since: 0.1

Optics

_MkPercentage :: ReversedPrism' Percentage Word8 Source #

ReversedPrism' that enables total elimination and partial construction.

Since: 0.1