dotfiles/ghc/.ghc/ghci.conf

61 lines
1.8 KiB
Text
Raw Normal View History

-- -------------------------------------------------------------------- --
-- Default Extensions
-- https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html
-- GHC2024 gives errors with various projects
:set -XBangPatterns
:set -XConstraintKinds
:set -XDataKinds
:set -XDuplicateRecordFields
:set -XFlexibleContexts
:set -XGADTs
:set -XMagicHash
:set -XMultiParamTypeClasses
:set -XNumericUnderscores
:set -XOverloadedRecordDot
: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
-- -------------------------------------------------------------------- --
-- Warning flags for safe build
-- https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated-guide-to-haskell-in-2018/
2024-09-16 17:37:41 +02:00
-- https://mercury.com/blog/enable-warnings-haskell
:set -Wall
:set -Wcompat
:set -Wincomplete-record-updates
:set -Wincomplete-uni-patterns
:set -Wredundant-constraints
2024-09-16 17:37:41 +02:00
:set -Weverything
:set -Wno-missing-exported-signatures
:set -Wno-missing-import-lists
:set -Wno-missed-specialisations
:set -Wno-all-missed-specialisations
:set -Wno-unsafe
:set -Wno-safe
:set -Wno-missing-local-signatures
:set -Wno-monomorphism-restriction
-- -------------------------------------------------------------------- --
-- 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 tags \_ -> return ":! fast-tags --fully-qualified -R ."