getIndex :: String -> Graph -> Index
getIndex name graph = case findNode (qnode name) graph of
                          Just i  -> i
                          Nothing -> error $ "no such node: " ++ name
getIndex :: String -> Graph -> Index
getIndex name graph = case findNode (qnode name) graph of
                          Just i  -> i
                          Nothing -> error $ "no such node: " ++ name
getIndex name graph = case findNode (qnode name) graph of
                          Just i  -> i
                          Nothing -> error $ "no such node: " ++ name