TP=      !"#$%&'()*+,-./0123456789:;<Safe ;The class of Peano-like constructions (i.e. Nat and Whole).Test for zero.1An unobservable infinity. For all finite numbers n,  n < infinity_ must hold, but there need not be a total function that tests whether a number is infinite."Converts the number to an Integer.2Reduces the absolute value of the number by 1. If isZero n , then  decr n = n and vice versa.Whole numbers (Z).6Construct a whole number out of a magnitue and a sign.Sign for whole numbers. ;Lazy Peano numbers. Allow calculation with infinite values. Zero  Successor  Negation of .Removes at most  i constructors from a Peano number. Outputs the number of removed constructors and the remaining number. Extract the   value of a  Alias to quot.Returns the length of a foldable container as  W. The number is generated lazily and thus, infinitely large containers are supported. Integer conversions and division*Since negative numbers are not allowed, = = > and ? = @. The methods =, ?, >, @, A and B will terminate as long as their first argument is finite. Infinities in their second arguments are permitted and are handled as follows:  n = infinity = n > infinity = 0 n ? infinity = n @ infinity = nSince C returns a  Ratio Integer&, it WILL NOT terminate on infinities.Since C returns a  Ratio Integer&, it WILL NOT terminate on infinities.VThe ordering is the standard total order on Z. Positive and negative zero are equal.;All methods work as long as at least one operand is finite.0Positive and negative zero are considered equal.D and E0 work as long as at least one operand is finite.(Implements arithmetics for Whole numbersAddition, multiplication, and subtraction are lazy in both arguments, meaning that, in the case of infinite values, they can produce an infinite stream of S-constructors. As long as the callers of these functions only consume a finite amount of these, the program will not hang. fromInteger is not injective in case of  7, since negative integers are all converted to zero ( ).F and G@ work according to the total order on the whole numbers, i.e.  succ n = n+1 and  pred n = n-1.The G function is bounded at Zero..The bounds are negative and positive infinity.5The lower bound is zero, the upper bound is infinity. WPeano class instance defines infinity (positive) and other functions handling the sign!Peano class instance"  ! "   !    !Safe"8Real numbers datatype (a continued fraction of naturals)#Continued fraction type3Represents a simple continued fraction of the form: https://i.imgur.com/RgNIDHQ.png<Supports Haskell arithmetic operators though the use of the operatorF function is to be preferred since provide shortcuts to calculations.?It can be an infinite sequence. Be careful with functions like show and  precision: they may not terminate. Cons operatorn :| x  equivalent to n + 1/xNegate operatorM x  equivalent to -x$Negative number%Positive number&Zero"#$%&"#$%&#$%&""#$%&%Safe'Operator Matrix(=Continued fraction operator (implements Gosper's arithmetics) Given two " x, y and the operator matrix https://i.imgur.com/Hm7TiIH.png calculates  https://i.imgur.com/IZvQmy9.pngSee  1http://perl.plover.com/yak/cftalk/INFO/gosper.txt for a complete explanation.) Truncate a " to a given length n*Split a Number into a S (the most significant of the fraction) and the rest of the Number. Equivalent to (floor x, x - floor x) for a floating point.+/Extract the first natural of the fraction as a  number,Extract the "tail" of a " as a new " Equivalent to  (x - floor x) for a floating point.'(H)*+,'()*+,'()+,*'(H)*+,Safe35- Convert a " into a I number. Convert a I number into a "/Allows division between " s and conversion from a rational0Allows conversion to a rational1dThe sign is given by the first number of the fraction. Other number are always considered positive.2Same as above.36Basic Foldable instance implemented exactly as a list.4(transform a number applying a function (Nat -> Nat&) to each number preserving the sign.-./01234-.43210/-.-./01234Safe5Get the precision of a " (i.e. length)6/Alternative show function that pretty prints a "+ also doing conversions from Peano numbers7 Create a " from a list of naturals8 Convert a "( to a list of naturals (losing the sign)9@The infinite continued fraction whose terms are naturals numbers https://i.imgur.com/wYz0tig.png:The golden ratio https://i.imgur.com/3Yb5bWc.png;9Pi: the ratio of a circle's circumference to its diameter https://i.imgur.com/S1F6UoI.png<1Euler's number: the base of the natural logarithm https://i.imgur.com/q1SwKoy.png56789:;<56789:;<56789:;<56789:;<Safe "#$%&()-.789:;<#$%&" 78-.9:;<()J       !"#$%&'()*+,-./0123456789:;<=>?@ABCDECDFCDGCDHCDICDJCDKLMNLMOCPQCPRSCDTUnumbe_3JlBIGb7Ajw8f03xTj0mLVData.Number.PeanoData.Number.TypesData.Number.InternalData.Number.InstancesData.Number.Functions Data.NumberPeanoisZeroinfinity fromPeanodecrWholeSignPosNegNatZSisSucctakeNattoNat// natLength$fIntegralWhole $fIntegralNat $fRealWhole $fRealNat $fOrdWhole$fOrdNat $fEqWhole$fEqNat $fNumWhole$fNumNat $fEnumWhole $fEnumNat$fBoundedWhole $fBoundedNat $fPeanoWhole $fPeanoNatNumber ContinuedM:|EMatrixoperatorcutsplitfirstrest fromNumbertoNumber$fFractionalContinued$fRealContinued$fNumContinued$fTraversableContinued$fFoldableContinued$fFunctorContinued precisionshow'fromListtoListσφπebaseGHC.RealquotdivremmodquotRemdivMod toRationalghc-prim GHC.Classes==/=GHC.Enumsuccpred operator'RealFrac