diff options
author | Ian Lynagh <igloo@earth.li> | 2012-06-12 18:52:05 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-06-12 18:52:05 +0100 |
commit | ab50c9c527d19f4df7ee6742b6d79c855d57c9b8 (patch) | |
tree | ac78c3fda6f3a8ec8235345f7b02518e0d809ba0 /compiler/vectorise/Vectorise/Exp.hs | |
parent | 543ec0852722318665d2f5228e29d44a5fc973f5 (diff) | |
download | haskell-ab50c9c527d19f4df7ee6742b6d79c855d57c9b8.tar.gz |
Pass DynFlags down to showSDoc
Diffstat (limited to 'compiler/vectorise/Vectorise/Exp.hs')
-rw-r--r-- | compiler/vectorise/Vectorise/Exp.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/vectorise/Vectorise/Exp.hs b/compiler/vectorise/Vectorise/Exp.hs index c984c10a24..8c5ef0045d 100644 --- a/compiler/vectorise/Vectorise/Exp.hs +++ b/compiler/vectorise/Vectorise/Exp.hs @@ -48,7 +48,7 @@ import Control.Applicative import Data.Maybe import Data.List import TcRnMonad (doptM) -import DynFlags (DynFlag(Opt_AvoidVect)) +import DynFlags import Util @@ -281,7 +281,8 @@ vectExpr (_, AnnLit lit) _ vectExpr e@(_, AnnLam bndr _) vt | isId bndr = (\(_, _, ve) -> ve) <$> vectFnExpr True False [] e vt - | otherwise = cantVectorise "Unexpected type lambda (vectExpr)" (ppr (deAnnotate e)) + | otherwise = do dflags <- getDynFlags + cantVectorise dflags "Unexpected type lambda (vectExpr)" (ppr (deAnnotate e)) -- SPECIAL CASE: Vectorise/lift 'patError @ ty err' by only vectorising/lifting the type 'ty'; -- its only purpose is to abort the program, but we need to adjust the type to keep CoreLint @@ -336,7 +337,8 @@ vectExpr (_, AnnCase scrut bndr ty alts) vt | Just (tycon, ty_args) <- splitTyConApp_maybe scrut_ty , isAlgTyCon tycon = vectAlgCase tycon ty_args scrut bndr ty alts vt - | otherwise = cantVectorise "Can't vectorise expression" (ppr scrut_ty) + | otherwise = do dflags <- getDynFlags + cantVectorise dflags "Can't vectorise expression" (ppr scrut_ty) where scrut_ty = exprType (deAnnotate scrut) @@ -368,7 +370,8 @@ vectExpr (_, AnnTick tickish expr) (VITNode _ [vit]) vectExpr (_, AnnType ty) _ = liftM vType (vectType ty) -vectExpr e vit = cantVectorise "Can't vectorise expression (vectExpr)" (ppr (deAnnotate e) $$ text (" " ++ show vit)) +vectExpr e vit = do dflags <- getDynFlags + cantVectorise dflags "Can't vectorise expression (vectExpr)" (ppr (deAnnotate e) $$ text (" " ++ show vit)) -- |Vectorise an expression that *may* have an outer lambda abstraction. -- |