From cd33eefd0467ae7ee4d22f16fcaaccfd33f18cb5 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 16 Oct 2012 15:28:26 +0100 Subject: Some alpha renaming Mostly d -> g (matching DynFlag -> GeneralFlag). Also renamed if* to when*, matching the Haskell if/when names --- compiler/prelude/PrelRules.lhs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/prelude/PrelRules.lhs') diff --git a/compiler/prelude/PrelRules.lhs b/compiler/prelude/PrelRules.lhs index d1a2efdf6f..5d414940a8 100644 --- a/compiler/prelude/PrelRules.lhs +++ b/compiler/prelude/PrelRules.lhs @@ -580,9 +580,9 @@ nonZeroLit n = getLiteral n >>= guard . not . isZeroLit -- Rational value to that of Float/Double. We confuse host architecture -- and target architecture here, but it's convenient (and wrong :-). convFloating :: DynFlags -> Literal -> Literal -convFloating dflags (MachFloat f) | not (dopt Opt_ExcessPrecision dflags) = +convFloating dflags (MachFloat f) | not (gopt Opt_ExcessPrecision dflags) = MachFloat (toRational (fromRational f :: Float )) -convFloating dflags (MachDouble d) | not (dopt Opt_ExcessPrecision dflags) = +convFloating dflags (MachDouble d) | not (gopt Opt_ExcessPrecision dflags) = MachDouble (toRational (fromRational d :: Double)) convFloating _ l = l -- cgit v1.2.1