mirror of
https://github.com/anoma/juvix.git
synced 2024-12-28 18:11:49 +03:00
8956e51b33
* Adds the `--transforms`, `--eval` and `--no-print` options to the `juvix dev tree read` command. * Depends on #2598 * Depends on #2597 * Depends on #2596 * Depends on #2595 * Depends on #2594 * Depends on #2590
30 lines
809 B
Haskell
30 lines
809 B
Haskell
module Commands.Dev.Repl.Options where
|
|
|
|
import Commands.Repl.Options
|
|
import CommonOptions
|
|
import Juvix.Compiler.Core.Data.TransformationId (toStoredTransformations)
|
|
|
|
parseDevRepl :: Parser ReplOptions
|
|
parseDevRepl = do
|
|
let _replPrintValues = False
|
|
_replIsDev = True
|
|
_replInputFile <- optional (parseInputFile FileExtJuvix)
|
|
_replTransformations <- do
|
|
ts <- optCoreTransformationIds
|
|
pure $
|
|
if
|
|
| null ts -> toStoredTransformations
|
|
| otherwise -> ts
|
|
_replNoDisambiguate <- optNoDisambiguate
|
|
_replShowDeBruijn <-
|
|
switch
|
|
( long "show-de-bruijn"
|
|
<> help "Show variable de Bruijn indices"
|
|
)
|
|
_replNoPrelude <-
|
|
switch
|
|
( long "no-prelude"
|
|
<> help "Do not load the Prelude module on launch"
|
|
)
|
|
pure ReplOptions {..}
|