Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reflex-frp/reflex-ghci
Run GHCi from within a Reflex FRP application and interact with it using a functional reactive interface.
https://github.com/reflex-frp/reflex-ghci
developer-tools ghci haskell reload repl
Last synced: 3 months ago
JSON representation
Run GHCi from within a Reflex FRP application and interact with it using a functional reactive interface.
- Host: GitHub
- URL: https://github.com/reflex-frp/reflex-ghci
- Owner: reflex-frp
- License: bsd-3-clause
- Created: 2020-01-15T20:27:03.000Z (almost 5 years ago)
- Default Branch: develop
- Last Pushed: 2024-03-02T05:29:21.000Z (8 months ago)
- Last Synced: 2024-06-19T23:58:03.792Z (5 months ago)
- Topics: developer-tools, ghci, haskell, reload, repl
- Language: Haskell
- Homepage: https://reflex-frp.org
- Size: 238 KB
- Stars: 38
- Watchers: 16
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# reflex-ghci
[![Haskell](https://img.shields.io/badge/language-Haskell-orange.svg)](https://haskell.org) [![Hackage](https://img.shields.io/hackage/v/reflex-ghci.svg)](https://hackage.haskell.org/package/reflex-ghci) [![BSD3 License](https://img.shields.io/badge/license-BSD3-blue.svg)](https://github.com/reflex-frp/reflex-ghci/blob/master/LICENSE)
Run GHCi from within a [Reflex FRP](https://reflex-frp.org) application and interact with it using a functional reactive interface.
![Screenshot](https://i.imgur.com/5y61Qx7.png)
## Library
A functional-reactive wrapper around GHCi that uses filesystem notifications to automatically reload haskell source files.
`Reflex.Process.GHCi` provides the core GHCi process-running infrastructure. If you want to run your own GHCi, directly control when it reloads, or build your own custom interface, look there.
`Reflex.Vty.GHCi` provides a few widgets that are useful when building a console GHCi interface. Use these components to assemble your own vty GHCi runner.
## Executable
This package includes a [reflex-vty](https://github.com/reflex-frp/reflex-vty)-based executable, shown above. Module information (errors, warnings, etc) is shown in a scrollable pane on the top half of the screen and the output of any expression you (optionally) choose to evaluate is shown in a scrollable pane on the bottom half. The panes are resizable using the mouse.
```bash
$ reflex-ghci -h
Welcome to reflex-ghci 0.1.4.0Usage: reflex-ghci [-c|--command COMMAND] [-e|--expression EXPR]
Run a Haskell REPL that automatically reloads when source files change.Available options:
-c,--command COMMAND The ghci/cabal repl command to
run (default: "cabal repl --repl-options=-Wall")
-e,--expression EXPR The optional expression to evaluate once modules have
successfully loaded
-h,--help Show this help text```
## Acknowledgements
Inspired by the fantastic [ghcid](https://github.com/ndmitchell/ghcid) project.