-- |Creates a new id for the given entry in the IdxSet, incrementing the set and returning the
-- |modified one 
nid :: Int -> IdxSet -> IdxSet -> IdxSet
nid i hl (h:t) = if (i == 0) then (nid (i-1) ((h+1):hl) t) else (nid (i-1) (h:hl) t)
nid :: Int -> IdxSet -> IdxSet -> IdxSet
nid i hl (h:t) = if (i == 0) then (nid (i-1) ((h+1):hl) t) else (nid (i-1) (h:hl) t)
nid i hl (h:t) = if (i == 0) then (nid (i-1) ((h+1):hl) t) else (nid (i-1) (h:hl) t)