Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor locvar dtype #271

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

Refactor locvar dtype #271

wants to merge 25 commits into from

Conversation

vidsinghal
Copy link
Collaborator

@vidsinghal vidsinghal commented Oct 17, 2024

Old:
type LocVar = Var

New:
data LocVar = Single Var

This branch is to make the old compiler work and pass test suite but it is only a refactoring PR

Comment on lines 236 to 237
initFunEnv' :: FunDefs LocVar a -> TyEnv LocVar (ArrowTy (TyOf a))
initFunEnv' fds = M.map funTy fds
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to avoid copy-pasting. There may be enough to have a single version of initFunEnv and maybe insertFD, if you use polymorphism. E.g. does this work:

initFunEnv :: FunDefs v a -> TyEnv v (ArrowTy (TyOf a))
initFunEnv fds = M.map funTy fds

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants