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

Tidying of idrisMain (fixes #1454). #3362

Merged
merged 1 commit into from
Aug 31, 2016
Merged

Tidying of idrisMain (fixes #1454). #3362

merged 1 commit into from
Aug 31, 2016

Conversation

jfdm
Copy link
Contributor

@jfdm jfdm commented Aug 12, 2016

Introduction of a new module Idris.Main that contains the code
required to launch and run an interactive Idris session---compilation,
REPL et cetera. It has been spun out of Idris.REPL; common code has
been spun out from both into Idris.ModeCommon.

With Idris.Main comes a new entry point for Idris and presents
developers with a more unified API for running Idris programs. A side
affect of this approach is that the imports for codegens must be
changed to import Idris.Main and not Idris.REPL.

TBH the imports for the new modules need pruning, I did a dump all just to ensure things would work. I've stuck an in-progress label to reflect that I need to sort the imports. Otherwise, tests aside this is good to go.

@melted
Copy link
Contributor

melted commented Aug 12, 2016

You can pass -fwarn-unused-imports to GHC to get a list of the ones that aren't needed.

12 aug. 2016 kl. 11:10 skrev Jan de Muijnck-Hughes notifications@github.com:

Introduction of a new module Idris.Main that contains the code
required to launch and run an interactive Idris session---compilation,
REPL et cetera. It has been spun out of Idris.REPL; common code has
been spun out from both into Idris.ModeCommon.

With Idris.Main comes a new entry point for Idris and presents
developers with a more unified API for running Idris programs. A side
affect of this approach is that the imports for codegens must be
changed to import Idris.Main and not Idris.REPL.

TBH the imports for the new modules need pruning, I did a dump all just to ensure things would work. I've stuck an in-progress label to reflect that I need to sort the imports. Otherwise, tests aside this is good to go.

You can view, comment on, or merge this pull request online at:

#3362

Commit Summary

Tidying of idrisMain (fixes #1454).
File Changes

M codegen/idris-codegen-c/Main.hs (3)
M codegen/idris-codegen-javascript/Main.hs (3)
M codegen/idris-codegen-node/Main.hs (2)
M idris.cabal (2)
M main/Main.hs (14)
A src/Idris/Main.hs (350)
A src/Idris/ModeCommon.hs (259)
M src/Idris/Package.hs (1)
M src/Idris/REPL.hs (398)
Patch Links:

https://github.com/idris-lang/Idris-dev/pull/3362.patch
https://github.com/idris-lang/Idris-dev/pull/3362.diff

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@jfdm
Copy link
Contributor Author

jfdm commented Aug 12, 2016

You can pass -fwarn-unused-imports to GHC to get a list of the ones that aren't needed.

Ah cheers for that, turns out when using intero mode and that option as a file pragma you can automatically resolve the warnings and remove the imports!

Introduction of a new module `Idris.Main` that contains the code
required to launch and run an interactive Idris session---compilation,
REPL et cetera. It has been spun out of `Idris.REPL`; common code has
been spun out from both into `Idris.ModeCommon`.

With `Idris.Main` comes a new entry point for Idris and presents
developers with a more unified API for running Idris programs. A side
affect of this approach is that the imports for codegens must be
changed to import `Idris.Main` and not `Idris.REPL`.
@jfdm
Copy link
Contributor Author

jfdm commented Aug 31, 2016

Merging as no news is good news.

@jfdm jfdm merged commit 5b2711f into idris-lang:master Aug 31, 2016
@jfdm jfdm deleted the isolate-main branch August 31, 2016 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants