mirror of
https://github.com/tfausak/witch.git
synced 2024-11-26 09:43:03 +03:00
Fix monomorphism warning
This commit is contained in:
parent
88bc4efd9d
commit
c6fe7fbc9f
@ -911,7 +911,9 @@ instance From.From Rational Double where
|
||||
-- | Uses `fromRational` as long as there isn't a loss of precision.
|
||||
instance Fixed.HasResolution a => TryFrom.TryFrom Rational (Fixed.Fixed a) where
|
||||
tryFrom = Utility.eitherTryFrom $ \s ->
|
||||
let t = fromRational s :: Fixed.Fixed a
|
||||
let
|
||||
t :: Fixed.Fixed a
|
||||
t = fromRational s
|
||||
in if toRational t == s
|
||||
then Right t
|
||||
else Left Exception.LossOfPrecision
|
||||
|
Loading…
Reference in New Issue
Block a user