feat(emacs): haskell-ts-mode

This commit is contained in:
2026-09-02 07:55:33 -06:00
parent 28cc8474cd
commit cffe715e30
5 changed files with 110 additions and 11 deletions
+14 -2
View File
@@ -12,8 +12,20 @@ in {
builtins.readFile ./haskell/ghc-with-packages.sh;
home.file.".ghc/ghci.conf".text = ''
:set prompt "\x1b[38;5;5mλ>\x1b[0m "
:set prompt-cont "\x1b[38;5;5m|>\x1b[0m "
:{
ghci_set_prompt :: IO String
ghci_set_prompt = do
term <- System.Environment.Blank.getEnvDefault "TERM" ""
let (prompt,promptCont) =
if Data.List.isPrefixOf "xterm-" term
then ("\x1b[38;5;5mλ>\x1b[0m ", "\x1b[38;5;5m|>\x1b[0m ")
else ("λ> ", "|> ")
pure . unlines $
[ ":set prompt " ++ show prompt
, ":set prompt-cont " ++ show promptCont
]
:}
:cmd ghci_set_prompt
:set -interactive-print=Text.Pretty.Simple.pPrint
:m + Text.Show.Functions
:unset +r