mixed-types-num-0.3.0.1: Alternative Prelude with numeric and logic expressions typed bottom-up

Copyright(c) Michal Konecny
LicenseBSD3
Maintainermikkonecny@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Numeric.MixedTypes.Round

Contents

Description

 

Synopsis

Rounding operations

class CanRound t where Source #

A replacement for Prelude's RealFrac operations, such as round in which the result type is fixed to Integer.

If RealFrac t and CanTestPosNeg t, then one can use the default implementation to mirror Prelude's round, etc.

In other cases, it is sufficient to define properFraction.

Tests

specCanRound :: (CanRoundX t, HasIntegers t) => T t -> Spec Source #

HSpec properties that each implementation of CanRound should satisfy.

specHasIntegerBounds :: HasIntegerBoundsX t => T t -> Spec Source #

HSpec properties that each implementation of CanRound should satisfy.