úÎS±R¥      The class  is used to define the numerical zero tolerances associated with types that will be used as zero tolerance type annotations in . pThis method retrieves the numerical zero tolerance associated with the type; it should be a constant function.  The class } is used to define the relative tolerances associated with types that will be used as relative tolerance type annotations in . tThis method retrieves the numerical relative tolerance associated with the type; it should be a constant function.  The class } is used to define the absolute tolerances associated with types that will be used as absolute tolerance type annotations in  . tThis method retrieves the numerical absolute tolerance associated with the type; it should be a constant function. ŠDigits is a type constructor that can be used to specify tolerances using type-level natural numbers. Annotating a wrapper with the type Digits nE specifies that the corresponding tolerance has a numerical value of 10^(-n).  The newtype ÿc is a wrapper that can contain an arbitrary value tagged with a zero tolerance and a relative tolerance; two values are equal to each other if their absolute values are both less than or equal to the zero tolerance, or if the absolute difference between them divided by the average of the absolute values is less than or equal to the relative tolerance. The type annotation zero_tolerance, which must be an instance of ‘, specifies the tolerance within which a value is considered to be equal to zero. For convenience, one may specify the tolerance using the type Digits n where nS is a type-level natural specifying the number of decimals in the tolerance (i.e.,  Digits Four# specifies a tolerance of 0.0001). The type annotation relative_tolerance, which must be an instance of ò, specifies the relative tolerance within which two values that are not approximately equal to zero are considered to be equal to each other. For convenience, as with the zero tolerance, one may specify the relative tolerance using the type Digits n where nS is a type-level natural specifying the number of decimals in the tolerance (i.e.,  Digits Foury specifies a relative tolerance of 0.0001, so that two values are equal if they agree to the first four leading digits). IIt is recommended that one use this wrapper by creating aliases, such as  Q type ApproximateDouble = RelativelyApproximateValue (Digits Five) (Digits Five) ' wrapAD :: Double -> ApproximateDouble % wrapAD = RelativelyApproximateValue ) unwrapAD :: ApproximateDouble -> Double - unwrapAD = unwrapRelativelyApproximateValue You can then replace the type " in your code with the type alias ApproximateDoublež to get the feature of approximate equality. Most of the time you will find that you do not need to use wrapping functions to construct wrapped values since V is an instance of whatever numerical types the wrapped value is, so that for example  1 + sqrt 2/3 is already a value of type ApproximateDouble& without needing to be wrapped first.   The newtype  Ç is a wrapper that can contain an arbitrary value tagged with a tolerance; two values are equal to each other if the absolute difference is less than or equal to this tolerance. The type annotation absolute_tolerance, which must be an instance of Z, specifies the tolerance. For convenience, one may specify the tolerance using the type Digits n where nS is a type-level natural specifying the number of decimals in the tolerance (i.e.,  Digits Four# specifies a tolerance of 0.0001). IIt is recommended that one use this wrapper by creating aliases, such as  C type ApproximateDouble = AbsolutelyApproximateValue (Digits Five) ' wrapAD :: Double -> ApproximateDouble % wrapAD = AbsolutelyApproximateValue ) unwrapAD :: ApproximateDouble -> Double - unwrapAD = unwrapAbsolutelyApproximateValue You can then replace the type " in your code with the type alias ApproximateDoublež to get the feature of approximate equality. Most of the time you will find that you do not need to use wrapping functions to construct wrapped values since  V is an instance of whatever numerical types the wrapped value is, so that for example  1 + sqrt 2/3 is already a value of type ApproximateDouble& without needing to be wrapped first. lThis is a convenience (constant) function for extracting the type-level natural number contained within the ( type constructor; it returns the value , so don't try to evaluate the result. ]This is a convenience (constant) function that computes the numerical tolerance specified by Digits n , which is 10^(-n). eThis is a convenience (constant) function for extracting the relative tolerance type annotation from  ; it returns the value , so don't try to evaluate the result. eThis is a convenience (constant) function for extracting the relative tolerance type annotation from ; it returns the value , so don't try to evaluate the result. aThis is a convenience (constant) function for extracting the zero tolerance type annotation from ; it returns the value , so don't try to evaluate the result.               approximate-equality-1.0Data.Eq.Approximate ZeroTolerancezeroToleranceOfRelativeTolerancerelativeToleranceOfAbsoluteToleranceabsoluteToleranceOfDigitsRelativelyApproximateValue unwrapRelativelyApproximateValueAbsolutelyApproximateValue unwrapAbsolutelyApproximateValue unwrapDigitstoleranceFromDigitsgetAbsoluteTolerancegetRelativeTolerancegetZeroToleranceghc-prim GHC.TypesDoublebaseGHC.Err undefined