algebra-simple-0.1: An alternative mathematical interface to Num.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Numeric.Literal.Integer

Description

Provides the FromInteger typeclass.

Since: 0.1

Synopsis

Documentation

class FromInteger a where Source #

Replaces base's fromInteger functionality for when we do not have a Num instance.

1_000 :: Num a => a

-- becomes

afromInteger 1_000 :: FromInteger a => a

Note that fromInteger's deficiencies are inherited e.g. Natural is partial, bounded types have over/underflow issues.

Since: 0.1

Methods

afromInteger :: HasCallStack => Integer -> a Source #

Since: 0.1

Instances

Instances details
FromInteger Int16 Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Int32 Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Int64 Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Int8 Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Word16 Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Word32 Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Word64 Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Word8 Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Integer Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Natural Source #

WARNING: Partial

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Double Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Float Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Int Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger Word Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

RealFloat a => FromInteger (Complex a) Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger (Ratio Integer) Source #

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer

FromInteger (Ratio Natural) Source #

WARNING: Partial

Since: 0.1

Instance details

Defined in Numeric.Literal.Integer