gpt4 book ai didi

haskell - 配置堆栈 ghci 提示符

转载 作者:行者123 更新时间:2023-12-03 19:20:59 31 4
gpt4 key购买 nike

是否可以配置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/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com