linenoise: A lightweight readline-replacement library for Haskell

[ bsd3, library, program, user-interfaces ] [ Propose Tags ]

Please see the README on GitHub at https://github.com/ejconlon/haskell-linenoise#readme


[Skip to Readme]
Versions [faq] 0.3.0, 0.3.1
Dependencies base (>=4.12 && <5), bytestring (>=0.10), exceptions (>=0.10), linenoise, mtl (>=2.2), text (>=1.2), unliftio-core (>=0.1) [details]
License BSD-3-Clause
Copyright 2014 Stephen Diehl, 2019 Eric Conlon
Author Stephen Diehl, Eric Conlon
Maintainer ejconlon@gmail.com
Category User Interfaces
Home page https://github.com/ejconlon/haskell-linenoise#readme
Bug tracker https://github.com/ejconlon/haskell-linenoise/issues
Source repo head: git clone https://github.com/ejconlon/haskell-linenoise
Uploaded by ejconlon at Thu Jan 9 20:05:05 UTC 2020
Distributions NixOS:0.3.1
Executables linenoise-demo
Downloads 290 total (101 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-01-09 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for linenoise-0.3.1

[back to package description]

linenoise

CircleCI

A lightweight readline-replacement library for Haskell based on the linenoise library. (Not production ready!) See the demo app for usage, or see the climb library for higher-level building blocks for GHCi-like REPLs with colon-commands.

Differences from alternatives

  • haskeline
    • This uses FFI to a minimal C library vs pure Haskell
    • This uses standard MTL/Unlift typeclasses vs custom ones.
    • This does not require the use of a specific monad transformer.
  • readline
    • This offers a MonadIO/MonadUnliftIO interface vs raw IO.
    • This vendors and statically links its underlying library to simplify the build process.

License and attribution

This library includes the source code and license for linenoise in cbits. It is a fork of an older library with all licensing and attribution preserved.

Development workflow

This project uses stack to build.

The Makefile has a bunch of relevant phony targets for a development workflow including

  • build - Build the library and demo
  • download - Update vendored linenoise
  • demo - Run the demo app
  • deps - Install dev tools
  • lint - Lint with hlint
  • format - Format with stylish-haskell
  • docs - Generate docs

In addition, there are targets starting with ci that are invoked in various CI phases.

TODO

  • Support unicode (may involve vendoring a linenoise fork)
  • Verify that the FFI modifications for ByteString are memory-safe