diff options
author | Ian Lynagh <igloo@earth.li> | 2012-06-12 12:42:58 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-06-12 12:42:58 +0100 |
commit | 0fdca5de906b243635140819298b35f1210e51ce (patch) | |
tree | 80602bf6714d496ded605ea4d16dba0b4ee0db6f /compiler/vectorise/Vectorise.hs | |
parent | 1bb4428cbc194cb959166fc8e12d0edd140e3796 (diff) | |
download | haskell-0fdca5de906b243635140819298b35f1210e51ce.tar.gz |
Pass DynFlags down to showPpr
Diffstat (limited to 'compiler/vectorise/Vectorise.hs')
-rw-r--r-- | compiler/vectorise/Vectorise.hs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/vectorise/Vectorise.hs b/compiler/vectorise/Vectorise.hs index 637897d900..c92ae8073e 100644 --- a/compiler/vectorise/Vectorise.hs +++ b/compiler/vectorise/Vectorise.hs @@ -264,10 +264,11 @@ vectTopBinder var inline expr Just (vdty, _) | eqType vty vdty -> return () | otherwise -> - cantVectorise ("Type mismatch in vectorisation pragma for " ++ showSDoc (ppr var)) $ - (text "Expected type" <+> ppr vty) - $$ - (text "Inferred type" <+> ppr vdty) + do dflags <- getDynFlags + cantVectorise ("Type mismatch in vectorisation pragma for " ++ showPpr dflags var) $ + (text "Expected type" <+> ppr vty) + $$ + (text "Inferred type" <+> ppr vdty) -- Make the vectorised version of binding's name, and set the unfolding used for inlining ; var' <- liftM (`setIdUnfoldingLazily` unfolding) @@ -350,9 +351,10 @@ vectTopRhs recFs var expr = closedV $ do { globalScalar <- isGlobalScalarVar var ; vectDecl <- lookupVectDecl var + ; dflags <- getDynFlags ; let isDFun = isDFunId var - ; traceVt ("vectTopRhs of " ++ showSDoc (ppr var) ++ info globalScalar isDFun vectDecl ++ ":") $ + ; traceVt ("vectTopRhs of " ++ showPpr dflags var ++ info globalScalar isDFun vectDecl ++ ":") $ ppr expr ; rhs globalScalar isDFun vectDecl |