diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-01-03 08:49:27 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-01-03 08:49:27 +0000 |
commit | 92a5889fbd718843362153bd163670243d6f310f (patch) | |
tree | e9fad7cb47234c75f0e85cff712496cf4fd10fae /compiler/vectorise | |
parent | 1cd8ff02dd9e25abe326ea3fecec036c8f23ef5f (diff) | |
download | haskell-ghc-axioms.tar.gz |
Small refactoringsghc-axioms
- Define mkAxInstRHS and use it
- Rename Instance to ClsInst
Diffstat (limited to 'compiler/vectorise')
-rw-r--r-- | compiler/vectorise/Vectorise/Utils/Base.hs | 1 | ||||
-rw-r--r-- | compiler/vectorise/Vectorise/Utils/PADict.hs | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/compiler/vectorise/Vectorise/Utils/Base.hs b/compiler/vectorise/Vectorise/Utils/Base.hs index 0c111f49c7..2b47ddfb9b 100644 --- a/compiler/vectorise/Vectorise/Utils/Base.hs +++ b/compiler/vectorise/Vectorise/Utils/Base.hs @@ -36,7 +36,6 @@ import DataCon import MkId import FastString - -- Simple Types --------------------------------------------------------------- voidType :: VM Type diff --git a/compiler/vectorise/Vectorise/Utils/PADict.hs b/compiler/vectorise/Vectorise/Utils/PADict.hs index cb3495d315..dfc08bcf58 100644 --- a/compiler/vectorise/Vectorise/Utils/PADict.hs +++ b/compiler/vectorise/Vectorise/Utils/PADict.hs @@ -114,9 +114,9 @@ paMethod method _ ty -- Note that @ty@ is only used for error messages -- prDictOfPReprInstTyCon :: Type -> CoAxiom -> [Type] -> VM CoreExpr -prDictOfPReprInstTyCon ty prepr_ax prepr_args - | Just rhs <- coreView (coAxiomRHS prepr_ax) +prDictOfPReprInstTyCon _ty prepr_ax prepr_args = do + let rhs = mkAxInstRHS prepr_ax prepr_args dict <- prDictOfReprType' rhs pr_co <- mkBuiltinCo prTyCon let co = mkAppCo pr_co @@ -124,8 +124,6 @@ prDictOfPReprInstTyCon ty prepr_ax prepr_args $ mkAxInstCo prepr_ax prepr_args return $ mkCast dict co - | otherwise = cantVectorise "Invalid PRepr type instance" (ppr ty) - -- |Get the PR dictionary for a type. The argument must be a representation -- type. -- |