diff --git a/ConstMath/Pass.hs b/ConstMath/Pass.hs index 96537db..e7c155c 100644 --- a/ConstMath/Pass.hs +++ b/ConstMath/Pass.hs @@ -2,6 +2,7 @@ {-# LANGUAGE PatternGuards #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TupleSections #-} +{-# LANGUAGE ImpredicativeTypes #-} {-# OPTIONS_GHC -Wall #-} module ConstMath.Pass ( @@ -146,7 +147,8 @@ mkUnaryCollapseNum fnE opts expr@(App f1 (App f2 (Lit lit))) | otherwise = do let sub = fnE (from d) msgResult - return (App f2 (mkLit sub)) + dflags <- getDynFlags + return (App f2 (mkLit dflags sub)) mkUnaryCollapseNum _ _ expr = return expr mkBinaryCollapse :: (forall a. RealFloat a => (a -> a -> a)) diff --git a/tests/Make.hs b/tests/Make.hs index b46ef2b..789849b 100644 --- a/tests/Make.hs +++ b/tests/Make.hs @@ -1,7 +1,7 @@ module Main where -import System.Cmd import System.Directory +import System.Process import Paths_const_math_ghc_plugin