rangeE :: MonadInterp m Range => Exp -> m Range
rangeE (VarE v) = do
  maybe_d <- lookupVar v
  case maybe_d of
    Just d  -> return d
    Nothing -> return $ Range $ I Nothing (Set.singleton (VarE v))
rangeE :: MonadInterp m Range => Exp -> m Range
rangeE (VarE v) = do
  maybe_d <- lookupVar v
  case maybe_d of
    Just d  -> return d
    Nothing -> return $ Range $ I Nothing (Set.singleton (VarE v))
rangeE (VarE v) = do
  maybe_d <- lookupVar v
  case maybe_d of
    Just d  -> return d
    Nothing -> return $ Range $ I Nothing (Set.singleton (VarE v))