From 3d9e5ef357ae30481eba359e6d7b0f5424ed988b Mon Sep 17 00:00:00 2001 From: panne Date: Sat, 13 Apr 2002 15:02:35 +0000 Subject: [PATCH] [project @ 2002-04-13 15:02:35 by panne] Dirty workaround for a strange error after bootstrapping: stgSyn/CoreToStg.lhs:1112: Couldn't match `#' against `*' When matching types `GHC.Prim.Int#' and `a' Expected type: GHC.Prim.Int# Inferred type: a In the application `error ("cafRefs " ++ (showSDoc (ppr id)))' Should be fixed elsewhere, but I don't know how... :-} --- ghc/compiler/stgSyn/CoreToStg.lhs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/stgSyn/CoreToStg.lhs b/ghc/compiler/stgSyn/CoreToStg.lhs index 1db8794..1962edf 100644 --- a/ghc/compiler/stgSyn/CoreToStg.lhs +++ b/ghc/compiler/stgSyn/CoreToStg.lhs @@ -1108,7 +1108,9 @@ cafRefs p (Var id) Just (LetBound (TopLet caf_info) _) -> fastBool (mayHaveCafRefs caf_info) Nothing | isGlobalId id -> fastBool (mayHaveCafRefs (idCafInfo id)) -- Imported | otherwise -> fastBool False -- Nested binder - _other -> error ("cafRefs " ++ showSDoc (ppr id)) -- No nested things in env + -- NOTE: The 'fastBool' below is a (temporary?) workaround for a + -- strange bug in GHC. It's strict in its argument, so who cares...? :-} + _other -> fastBool (error ("cafRefs " ++ showSDoc (ppr id))) -- No nested things in env cafRefs p (Lit l) = fastBool False cafRefs p (App f a) = fastOr (cafRefs p f) (cafRefs p) a -- 1.7.10.4