From bd98551ec96f8006e0587addbfd85e4786ed253f Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Sat, 30 Nov 2024 14:28:16 +0530 Subject: [PATCH] ghc: Miscellaneous updates and clean up --- ghc/.ghc/ghci.conf | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/ghc/.ghc/ghci.conf b/ghc/.ghc/ghci.conf index 1ff2b5f..17388a3 100644 --- a/ghc/.ghc/ghci.conf +++ b/ghc/.ghc/ghci.conf @@ -1,22 +1,33 @@ -- -------------------------------------------------------------------- -- -- Default Extensions +-- https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html +-- GHC2024 gives errors with various projects -:set -XRankNTypes -:set -XGADTs -:set -XTypeFamilies -:set -XTypeApplications :set -XBangPatterns +:set -XConstraintKinds +:set -XDataKinds +:set -XDuplicateRecordFields +:set -XFlexibleContexts +:set -XGADTs :set -XMagicHash :set -XMultiParamTypeClasses -:set -XPatternSynonyms -:set -XDataKinds -:set -XConstraintKinds -:set -XOverloadedStrings :set -XNumericUnderscores -:set -XFlexibleContexts -:set -XScopedTypeVariables :set -XOverloadedRecordDot -:set -XDuplicateRecordFields +:set -XOverloadedStrings +:set -XPatternSynonyms +:set -XRankNTypes +:set -XScopedTypeVariables +:set -XTypeApplications + +-- -------------------------------------------------------------------- -- +-- Useful flags + +:set -fprint-explicit-foralls +:set -fprint-explicit-kinds +:set -ferror-spans +-- Enable multi-line expressions with :{ and :} +:set +m +-- Colorizing and pretty-printing ghci output :set -interactive-print=Text.Pretty.Simple.pPrint -- -------------------------------------------------------------------- -- @@ -42,7 +53,8 @@ -- -------------------------------------------------------------------- -- -- Util cmds +:def fzf const . pure $ ":! cat $HOME/.ghc/ghci_history | fzf --height 25" :def hlint const . return $ ":! hlint \"src\"" :def hoogle \s -> return $ ":! hoogle --color --count=15 " ++ show s :def rg \s -> return $ ":! rg " ++ s -:def fzf const . pure $ ":! cat $HOME/.ghc/ghci_history | fzf --height 25" +:def tags \_ -> return ":! fast-tags --fully-qualified -R ."