Herbert, now I'm a fan of your package. However, I'm getting this when trying to intCast Int64 to Rational: engine-src/Game/LambdaHack/Common/Time.hs:265:19: error: … • Couldn't match type ‘int-cast-0.2.0.0:Data.IntCast.IsIntBaseSubType ('int-cast-0.2.0.0:Data.IntCast.FixedIntTag 64) (int-cast-0.2.0.0:Data.IntCast.IntBaseType Rational)’ with ‘'True’ arising from a use of ‘intCast’ • In the expression: intCast :: Int64 -> Rational In the first argument of ‘(*)’, namely ‘(intCast :: Int64 -> Rational) v’ In the second argument of ‘($)’, namely ‘(intCast :: Int64 -> Rational) v * s’ On Thu, Aug 13, 2020 at 6:54 PM Ben Franksen <ben.franksen@online.de> wrote:
Am 13.08.20 um 17:48 schrieb Herbert Valerio Riedel:
It might also be worth pointing out the function added to `base` originated from my package `int-cast`
- https://hackage.haskell.org/package/int-cast-0.2.0.0/docs/Data-IntCast.html
which provides the means to have compile-time verified "safe" (and also a slightly weaker lossless "iso"morphic) integer conversions without requiring O(n^2) instances.
This is pretty cool. Thanks for sharing.
Cheers Ben
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries