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

Use different command types for each arity #1063

Merged
merged 2 commits into from
Dec 13, 2020

Conversation

jacereda
Copy link
Contributor

No description provided.

@jacereda
Copy link
Contributor Author

This should get rid of the ugly errors introduced to address incomplete patterns in the Commands module.

Be careful, there're some bits I'm not sure about. I'll start a review to ask about them.

src/Eval.hs Outdated Show resolved Hide resolved
src/Eval.hs Show resolved Hide resolved
Right (XObj (Lst [XObj (Command (NullaryCommandFunction nullary)) _ _, _, _]) _ _) ->
nullary ctx''
Right (XObj (Lst [XObj (Command (UnaryCommandFunction unary)) _ _, _, _]) _ _) ->
case expandedArgs of
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should these use args or expandedArgs?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure, do you think it ever matters? I'll merge as is, seems fine...

@jacereda
Copy link
Contributor Author

Primitives could follow a similar approach.

@jacereda jacereda changed the title chore: Use different command types for each arity Use different command types for each arity Dec 10, 2020
@jacereda jacereda requested a review from a team December 10, 2020 22:20
src/Eval.hs Outdated Show resolved Hide resolved
Copy link
Member

@hellerve hellerve left a comment

Choose a reason for hiding this comment

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

I think this is a good quality of life improvement!

Right (XObj (Lst [XObj (Command (NullaryCommandFunction nullary)) _ _, _, _]) _ _) ->
nullary ctx''
Right (XObj (Lst [XObj (Command (UnaryCommandFunction unary)) _ _, _, _]) _ _) ->
case expandedArgs of
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure, do you think it ever matters? I'll merge as is, seems fine...

@eriksvedang eriksvedang merged commit a0a3976 into carp-lang:master Dec 13, 2020
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.

3 participants