Skip to content

refactor: Refactor AssignTypes#1298

Open
scolsen wants to merge 2 commits intocarp-lang:masterfrom
scolsen:refactor-assign-types
Open

refactor: Refactor AssignTypes#1298
scolsen wants to merge 2 commits intocarp-lang:masterfrom
scolsen:refactor-assign-types

Conversation

@scolsen
Copy link
Copy Markdown
Contributor

@scolsen scolsen commented Aug 9, 2021

This commit contains a minimal refactor of the AssignTypes module:

  • Add an export list.
  • Use the xobj patterns defined in the Forms module.
  • Break out local functions into top level declarations.

scolsen added 2 commits August 9, 2021 12:53
This commit contains a minimal refactor of the AssignTypes module:

- Add an export list.
- Use the xobj patterns defined in the Forms module.
- Break out local functions into top level declarations.
@eriksvedang
Copy link
Copy Markdown
Collaborator

I like this a lot, very cool!

There are warnings and errors in the test suite though...

Comment thread src/AssignTypes.hs
isArrayTypeOK (StructTy (ConcreteNameTy (SymPath [] "Array")) [RefTy _ _]) = False -- An array containing refs!
isArrayTypeOK _ = True
assignTypes mappings x@(ListPat xs) =
mapM (assignTypes mappings) xs >>= pure . (setObj x) . Lst
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

superfluous parenthesis in between the ., right?

@eriksvedang
Copy link
Copy Markdown
Collaborator

@scolsen Do you know what's up with the errors here?

@scolsen
Copy link
Copy Markdown
Contributor Author

scolsen commented Aug 23, 2021

@scolsen Do you know what's up with the errors here?

Didn't look into it just yet, I'll try to take a look later today!

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