2023-12-26 11:39:32 +01:00
|
|
|
-- -------------------------------------------------------------------- --
|
|
|
|
-- Default Extensions
|
2024-11-30 09:58:16 +01:00
|
|
|
-- https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html
|
|
|
|
-- GHC2024 gives errors with various projects
|
2023-12-26 11:39:32 +01:00
|
|
|
|
|
|
|
:set -XBangPatterns
|
2024-11-30 09:58:16 +01:00
|
|
|
:set -XConstraintKinds
|
|
|
|
:set -XDataKinds
|
|
|
|
:set -XDuplicateRecordFields
|
|
|
|
:set -XFlexibleContexts
|
|
|
|
:set -XGADTs
|
2023-12-26 11:39:32 +01:00
|
|
|
:set -XMagicHash
|
|
|
|
:set -XMultiParamTypeClasses
|
|
|
|
:set -XNumericUnderscores
|
2024-01-31 14:25:02 +01:00
|
|
|
:set -XOverloadedRecordDot
|
2024-11-30 09:58:16 +01:00
|
|
|
: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
|
2023-12-26 11:39:32 +01:00
|
|
|
: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
|
2023-12-26 11:39:32 +01:00
|
|
|
|
|
|
|
: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
|
2023-12-26 11:39:32 +01:00
|
|
|
|
|
|
|
-- -------------------------------------------------------------------- --
|
|
|
|
-- Util cmds
|
|
|
|
|
2024-11-30 09:58:16 +01:00
|
|
|
:def fzf const . pure $ ":! cat $HOME/.ghc/ghci_history | fzf --height 25"
|
2023-12-26 11:39:32 +01:00
|
|
|
:def hlint const . return $ ":! hlint \"src\""
|
|
|
|
:def hoogle \s -> return $ ":! hoogle --color --count=15 " ++ show s
|
|
|
|
:def rg \s -> return $ ":! rg " ++ s
|
2024-11-30 09:58:16 +01:00
|
|
|
:def tags \_ -> return ":! fast-tags --fully-qualified -R ."
|