{-# LANGUAGE ScopedTypeVariables #-}
-{-# OPTIONS -Wall -fno-warn-name-shadowing #-}
module MkZipCfg
( AGraph, (<*>), emptyAGraph, withFreshLabel, withUnique
, mkMiddle, mkMiddles, mkLast, mkZTail, mkBranch, mkLabel, mkIfThenElse, mkWhileDo
note_this_code_becomes_unreachable ::
(Monad m, LastNode l, Outputable middle, Outputable l) => ZTail middle l -> m ()
+#ifdef DEBUG
note_this_code_becomes_unreachable = u
where u (ZLast LastExit) = return ()
u (ZLast (LastOther l)) | isBranchNode l = return ()
-- Note [Branch follows branch]
u tail = fail ("unreachable code: " ++ showSDoc (ppr tail))
+#else
+note_this_code_becomes_unreachable _ = return ()
+#endif
+
{-
Note [Branch follows branch]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~