答えになっているかわからないですが、色々調べた結果です。
https://www.stackage.org/haddock/lts-12.14/haskell-src-exts-1.20.3/src/Language.Haskell.Exts.Extension.html#ghcDefault
-- Not exported, just used locally in several places.
allLangDefault :: [KnownExtension]
allLangDefault = [MonomorphismRestriction, MonoPatBinds, ImplicitPrelude]
ghcDefault :: [Extension]
ghcDefault = map EnableExtension (NondecreasingIndentation:allLangDefault)
ghci
*Main> :show language
base language is: Haskell2010
with the following modifiers:
-XNoDatatypeContexts
-XNondecreasingIndentation
ghc
module Main where
import GHC
import GHC.Paths (libdir)
import MonadUtils (liftIO)
import EnumSet (toList)
main :: IO ()
main =
runGhc (Just libdir) $ do
flags <- getSessionDynFlags
liftIO $ print $ toList $ extensionFlags flags
{- 実行結果
[ MonomorphismRestriction
, RelaxedPolyRec
, ForeignFunctionInterface
, ImplicitPrelude
, DoAndIfThenElse
, EmptyDataDecls
, PatternGuards
, NondecreasingIndentation
, TraditionalRecordSyntax
]
-}