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.hs | |
parent | 543ec0852722318665d2f5228e29d44a5fc973f5 (diff) | |
download | haskell-ab50c9c527d19f4df7ee6742b6d79c855d57c9b8.tar.gz |
Pass DynFlags down to showSDoc
Diffstat (limited to 'compiler/vectorise/Vectorise.hs')
-rw-r--r-- | compiler/vectorise/Vectorise.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/vectorise/Vectorise.hs b/compiler/vectorise/Vectorise.hs index c92ae8073e..8b7e817826 100644 --- a/compiler/vectorise/Vectorise.hs +++ b/compiler/vectorise/Vectorise.hs @@ -210,7 +210,8 @@ vectTopBind b@(Rec bs) ; if and hasNoVectDecls then return b -- all bindings have 'NOVECTORISE' else if or hasNoVectDecls - then cantVectorise noVectoriseErr (ppr b) -- some (but not all) have 'NOVECTORISE' + then do dflags <- getDynFlags + cantVectorise dflags noVectoriseErr (ppr b) -- some (but not all) have 'NOVECTORISE' else vectorise -- no binding has a 'NOVECTORISE' decl } noVectoriseErr = "NOVECTORISE must be used on all or no bindings of a recursive group" @@ -265,7 +266,7 @@ vectTopBinder var inline expr | eqType vty vdty -> return () | otherwise -> do dflags <- getDynFlags - cantVectorise ("Type mismatch in vectorisation pragma for " ++ showPpr dflags var) $ + cantVectorise dflags ("Type mismatch in vectorisation pragma for " ++ showPpr dflags var) $ (text "Expected type" <+> ppr vty) $$ (text "Inferred type" <+> ppr vdty) |