Skip to content

Remove some JS dependencies related to foreign declarations from core#1006

Merged
garyb merged 1 commit intopurescript:core-impfrom
andyarvanitis:core-imp
Mar 27, 2015
Merged

Remove some JS dependencies related to foreign declarations from core#1006
garyb merged 1 commit intopurescript:core-impfrom
andyarvanitis:core-imp

Conversation

@andyarvanitis
Copy link
Copy Markdown
Contributor

Changes due to some dependencies on JS in core that I encountered while beginning to rewrite C++ support. The use of String in ExternDeclaration might be too loose, but I'm not sure how much it matters if the FFI will change soon.

@paf31
Copy link
Copy Markdown
Contributor

paf31 commented Mar 27, 2015

@garyb I'll leave this one to you to review, since you know the code the best. Maybe newtyping the String would be good though? Given this construct is likely going away in 0.8, it might not matter too much.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 77.13% when pulling b151eef on andyarvanitis:core-imp into e1a4798 on purescript:core-imp.

@garyb
Copy link
Copy Markdown
Member

garyb commented Mar 27, 2015

Looks basically fine to me, I'd like to move a few things around perhaps to defer the mapping of extern type to CoreImp rather than CoreFn, but I'll merge this as it is and then have a play. Thanks!

garyb added a commit that referenced this pull request Mar 27, 2015
Remove some JS dependencies related to foreign declarations from core
@garyb garyb merged commit 1230cf1 into purescript:core-imp Mar 27, 2015
@andyarvanitis
Copy link
Copy Markdown
Contributor Author

Cool, thanks!

@garyb
Copy link
Copy Markdown
Member

garyb commented Mar 27, 2015

Ok, done my tweaks - I introduced a ForeignCode newtype even if it is just a temporary thing, and it maintains that type throughout the Core steps now, I just remap it to JS in the JS codgen. Does that still work for what you need? I figure that should still work as we can just insert another step in the compilation process if it needs some special handling before going into codegen.

@andyarvanitis
Copy link
Copy Markdown
Contributor Author

I'm pretty sure that will be fine -- I'll make sure when I get back to my desk in a little while.

@andyarvanitis
Copy link
Copy Markdown
Contributor Author

👍

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.

4 participants