hlint suggestion

Found:
  case M.lookup x m of
      Nothing -> hit ! x
      Just r -> r
Why not:
  fromMaybe (hit ! x) (M.lookup x m)