X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fmain%2FInteractiveEval.hs;h=4388c0b6bb8771f89fd55a9e628e495f31ebb97f;hp=c0067529494520784b48fb682354cec72a3383e9;hb=e314b86f6290e5440a46cd5cc29f7878cb78c6fb;hpb=e4417dcd4679da9c6b18c02ff667199c572bed89 diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs index c006752..4388c0b 100644 --- a/compiler/main/InteractiveEval.hs +++ b/compiler/main/InteractiveEval.hs @@ -616,10 +616,15 @@ rttiEnvironment hsc_env@HscEnv{hsc_IC=ic} = do tys <- reconstructType hsc_env 10 `mapM` incompletelyTypedIds -- map termType `fmap` (obtainTerm hsc_env False `mapM` incompletelyTypedIds) - let substs = [unifyRTTI ty ty' + improvs <- sequence [improveRTTIType hsc_env ty ty' | (ty, Just ty') <- zip (map idType incompletelyTypedIds) tys] - ic' = foldr (flip substInteractiveContext) ic - (map skolemiseSubst substs) + let ic' = foldr (\mb_subst ic' -> + maybe (WARN(True, text ("RTTI failed to calculate the " + ++ "improvement for a type")) ic') + (substInteractiveContext ic' . skolemiseSubst) + mb_subst) + ic + improvs return hsc_env{hsc_IC=ic'} skolemiseSubst :: TvSubst -> TvSubst