1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-09 22:11:27 +03:00
juvix/stack.yaml
Jan Mas Rovira e944f85074
Add :def command to the repl (#2119)
This pr adds a new command, `:def` to the repl. This command expects a
single identifier that must be in scope and then prints its definition.
For constructors, the whole type definition is printed.

It also applies some refactors to the code for repl command.
1. Before there was a mega `where` block of definitions. I have hoisted
most of the definitions there to the top level. I feel like now it is
easier to navigate and read.
2. Use `ExceptT` instead of local `case` expressions for errors.
3. Use forks of `haskeline` and `repline`. These forks are necessary
because these libraries do not export the constructors `HaskelineT` and
`InputT` respectively, thus, making it impossible to catch errors in
their underlying monad.
2023-05-30 10:19:09 +02:00

9 lines
307 B
YAML

ghc-options:
"$locals": -optP-Wno-nonportable-include-path
resolver: lts-20.21
extra-deps:
- git: https://github.com/janmasrovira/repline.git
commit: a735ab1459db408adda080eb5ea21b96fb4a6011
- git: https://github.com/janmasrovira/haskeline.git
commit: 81e393e156508a20fcc197acc945b0f44aa4f82b