integer-types-0.1.4.1: Integer, Natural, and Positive
Safe HaskellSafe-Inferred
LanguageGHC2021

Integer.Conversion

Synopsis

Documentation

class IntegerNarrow a b where Source #

Methods

narrow :: a -> Maybe b Source #

Instances

Instances details
IntegerNarrow Positive Positive Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Positive Signed Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Positive Integer Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Positive Natural Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Signed Positive Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Signed Signed Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Signed Integer Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Signed Natural Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Integer Positive Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Integer Signed Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Integer Integer Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Integer Natural Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Natural Positive Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Natural Signed Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Natural Integer Source # 
Instance details

Defined in Integer.Conversion

IntegerNarrow Natural Natural Source # 
Instance details

Defined in Integer.Conversion

class IntegerNarrow a b => IntegerConvert a b where Source #

Methods

convert :: a -> b Source #

Instances

Instances details
IntegerConvert Positive Positive Source # 
Instance details

Defined in Integer.Conversion

IntegerConvert Positive Signed Source # 
Instance details

Defined in Integer.Conversion

IntegerConvert Positive Integer Source # 
Instance details

Defined in Integer.Conversion

IntegerConvert Positive Natural Source # 
Instance details

Defined in Integer.Conversion

IntegerConvert Signed Signed Source # 
Instance details

Defined in Integer.Conversion

IntegerConvert Signed Integer Source # 
Instance details

Defined in Integer.Conversion

IntegerConvert Integer Signed Source # 
Instance details

Defined in Integer.Conversion

IntegerConvert Integer Integer Source # 
Instance details

Defined in Integer.Conversion

IntegerConvert Natural Signed Source # 
Instance details

Defined in Integer.Conversion

IntegerConvert Natural Integer Source # 
Instance details

Defined in Integer.Conversion

IntegerConvert Natural Natural Source # 
Instance details

Defined in Integer.Conversion

class (IntegerConvert a b, IntegerConvert b a) => IntegerEquiv a b Source #

Instances

Instances details
IntegerEquiv Positive Positive Source # 
Instance details

Defined in Integer.Conversion

IntegerEquiv Signed Signed Source # 
Instance details

Defined in Integer.Conversion

IntegerEquiv Signed Integer Source # 
Instance details

Defined in Integer.Conversion

IntegerEquiv Integer Signed Source # 
Instance details

Defined in Integer.Conversion

IntegerEquiv Integer Integer Source # 
Instance details

Defined in Integer.Conversion

IntegerEquiv Natural Natural Source # 
Instance details

Defined in Integer.Conversion

yolo :: (Integral a, Num b) => a -> b Source #

Partial conversion between Integral types via Integer

yolo = fromInteger . toInteger