Questions tagged [haskeline]
25 questions
2
votes
0 answers
Using ansi-wl-pprint with haskeline
How does one use ansi-wl-pprint with haskeline, without losing Windows support?
ansi-wl-pprint has two ways to output a SimpleDoc:
(\doc -> displayS doc "") :: SimpleDoc -> String
displayIO stdout :: SimpleDoc -> IO ()
However, the documentation…

Nathan Ringo
- 973
- 2
- 10
- 30
1
vote
1 answer
Haskeline throws linking error in stack build
I'm trying to build haskell project via stack build command, but it throws excepton:
-- While building package %some secret project name%-0.1.0.0 (scroll up to its section to see the error) using:
/home/%some secret…

someone1231
- 60
- 6
1
vote
0 answers
Haskeline word completion with list
Haskell newbie here and also first time asking a question here, apologies in advance for anything I may have missed anything.
Im writing a repl function that takes user input, adds the input to a list and uses haskeline to tab complete user input…

shadow123
- 11
- 2
1
vote
0 answers
Haskeline history in the wrong order
I'm using Haskeline to make a CLI interface for a program.
I use the basic configuration of Haskeline to save the commands stroked in a file.
mySettings = defaultSettings {
autoAddHistory = True
…

JeanJouX
- 2,555
- 1
- 25
- 37
1
vote
0 answers
unwrap getInputLine result from Input
I'm getting a result from getInputline, whose type is:
(MonadException m) => IO String -> InputT m (Maybe String)
I'd like to get just the Maybe String part. I'm well aware that in general there is no way to strip a monad, as explained in this…

dimid
- 7,285
- 1
- 46
- 85
1
vote
1 answer
Using mtl's MonadReader with haskeline has type error
I want use InputT (ReaderT Int IO) a with MonadReader Int.
I write below code to make instance MonadReader on InputT
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
module…

juhyung park
- 503
- 4
- 8
1
vote
2 answers
How to write ~/.haskeline so that ghci or haskeline can behave properly on `home` and `end`
My question is how to make my ghci react properly on my home and end press.
I learned that ghci use haskeline to react to user input, and haskeline's behavior is partially defined in ~/.haskeline to some extent.
I have being suffering from the lack…

TorosFanny
- 1,702
- 1
- 16
- 25
1
vote
0 answers
How to clean ghci command history?
I have read on a simmilar question that GHCI is written on haskeline lib but I must admit that that doesn't help me enough.
I tried
import System.Console.Haskeline.History
and calling the
emptyHistory
but I do not know to to reference to the…

ditoslav
- 4,563
- 10
- 47
- 79
0
votes
1 answer
cabal-install-0.10.2 failed during the building phase
I was trying to install haskeline, it's my first time installing using cabal, and here is what I got. What should I do?
. sudo cabal install haskeline
Password:
Config file /Users/arie/.cabal/config not found.
Writing default configuration to…

Arie
- 1,115
- 1
- 11
- 19
0
votes
1 answer
readInputLine with IO String
I would like to read an input string with a custom prompt, however the prompt string comes from impure context, thus I can't use readInputLine as is. I've tried to implement a function based on this answer
getLineIO :: MonadException m => IO String…

dimid
- 7,285
- 1
- 46
- 85