<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >ZipCfg</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock-util.js" TYPE="text/javascript" ></SCRIPT ><SCRIPT TYPE="text/javascript" >window.onload = function () {setSynopsis("mini_ZipCfg.html")};</SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" >ghc-6.12.3: The GHC API</TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >ZipCfg</FONT ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Synopsis</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3AGraph" >Graph</A > m l = <A HREF="#v%3AGraph" >Graph</A > {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="recfield" ><A HREF="#v%3Ag_entry" >g_entry</A > :: <A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l</TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3Ag_blocks" >g_blocks</A > :: <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ></TR ></TABLE >}</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3ALGraph" >LGraph</A > m l = <A HREF="#v%3ALGraph" >LGraph</A > {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="recfield" ><A HREF="#v%3Alg_entry" >lg_entry</A > :: <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3Alg_blocks" >lg_blocks</A > :: <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ></TR ></TABLE >}</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3AFGraph" >FGraph</A > m l = <A HREF="#v%3AFGraph" >FGraph</A > {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="recfield" ><A HREF="#v%3Afg_entry" >fg_entry</A > :: <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3Afg_focus" >fg_focus</A > :: <A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l</TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3Afg_others" >fg_others</A > :: <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ></TR ></TABLE >}</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3ABlock" >Block</A > m l = <A HREF="#v%3ABlock" >Block</A > {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="recfield" ><A HREF="#v%3Abid" >bid</A > :: <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3Atail" >tail</A > :: <A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l</TD ></TR ></TABLE >}</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3AZBlock" >ZBlock</A > m l = <A HREF="#v%3AZBlock" >ZBlock</A > (<A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m) (<A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3AZHead" >ZHead</A > m </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" >= <A HREF="#v%3AZFirst" >ZFirst</A > <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3AZHead" >ZHead</A > (<A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m) m</TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3AZTail" >ZTail</A > m l </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" >= <A HREF="#v%3AZLast" >ZLast</A > (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3AZTail" >ZTail</A > m (<A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l)</TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3AZLast" >ZLast</A > l </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" >= <A HREF="#v%3ALastExit" >LastExit</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3ALastOther" >LastOther</A > l</TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AinsertBlock" >insertBlock</A > :: <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l) -> <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >class</SPAN > <A HREF="#t%3AHavingSuccessors" >HavingSuccessors</A > b <SPAN CLASS="keyword" >where</SPAN ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="#v%3Asuccs" >succs</A > :: b -> [<A HREF="BlockId.html#t%3ABlockId" >BlockId</A >]</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Afold_succs" >fold_succs</A > :: (<A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> a -> a) -> b -> a -> a</TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >class</SPAN > <A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > l => <A HREF="#t%3ALastNode" >LastNode</A > l <SPAN CLASS="keyword" >where</SPAN ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="#v%3AmkBranchNode" >mkBranchNode</A > :: <A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> l</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AisBranchNode" >isBranchNode</A > :: l -> <A HREF="../base-4.2.0.2/Data-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AbranchNodeTarget" >branchNodeTarget</A > :: l -> <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AblockId" >blockId</A > :: <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Azip" >zip</A > :: <A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Aunzip" >unzip</A > :: <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Alast" >last</A > :: <A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l -> <A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Agoto_end" >goto_end</A > :: <A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l -> (<A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m, <A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Azipht" >zipht</A > :: <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m -> <A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AtailOfLast" >tailOfLast</A > :: l -> <A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Asplice_tail" >splice_tail</A > :: <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l -> <A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l -> <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Asplice_head" >splice_head</A > :: <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l, <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Asplice_head_only%27" >splice_head_only'</A > :: <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m -> <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Asplice_head%27" >splice_head'</A > :: <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m -> <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l -> (<A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l), <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Aof_block_list" >of_block_list</A > :: <A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> [<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l] -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Ato_block_list" >to_block_list</A > :: <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> [<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l]</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgraphOfLGraph" >graphOfLGraph</A > :: <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Amap_blocks" >map_blocks</A > :: (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m' l') -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l'</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Amap_one_block" >map_one_block</A > :: (<A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> <A HREF="BlockId.html#t%3ABlockId" >BlockId</A >) -> (m -> m') -> (l -> l') -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m' l'</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Amap_nodes" >map_nodes</A > :: (<A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> <A HREF="BlockId.html#t%3ABlockId" >BlockId</A >) -> (m -> m') -> (l -> l') -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l'</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AmapM_blocks" >mapM_blocks</A > :: <A HREF="../base-4.2.0.2/Control-Monad.html#t%3AMonad" >Monad</A > mm => (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> mm (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m' l')) -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> mm (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l')</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Apostorder_dfs" >postorder_dfs</A > :: <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> [<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l]</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Apostorder_dfs_from" >postorder_dfs_from</A > :: (<A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > b, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l) -> b -> [<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l]</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Apostorder_dfs_from_except" >postorder_dfs_from_except</A > :: (<A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > b, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l) -> b -> <A HREF="BlockId.html#t%3ABlockSet" >BlockSet</A > -> [<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l]</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Afold_layout" >fold_layout</A > :: <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="../base-4.2.0.2/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> a -> a) -> a -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Afold_blocks" >fold_blocks</A > :: (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> a -> a) -> a -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Afold_fwd_block" >fold_fwd_block</A > :: (<A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> a -> a) -> (m -> a -> a) -> (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l -> a -> a) -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> a -> a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Atranslate" >translate</A > :: <A HREF="../base-4.2.0.2/Control-Monad.html#t%3AMonad" >Monad</A > tm => (m -> tm (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l')) -> (l -> tm (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l')) -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> tm (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l')</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3ApprLgraph" >pprLgraph</A > :: (<A HREF="Outputable.html#t%3AOutputable" >Outputable</A > m, <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > l, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> <A HREF="Outputable.html#t%3ASDoc" >SDoc</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3ApprGraph" >pprGraph</A > :: (<A HREF="Outputable.html#t%3AOutputable" >Outputable</A > m, <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > l, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l -> <A HREF="Outputable.html#t%3ASDoc" >SDoc</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Aentry" >entry</A > :: <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> <A HREF="ZipCfg.html#t%3AFGraph" >FGraph</A > m l</TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Documentation</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:Graph" ><A NAME="t%3AGraph" ></A ></A ><B >Graph</B > m l </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:Graph" ><A NAME="v%3AGraph" ></A ></A ><B >Graph</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="body" COLSPAN="2" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:g_entry" ><A NAME="v%3Ag_entry" ></A ></A ><B >g_entry</B > :: <A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l</TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:g_blocks" ><A NAME="v%3Ag_blocks" ></A ></A ><B >g_blocks</B > :: <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Graph')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:Graph" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" >(<A HREF="Outputable.html#t%3AOutputable" >Outputable</A > m, <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > l, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > (<A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l)</TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:LGraph" ><A NAME="t%3ALGraph" ></A ></A ><B >LGraph</B > m l </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:LGraph" ><A NAME="v%3ALGraph" ></A ></A ><B >LGraph</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="body" COLSPAN="2" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:lg_entry" ><A NAME="v%3Alg_entry" ></A ></A ><B >lg_entry</B > :: <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:lg_blocks" ><A NAME="v%3Alg_blocks" ></A ></A ><B >lg_blocks</B > :: <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:LGraph')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:LGraph" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" >(<A HREF="Outputable.html#t%3AOutputable" >Outputable</A > m, <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > l, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l)</TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:FGraph" ><A NAME="t%3AFGraph" ></A ></A ><B >FGraph</B > m l </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:FGraph" ><A NAME="v%3AFGraph" ></A ></A ><B >FGraph</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="body" COLSPAN="2" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:fg_entry" ><A NAME="v%3Afg_entry" ></A ></A ><B >fg_entry</B > :: <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:fg_focus" ><A NAME="v%3Afg_focus" ></A ></A ><B >fg_focus</B > :: <A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l</TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:fg_others" ><A NAME="v%3Afg_others" ></A ></A ><B >fg_others</B > :: <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:Block" ><A NAME="t%3ABlock" ></A ></A ><B >Block</B > m l </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="ndoc" >Blocks and flow graphs; see Note [Kinds of graphs] </TD ></TR ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:Block" ><A NAME="v%3ABlock" ></A ></A ><B >Block</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="body" COLSPAN="2" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:bid" ><A NAME="v%3Abid" ></A ></A ><B >bid</B > :: <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:tail" ><A NAME="v%3Atail" ></A ></A ><B >tail</B > :: <A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l</TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Block')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:Block" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" >(<A HREF="Outputable.html#t%3AOutputable" >Outputable</A > m, <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > l, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:ZBlock" ><A NAME="t%3AZBlock" ></A ></A ><B >ZBlock</B > m l </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="ndoc" >And now the zipper. The focus is between the head and tail. We cannot ever focus on an inter-block edge. </TD ></TR ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:ZBlock" ><A NAME="v%3AZBlock" ></A ></A ><B >ZBlock</B > (<A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m) (<A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l)</TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ZBlock')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:ZBlock" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > (<A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l)</TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:ZHead" ><A NAME="t%3AZHead" ></A ></A ><B >ZHead</B > m </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:ZFirst" ><A NAME="v%3AZFirst" ></A ></A ><B >ZFirst</B > <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:ZHead" ><A NAME="v%3AZHead" ></A ></A ><B >ZHead</B > (<A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m) m</TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:ZTail" ><A NAME="t%3AZTail" ></A ></A ><B >ZTail</B > m l </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:ZLast" ><A NAME="v%3AZLast" ></A ></A ><B >ZLast</B > (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:ZTail" ><A NAME="v%3AZTail" ></A ></A ><B >ZTail</B > m (<A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l)</TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ZTail')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:ZTail" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" >(<A HREF="Outputable.html#t%3AOutputable" >Outputable</A > m, <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > l) => <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > (<A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > (<A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l)</TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:ZLast" ><A NAME="t%3AZLast" ></A ></A ><B >ZLast</B > l </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="ndoc" >A basic block is a first node, followed by zero or more middle nodes, followed by a <TT ><A HREF="ZipCfg.html#v%3Alast" >last</A ></TT > node. </TD ></TR ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:LastExit" ><A NAME="v%3ALastExit" ></A ></A ><B >LastExit</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:LastOther" ><A NAME="v%3ALastOther" ></A ></A ><B >LastOther</B > l</TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ZLast')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:ZLast" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="Outputable.html#t%3AOutputable" >Outputable</A > l => <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="CmmExpr.html#t%3ADefinerOfSlots" >DefinerOfSlots</A > l => <A HREF="CmmExpr.html#t%3ADefinerOfSlots" >DefinerOfSlots</A > (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="CmmExpr.html#t%3AUserOfSlots" >UserOfSlots</A > l => <A HREF="CmmExpr.html#t%3AUserOfSlots" >UserOfSlots</A > (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="CmmExpr.html#t%3AUserOfLocalRegs" >UserOfLocalRegs</A > a => <A HREF="CmmExpr.html#t%3AUserOfLocalRegs" >UserOfLocalRegs</A > (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > a)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > l => <A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:insertBlock" ><A NAME="v%3AinsertBlock" ></A ></A ><B >insertBlock</B > :: <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l) -> <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ></TR ><TR ><TD CLASS="doc" ><TT ><A HREF="ZipCfg.html#v%3AinsertBlock" >insertBlock</A ></TT > should not be used to <EM >replace</EM > an existing block but only to insert a new one </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >class</SPAN > <A NAME="t:HavingSuccessors" ><A NAME="t%3AHavingSuccessors" ></A ></A ><B >HavingSuccessors</B > b <SPAN CLASS="keyword" >where</SPAN ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="ndoc" >We can't make a graph out of just any old 'last node' type. A last node has to be able to find its successors, and we need to be able to create and identify unconditional branches. We put these capabilities in a type class. Moreover, the property of having successors is also shared by <TT ><A HREF="ZipCfg.html#t%3ABlock" >Block</A ></TT >s and ZTails, so it is useful to have that property in a type class of its own. </TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="section4" >Methods</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A NAME="v:succs" ><A NAME="v%3Asuccs" ></A ></A ><B >succs</B > :: b -> [<A HREF="BlockId.html#t%3ABlockId" >BlockId</A >]</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fold_succs" ><A NAME="v%3Afold_succs" ></A ></A ><B >fold_succs</B > :: (<A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> a -> a) -> b -> a -> a</TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:HavingSuccessors')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:HavingSuccessors" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > <A HREF="ZipCfgCmmRep.html#t%3ALast" >Last</A ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > l => <A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > (<A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > (<A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l)</TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >class</SPAN > <A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > l => <A NAME="t:LastNode" ><A NAME="t%3ALastNode" ></A ></A ><B >LastNode</B > l <SPAN CLASS="keyword" >where</SPAN ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="section4" >Methods</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A NAME="v:mkBranchNode" ><A NAME="v%3AmkBranchNode" ></A ></A ><B >mkBranchNode</B > :: <A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> l</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:isBranchNode" ><A NAME="v%3AisBranchNode" ></A ></A ><B >isBranchNode</B > :: l -> <A HREF="../base-4.2.0.2/Data-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:branchNodeTarget" ><A NAME="v%3AbranchNodeTarget" ></A ></A ><B >branchNodeTarget</B ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="arg" >:: l</TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" >-> <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ><TD CLASS="rdoc" >N.B. This interface seems to make for more congenial clients than a single function of type 'l -> Maybe BlockId' </TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:LastNode')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:LastNode" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > <A HREF="ZipCfgCmmRep.html#t%3ALast" >Last</A ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:blockId" ><A NAME="v%3AblockId" ></A ></A ><B >blockId</B > :: <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="BlockId.html#t%3ABlockId" >BlockId</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:zip" ><A NAME="v%3Azip" ></A ></A ><B >zip</B > :: <A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:unzip" ><A NAME="v%3Aunzip" ></A ></A ><B >unzip</B > :: <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:last" ><A NAME="v%3Alast" ></A ></A ><B >last</B > :: <A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l -> <A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:goto_end" ><A NAME="v%3Agoto_end" ></A ></A ><B >goto_end</B > :: <A HREF="ZipCfg.html#t%3AZBlock" >ZBlock</A > m l -> (<A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m, <A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:zipht" ><A NAME="v%3Azipht" ></A ></A ><B >zipht</B > :: <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m -> <A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l</TD ></TR ><TR ><TD CLASS="doc" >Take a head and tail and go to beginning or end. The asymmetry in the types and names is a bit unfortunate, but 'Block m l' is effectively '(BlockId, ZTail m l)' and is accepted in many more places. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:tailOfLast" ><A NAME="v%3AtailOfLast" ></A ></A ><B >tailOfLast</B > :: l -> <A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:splice_tail" ><A NAME="v%3Asplice_tail" ></A ></A ><B >splice_tail</B > :: <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l -> <A HREF="ZipCfg.html#t%3AZTail" >ZTail</A > m l -> <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:splice_head" ><A NAME="v%3Asplice_head" ></A ></A ><B >splice_head</B > :: <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l, <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m)</TD ></TR ><TR ><TD CLASS="doc" ><P >We can splice a single-entry, single-exit LGraph onto a head or a tail. For a head, we have a head h followed by a LGraph g. The entry node of g gets joined to h, forming the entry into the new LGraph. The exit of g becomes the new head. For both arguments and results, the order of values is the order of control flow: before splicing, the head flows into the LGraph; after splicing, the LGraph flows into the head. Splicing a tail is the dual operation. (In order to maintain the order-means-control-flow convention, the orders are reversed.) </P ><P >For example, assume head = [L: x:=0] grph = (M, [M: <A HREF="stuff" >stuff</A >, <A HREF="blocks" >blocks</A >, N: y:=x; LastExit]) tail = [return (y,x)] </P ><P >Then splice_head head grph = ((L, [L: x:=0; goto M, M: <A HREF="stuff" >stuff</A >, <A HREF="blocks" >blocks</A >]) , N: y:=x) </P ><P >Then splice_tail grph tail = ( <A HREF="stuff" >stuff</A > , (???, [<A HREF="blocks" >blocks</A >, N: y:=x; return (y,x)]) </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:splice_head_only'" ><A NAME="v%3Asplice_head_only%27" ></A ></A ><B >splice_head_only'</B > :: <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m -> <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:splice_head'" ><A NAME="v%3Asplice_head%27" ></A ></A ><B >splice_head'</B > :: <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m -> <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l -> (<A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l), <A HREF="ZipCfg.html#t%3AZHead" >ZHead</A > m)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:of_block_list" ><A NAME="v%3Aof_block_list" ></A ></A ><B >of_block_list</B > :: <A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> [<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l] -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l</TD ></TR ><TR ><TD CLASS="doc" ><P >A safe operation </P ><P >Conversion to and from the environment form is convenient. For layout or dataflow, however, one will want to use <TT ><A HREF="ZipCfg.html#v%3Apostorder_dfs" >postorder_dfs</A ></TT > in order to get the blocks in an order that relates to the control flow in the procedure. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:to_block_list" ><A NAME="v%3Ato_block_list" ></A ></A ><B >to_block_list</B > :: <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> [<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:graphOfLGraph" ><A NAME="v%3AgraphOfLGraph" ></A ></A ><B >graphOfLGraph</B > :: <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l</TD ></TR ><TR ><TD CLASS="doc" >Conversion from LGraph to Graph </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:map_blocks" ><A NAME="v%3Amap_blocks" ></A ></A ><B >map_blocks</B > :: (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m' l') -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l'</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:map_one_block" ><A NAME="v%3Amap_one_block" ></A ></A ><B >map_one_block</B > :: (<A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> <A HREF="BlockId.html#t%3ABlockId" >BlockId</A >) -> (m -> m') -> (l -> l') -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m' l'</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:map_nodes" ><A NAME="v%3Amap_nodes" ></A ></A ><B >map_nodes</B > :: (<A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> <A HREF="BlockId.html#t%3ABlockId" >BlockId</A >) -> (m -> m') -> (l -> l') -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l'</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:mapM_blocks" ><A NAME="v%3AmapM_blocks" ></A ></A ><B >mapM_blocks</B > :: <A HREF="../base-4.2.0.2/Control-Monad.html#t%3AMonad" >Monad</A > mm => (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> mm (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m' l')) -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> mm (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l')</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:postorder_dfs" ><A NAME="v%3Apostorder_dfs" ></A ></A ><B >postorder_dfs</B > :: <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> [<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l]</TD ></TR ><TR ><TD CLASS="doc" ><P >Traversal: <TT ><A HREF="ZipCfg.html#v%3Apostorder_dfs" >postorder_dfs</A ></TT > returns a list of blocks reachable from the entry node. This list has the following property: </P ><P >Say a <A HREF="back reference.html" >back reference</A > exists if one of a block's control-flow successors precedes it in the output list </P ><P >Then there are as few back references as possible </P ><P >The output is suitable for use in a forward dataflow problem. For a backward problem, simply reverse the list. (<TT ><A HREF="ZipCfg.html#v%3Apostorder_dfs" >postorder_dfs</A ></TT > is sufficiently tricky to implement that one doesn't want to try and maintain both forward and backward versions.) </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:postorder_dfs_from" ><A NAME="v%3Apostorder_dfs_from" ></A ></A ><B >postorder_dfs_from</B > :: (<A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > b, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l) -> b -> [<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:postorder_dfs_from_except" ><A NAME="v%3Apostorder_dfs_from_except" ></A ></A ><B >postorder_dfs_from_except</B > :: (<A HREF="ZipCfg.html#t%3AHavingSuccessors" >HavingSuccessors</A > b, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="BlockId.html#t%3ABlockEnv" >BlockEnv</A > (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l) -> b -> <A HREF="BlockId.html#t%3ABlockSet" >BlockSet</A > -> [<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l]</TD ></TR ><TR ><TD CLASS="doc" ><P >This is the most important traversal over this data structure. It drops unreachable code and puts blocks in an order that is good for solving forward dataflow problems quickly. The reverse order is good for solving backward dataflow problems quickly. The forward order is also reasonably good for emitting instructions, except that it will not usually exploit Forrest Baskett's trick of eliminating the unconditional branch from a loop. For that you would need a more serious analysis, probably based on dominators, to identify loop headers. </P ><P >The ubiquity of <TT ><A HREF="ZipCfg.html#v%3Apostorder_dfs" >postorder_dfs</A ></TT > is one reason for the ubiquity of the <TT ><A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A ></TT > representation, when for most purposes the plain <TT ><A HREF="ZipCfg.html#t%3AGraph" >Graph</A ></TT > representation is more mathematically elegant (but results in more complicated code). </P ><P >Here's an easy way to go wrong! Consider <TT > A -> [B,C] B -> D C -> D </TT > Then ordinary dfs would give [A,B,D,C] which has a back ref from C to D. Better to get [A,B,C,D] </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fold_layout" ><A NAME="v%3Afold_layout" ></A ></A ><B >fold_layout</B > :: <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l => (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> <A HREF="../base-4.2.0.2/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> a -> a) -> a -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> a</TD ></TR ><TR ><TD CLASS="doc" ><P >For layout, we fold over pairs of 'Block m l' and 'Maybe BlockId' in layout order. The 'Maybe BlockId', if present, identifies the block that will be the layout successor of the current block. This may be useful to help an emitter omit the final goto of a block that flows directly to its layout successor. </P ><P >For example: fold_layout f z [ L1:B1, L2:B2, L3:B3 ] = z <A HREF="$" >$</A > f (L1:B1) (Just L2) <A HREF="$" >$</A > f (L2:B2) (Just L3) <A HREF="$" >$</A > f (L3:B3) Nothing where a <A HREF="$" >$</A > f = f a </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fold_blocks" ><A NAME="v%3Afold_blocks" ></A ></A ><B >fold_blocks</B > :: (<A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> a -> a) -> a -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> a</TD ></TR ><TR ><TD CLASS="doc" >We can also fold over blocks in an unspecified order. The ZipCfgExtras module provides a monadic version, which we haven't needed (else it would be here). </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fold_fwd_block" ><A NAME="v%3Afold_fwd_block" ></A ></A ><B >fold_fwd_block</B > :: (<A HREF="BlockId.html#t%3ABlockId" >BlockId</A > -> a -> a) -> (m -> a -> a) -> (<A HREF="ZipCfg.html#t%3AZLast" >ZLast</A > l -> a -> a) -> <A HREF="ZipCfg.html#t%3ABlock" >Block</A > m l -> a -> a</TD ></TR ><TR ><TD CLASS="doc" >Fold from first to last </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:translate" ><A NAME="v%3Atranslate" ></A ></A ><B >translate</B > :: <A HREF="../base-4.2.0.2/Control-Monad.html#t%3AMonad" >Monad</A > tm => (m -> tm (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l')) -> (l -> tm (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l')) -> <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> tm (<A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m' l')</TD ></TR ><TR ><TD CLASS="doc" >These translation functions are speculative. I hope eventually they will be used in the native-code back ends ---NR </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:pprLgraph" ><A NAME="v%3ApprLgraph" ></A ></A ><B >pprLgraph</B > :: (<A HREF="Outputable.html#t%3AOutputable" >Outputable</A > m, <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > l, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> <A HREF="Outputable.html#t%3ASDoc" >SDoc</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:pprGraph" ><A NAME="v%3ApprGraph" ></A ></A ><B >pprGraph</B > :: (<A HREF="Outputable.html#t%3AOutputable" >Outputable</A > m, <A HREF="Outputable.html#t%3AOutputable" >Outputable</A > l, <A HREF="ZipCfg.html#t%3ALastNode" >LastNode</A > l) => <A HREF="ZipCfg.html#t%3AGraph" >Graph</A > m l -> <A HREF="Outputable.html#t%3ASDoc" >SDoc</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:entry" ><A NAME="v%3Aentry" ></A ></A ><B >entry</B > :: <A HREF="ZipCfg.html#t%3ALGraph" >LGraph</A > m l -> <A HREF="ZipCfg.html#t%3AFGraph" >FGraph</A > m l</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 2.6.1</TD ></TR ></TABLE ></BODY ></HTML >