ghc: Add a configuration for GHC
Copied from Emily Pillmore's configuration. https://gist.github.com/emilypi/cafa2a0dac8c879b2a2916dab71a3f3f
This commit is contained in:
parent
46682b9a2f
commit
75670080c0
1 changed files with 36 additions and 0 deletions
36
ghc/.ghc/ghci.conf
Normal file
36
ghc/.ghc/ghci.conf
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
-- -------------------------------------------------------------------- --
|
||||||
|
-- Default Extensions
|
||||||
|
|
||||||
|
:set -XRankNTypes
|
||||||
|
:set -XGADTs
|
||||||
|
:set -XTypeFamilies
|
||||||
|
:set -XTypeApplications
|
||||||
|
:set -XBangPatterns
|
||||||
|
:set -XMagicHash
|
||||||
|
:set -XMultiParamTypeClasses
|
||||||
|
:set -XPatternSynonyms
|
||||||
|
:set -XDataKinds
|
||||||
|
:set -XConstraintKinds
|
||||||
|
:set -XOverloadedStrings
|
||||||
|
:set -XNumericUnderscores
|
||||||
|
:set -XFlexibleContexts
|
||||||
|
:set -XScopedTypeVariables
|
||||||
|
: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/
|
||||||
|
|
||||||
|
:set -Wall
|
||||||
|
:set -Wcompat
|
||||||
|
:set -Wincomplete-record-updates
|
||||||
|
:set -Wincomplete-uni-patterns
|
||||||
|
:set -Wredundant-constraints
|
||||||
|
|
||||||
|
-- -------------------------------------------------------------------- --
|
||||||
|
-- Util cmds
|
||||||
|
|
||||||
|
: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"
|
Loading…
Reference in a new issue