homepage: https://github.com/lehmacdj/readline-in-other-words#readme
changelog-type: markdown
hash: 67f6d839c87d546b6e76852fc066193de5d94fc9b7347d086d09da616bd8b423
test-bench-deps: {}
maintainer: Devin Lehmacher
synopsis: Readline effect for in-other-words.
changelog: |
  # Revision history for readline-in-other-words

  ## 0.1.0.0 -- 2021-11-04

  * First version. Released on an unsuspecting world.
basic-deps:
  haskeline: '>=0.8.1 && <0.8.3'
  base: '>=4.13 && <4.17'
  monad-control: ==1.0.*
  readline-in-other-words: -any
  in-other-words-plugin: ==0.1.0.0
  mtl: ==2.2.*
  in-other-words: '>=0.2.0.0 && <0.2.1.0'
all-versions:
- 0.1.0.0
author: Devin Lehmacher
latest: 0.1.0.0
description-type: markdown
description: |
  # readline-in-other-words
  [![GitHub Actions](https://github.com/lehmacdj/readline-in-other-words/actions/workflows/ci.yml/badge.svg)](https://github.com/lehmacdj/readline-in-other-words/actions/workflows/ci.yml)
  [![Hackage](https://img.shields.io/hackage/v/readline-in-other-words.svg?logo=haskell)](https://hackage.haskell.org/package/readline-in-other-words)

  This package provides a few [in-other-words](https://github.com/KingoftheHomeless/in-other-words#readme) effects that collectively provide the full functionality of [haskeline](https://github.com/judah/haskeline#readme). See Haskeline's documentation for additional usage information.

  ## Example Usage
  This is all it takes to write a miniature repl using this library:
  ```
  {-# LANGUAGE DataKinds #-}
  {-# LANGUAGE FlexibleContexts #-}
  {-# LANGUAGE GADTs #-}

  module Main where

  import Control.Effect
  import Control.Effect.Readline

  repl :: Effs '[Readline, HandleInterrupt] m => m ()
  repl = handleInterrupt (outputStrLn "Interrupt!" *> repl) $
    withInterrupt $ do
      mline <- getInputLine "> "
      case mline of
        Nothing -> pure ()
        Just line -> outputStrLn line *> repl

  main :: IO ()
  main = runM $ runReadline defaultSettings repl
  ```

  This will echo whatever text you write, and catches interrupts announcing that
  they occurred and preventing the program from terminating. This example is also
  available as the `echo-repl` target in `examples/Echo.hs`.

  ## Contributions
  Bug reports and PRs are welcome.
license-name: BSD-2-Clause

Update from Hackage at 2021-11-05T05:08:30Z
Update from Hackage at 2021-11-05T05:08:30Z
