Skip to content

Commit 65648db

Browse files
committed
change ProgramPoint design to rely on StgPoint
1 parent ce67e4d commit 65648db

File tree

1 file changed

+2
-16
lines changed
  • external-stg-interpreter/lib/Stg/Interpreter

1 file changed

+2
-16
lines changed

external-stg-interpreter/lib/Stg/Interpreter/Base.hs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,23 +1407,9 @@ markLNE lneAddrs = do
14071407

14081408
data ProgramPoint
14091409
= PP_Global
1410-
| PP_Closure Id -- closure name
1411-
| PP_Scrutinee Id -- qualified scrutinee result name
1412-
| PP_Alt Id AltCon -- qualified scrutinee result name, alternative pattern
14131410
| PP_Apply Int ProgramPoint
1414-
deriving (Eq, Ord)
1415-
1416-
instance Show ProgramPoint where show = showProgramPoint
1417-
1418-
showProgramPoint :: ProgramPoint -> String
1419-
showProgramPoint = \case
1420-
PP_Global -> "<global>"
1421-
PP_Closure n -> show n
1422-
PP_Scrutinee v -> "scrut: " ++ show v
1423-
PP_Alt v pat -> "alt: " ++ show v ++ " " ++ case pat of
1424-
AltDataCon dc -> "AltDataCon " ++ show (DC dc)
1425-
_ -> show pat
1426-
PP_Apply i p -> "apply " ++ show i ++ ": " ++ show p
1411+
| PP_StgPoint StgPoint
1412+
deriving (Eq, Ord, Read, Show)
14271413

14281414
dumpStgState :: M ()
14291415
dumpStgState = do

0 commit comments

Comments
 (0)