diff options
Diffstat (limited to 'compiler/GHC/HsToCore/PmCheck/Oracle.hs')
-rw-r--r-- | compiler/GHC/HsToCore/PmCheck/Oracle.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/HsToCore/PmCheck/Oracle.hs b/compiler/GHC/HsToCore/PmCheck/Oracle.hs index b16b5e5907..db1975e807 100644 --- a/compiler/GHC/HsToCore/PmCheck/Oracle.hs +++ b/compiler/GHC/HsToCore/PmCheck/Oracle.hs @@ -68,6 +68,7 @@ import GHC.Utils.Monad hiding (foldlM) import GHC.HsToCore.Monad hiding (foldlM) import GHC.Tc.Instance.Family import GHC.Core.FamInstEnv +import GHC.Core.Multiplicity import Control.Monad (guard, mzero, when) import Control.Monad.Trans.Class (lift) @@ -96,7 +97,7 @@ mkPmId :: Type -> DsM Id mkPmId ty = getUniqueM >>= \unique -> let occname = mkVarOccFS $ fsLit "pm" name = mkInternalName unique occname noSrcSpan - in return (mkLocalIdOrCoVar name ty) + in return (mkLocalIdOrCoVar name Many ty) ----------------------------------------------- -- * Caching possible matches of a COMPLETE set @@ -145,7 +146,7 @@ mkOneConFull arg_tys con = do -- Instantiate fresh existentials as arguments to the constructor. This is -- important for instantiating the Thetas and field types. (subst, _) <- cloneTyVarBndrs subst_univ ex_tvs <$> getUniqueSupplyM - let field_tys' = substTys subst field_tys + let field_tys' = substTys subst $ map scaledThing field_tys -- Instantiate fresh term variables (VAs) as arguments to the constructor vars <- mapM mkPmId field_tys' -- All constraints bound by the constructor (alpha-renamed), these are added @@ -501,7 +502,7 @@ nameTyCt pred_ty = do unique <- getUniqueM let occname = mkVarOccFS (fsLit ("pm_"++show unique)) idname = mkInternalName unique occname noSrcSpan - return (mkLocalIdOrCoVar idname pred_ty) + return (mkLocalIdOrCoVar idname Many pred_ty) -- | Add some extra type constraints to the 'TyState'; return 'Nothing' if we -- find a contradiction (e.g. @Int ~ Bool@). |