diff options
author | Camil Staps | 2016-07-01 19:36:24 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-01 19:36:24 +0200 |
commit | 90c4e8dfa6ab9d0549f833babfad74a396a053d8 (patch) | |
tree | bb0c0095fd2f5220844e94cac843b847d79682d2 /GraphStore.icl | |
parent | Driver, Instructions (diff) |
Assembler
Diffstat (limited to 'GraphStore.icl')
-rw-r--r-- | GraphStore.icl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/GraphStore.icl b/GraphStore.icl index 6f2a2e0..0f32994 100644 --- a/GraphStore.icl +++ b/GraphStore.icl @@ -40,15 +40,15 @@ where show_nd :: Node [Desc] -> String show_nd (Basic _ e b) _ = e <+ " " <+ b - show_nd (Node d e a) ds = d_name (ds_get d ds) <+ " " <+ e <+ " " <+ a + show_nd (Node d e a) ds = d_name (ds_get d ds) <+ " " <+ e <+ " [" <++ (",", a) <+ "]" show_nd Empty _ = "Empty" gs_get :: NodeId GraphStore -> Node -gs_get i {nodes} = get i nodes +gs_get i {nodes,free} = get (i-free-1) nodes where get :: NodeId [Node] -> Node get 0 [n:_] = n - get _ [] = abortn "gs_get: index too large" + get _ [] = abortn ("gs_get: index " <+ i <+ " too large for " <+ length nodes <+ " node(s)") get i [_:s] = get (i-1) s gs_init :: GraphStore |