A TeXmacs plugin for running GHCi sessions.
Last release binaries are compiled with GHC 9.2.8, and they can be obtained from the releases page. The Windows binary is considerably larger due to the lack of dynamic libraries in Haskell distributions for Windows.
To install, uncompress the archive for your OS at $TEXMACS_PATH/plugins/
(usually /usr/share/TeXmacs/plugins/
in Linux,
<TeXmacs_install_dir>\plugins\
in Windows) or
$TEXMACS_HOME_PATH/plugins/
($HOME/.TeXmacs/plugins/
in
Linux, %UserProfile%\AppData\Roaming\TeXmacs\plugins\
in Windows.)
ghci
needs to be in the system $PATH
for the plugin to work.
The plugin itself is simple -- mostly forwarding input and output. The resulting interaction and evaluation features are all TeXmacs's.
Building the plugin requires a bash-style shell and a Haskell
distribution. In Windows, this means
using MSYS2. Installing through
ghcup allows setting up a MSys2
distribution for your Haskell setup alone (recommended) and installing the
development tools so that make
, strip
and other required utilities are
available.
Once this is done, type:
make deploy
which takes care of compiling and installing the plug-in in the appropriate
directory ($TEXMACS_HOME_PATH/plugins
.)
While this should be sufficient, this software is still in beta phase. Please report any mishaps to the email address below.
The primary function of the plugin is to pass TeXmacs's input to GHCi and then report back. That's it. However, that's enough for TeXmacs to do plenty, beyond providing just a better-typeset REPL: background evaluation, referrable expression cells -- even spreadsheets built out of Haskell/GHCi expressions.
For this version, I decided to add all of the functionality I'd want if I were to get serious about writing and documenting an extensive Haskell project. These new features will be added: project awareness (i.e., tm-ghci will run a Cabal or Stack REPL using project assets), tab-completion, importing syntax-highlighted Haskell code and making Haskell/GHCi a scripting language.
Those new features imply some refactoring. The minimalistically didactical single-file project simply has to go away. Nevertheless I'm hoping proper module organization will still convey that impression for each individual feature, as the features are, in my opinion, worth having.
tm_ghci
is beta-stage software. It's only been tested in Windows 10 and
Arch Linux. I don't own a MacOS system, so I'm unable to provide the
respective version. If anyone is willing to volunteer to compile and test,
please drop me a line.
tm-ghci
is distributed under the MIT License.
See the LICENSE file for details.
- Send feedback to 10951848+
nopeCubOfJudahsLion äτ users.noreply.github.com. - Bug reports must include the steps required to reproduce the error.
- The TeXmacs developers for giving us such a magnificent tool.
- Massimiliano Gubinelli for setting me straight on the plugin help file mechanism.