是否可以配置stack ghci
类似于ghci
的方式通过 ~/.ghci
配置文件?
目前stack ghci
不接受 ~/.ghci
中的设置文件。
我正在研究将提示设置为 lambda 而不是加载的模块:
:set prompt "\ESC[33m\STXλ> \ESC[m\STX"
更新
[neo@nixos:~/HaskellLearning/IdeTest]$ stack ghci The following GHC options are incompatible with GHCi and have not been passed to it: -threaded Configuring GHCi with the following packages: IdeTest Using main module: 1. Package `IdeTest' component exe:IdeTest-exe with main-is file: /home/neo/HaskellLearning/IdeTest/app/Main.hs GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/neo/HaskellLearning/IdeTest/.ghci Loaded GHCi configuration from /home/neo/.ghci [1 of 9] Compiling Ch13
( /home/neo/HaskellLearning/IdeTest/src/Ch13.hs, interpreted ) [2 of 9] Compiling Ch15 ( /home/neo/HaskellLearning/IdeTest/src/Ch15.hs, interpreted ) [3 of 9] Compiling Ch17 ( /home/neo/HaskellLearning/IdeTest/src/Ch17.hs, interpreted ) ... Ok, 9 modules loaded. Loaded GHCi configuration from /run/user/1000/ghci31082/ghci-script *Main Ch13 Ch15 Ch17 Functor HelloError Lib Phone SemigroupAndMonoid>
提到的其他 2 个配置都没有对更改提示做任何事情。
最佳答案
尝试将您的配置放在:
~/.ghc/ghci.conf
在 Ubuntu 16.04 上为我工作。
关于haskell - 配置堆栈 ghci 提示符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48895340/