评论.ghci文件

bug*_*fix 0 haskell ghc ghci

是否可以在.ghci文件中添加注释?

例如

:set +r # https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html#faq-and-things-to-watch-out-for
Run Code Online (Sandbox Code Playgroud)

这对于记录和切换行为都很有用.

lef*_*out 5

当然,他们只是正常的Haskell评论.事实上,这就是我的.ghci文件的样子,有很多东西被注释掉了:

-- :def hoogle \x -> return $ ":!hoogle \"" ++ x ++ "\""
-- :def doc \x -> return $ ":!hoogle --info \"" ++ x ++ "\""
:set -XTypeOperators
:set -XTupleSections
:set -XFlexibleContexts
:set -XGADTs

-- Pretty printing of it
-- :set -package ghci-pretty
-- import IPPrint.Colored
-- :set -interactive-print=IPPrint.Colored.cpprint

...
Run Code Online (Sandbox Code Playgroud)

(不知道为什么我这样做BTW,我通常只删除我不使用的东西,并在必要时通过版本控制恢复它.)