grindCauses :: M.HashMap HId [HId] -> [HId] -> [HId]
grindCauses cm = sortNub . goMany
  where 
    go i       = maybe [] goMany (M.lookup i cm) 
    goMany     = concatMap go

------------------------------------------------------------------------------
-- | State for Nelson-Oppen Engine -------------------------------------------
------------------------------------------------------------------------------
grindCauses :: M.HashMap HId [HId] -> [HId] -> [HId]
grindCauses cm = sortNub . goMany
  where 
    go i       = maybe [] goMany (M.lookup i cm) 
    goMany     = concatMap go

------------------------------------------------------------------------------
-- | State for Nelson-Oppen Engine -------------------------------------------
------------------------------------------------------------------------------
grindCauses cm = sortNub . goMany
  where 
    go i       = maybe [] goMany (M.lookup i cm) 
    goMany     = concatMap go

------------------------------------------------------------------------------
-- | State for Nelson-Oppen Engine -------------------------------------------
------------------------------------------------------------------------------