1
1
mirror of https://github.com/anoma/juvix.git synced 2024-10-27 02:04:29 +03:00
juvix/app/Commands/Dev.hs

36 lines
1.3 KiB
Haskell
Raw Normal View History

module Commands.Dev
( module Commands.Dev,
2022-09-14 17:16:15 +03:00
module Commands.Dev.Options,
)
where
2022-09-14 17:16:15 +03:00
import Commands.Base
2022-09-29 18:44:55 +03:00
import Commands.Dev.Asm qualified as Asm
2022-09-14 17:16:15 +03:00
import Commands.Dev.Core qualified as Core
import Commands.Dev.DisplayRoot qualified as DisplayRoot
Add Geb Backend Evaluator with some extra subcommands (#1808) This PR introduces an evaluator for the Geb STLC interface/fragment and other related commands, including a REPL to interact with his backend. - https://github.com/anoma/geb/blob/mariari/binaries/src/specs/lambda.lisp We have included a REPL and support for commands such as read and eval here. Check out: ``` juvix dev geb --help ``` - [x] Add Geb evaluator with the two basic eval strategies. - [x] Add quasi quoter: return morphisms from typed geb values. - [x] Add type/object inference for morphisms. - [x] All combined: morphisms-eval-to-morphisms - [x] Parse and pretty printer Geb values (without quoting them) - [x] Parse files containing Geb terms: - [x] Saved in a .lisp file according to anoma/geb example (typed object). - [x] Store in a .geb file simple as simple lisp expression. - [x] Add related commands to the CLI for `dev geb`: - [x] Subcommand: eval - [x] Subcommand: read - [x] Subcommand: infer - [x] Subcommand: repl - [x] Subcommand: check - [x] Minor changes `hom` by `!->` in the Geb prettyprinter - [x] Add tests for: - [x] New subcommand (smoke tests) - [x] Eval Issues to solve after merging this PR: - Add location to Geb ast for proper error location. - Add tests for all related subcommands, e.g. check, and infer. - Check compilation from Core to Geb: (run inferObject with the type provided by the core node). - [x] Update the vs code-plugin to load Geb repl and eval. (https://github.com/anoma/vscode-juvix/commit/31994c8684e9b44a62d58ac13304b9e04503410c)
2023-02-22 17:27:40 +03:00
import Commands.Dev.Geb qualified as Geb
2022-09-14 17:16:15 +03:00
import Commands.Dev.Highlight qualified as Highlight
import Commands.Dev.Internal qualified as Internal
import Commands.Dev.MigrateJuvixYaml qualified as MigrateJuvixYaml
2022-09-14 17:16:15 +03:00
import Commands.Dev.Options
import Commands.Dev.Parse qualified as Parse
2022-11-03 11:38:09 +03:00
import Commands.Dev.Runtime qualified as Runtime
2022-09-14 17:16:15 +03:00
import Commands.Dev.Scope qualified as Scope
import Commands.Dev.Termination qualified as Termination
import Commands.Repl qualified as Repl
2022-09-14 17:16:15 +03:00
runCommand :: (Members '[Embed IO, App, TaggedLock] r) => DevCommand -> Sem r ()
2022-09-14 17:16:15 +03:00
runCommand = \case
Highlight opts -> Highlight.runCommand opts
Parse opts -> Parse.runCommand opts
Scope opts -> Scope.runCommand opts
Internal opts -> Internal.runCommand opts
Termination opts -> Termination.runCommand opts
Core opts -> Core.runCommand opts
Add Geb Backend Evaluator with some extra subcommands (#1808) This PR introduces an evaluator for the Geb STLC interface/fragment and other related commands, including a REPL to interact with his backend. - https://github.com/anoma/geb/blob/mariari/binaries/src/specs/lambda.lisp We have included a REPL and support for commands such as read and eval here. Check out: ``` juvix dev geb --help ``` - [x] Add Geb evaluator with the two basic eval strategies. - [x] Add quasi quoter: return morphisms from typed geb values. - [x] Add type/object inference for morphisms. - [x] All combined: morphisms-eval-to-morphisms - [x] Parse and pretty printer Geb values (without quoting them) - [x] Parse files containing Geb terms: - [x] Saved in a .lisp file according to anoma/geb example (typed object). - [x] Store in a .geb file simple as simple lisp expression. - [x] Add related commands to the CLI for `dev geb`: - [x] Subcommand: eval - [x] Subcommand: read - [x] Subcommand: infer - [x] Subcommand: repl - [x] Subcommand: check - [x] Minor changes `hom` by `!->` in the Geb prettyprinter - [x] Add tests for: - [x] New subcommand (smoke tests) - [x] Eval Issues to solve after merging this PR: - Add location to Geb ast for proper error location. - Add tests for all related subcommands, e.g. check, and infer. - Check compilation from Core to Geb: (run inferObject with the type provided by the core node). - [x] Update the vs code-plugin to load Geb repl and eval. (https://github.com/anoma/vscode-juvix/commit/31994c8684e9b44a62d58ac13304b9e04503410c)
2023-02-22 17:27:40 +03:00
Geb opts -> Geb.runCommand opts
2022-09-29 18:44:55 +03:00
Asm opts -> Asm.runCommand opts
2022-11-03 11:38:09 +03:00
Runtime opts -> Runtime.runCommand opts
2022-12-20 15:05:40 +03:00
DisplayRoot opts -> DisplayRoot.runCommand opts
JuvixDevRepl opts -> Repl.runCommand opts
MigrateJuvixYaml opts -> runFilesIO $ MigrateJuvixYaml.runCommand opts