1-- The default language extensions for the eval plugin are the same as those for ghci
2
3module TSameDefaultLanguageExtensionsAsGhci where
4
5{-
6Running `:showi language` within ghci currently lists NoDatatypeContexts, ExtendedDefaultRules, NoMonomorphismRestriction and NondecreasingIndentation.
7
8The flags NoDatatypeContexts and NondecreasingIndentation are globally set in Haskell2021, whereas ExtendedDefaultRules and NoMonomorphismRestriction are set manually within ghci.
9(see https://github.com/ghc/ghc/blob/5abf59976c7335df760e5d8609d9488489478173/ghc/GHCi/UI.hs#L473-L483)
10
11It therefore suffices to test for ExtendedDefaultRules and NoMonomorphismRestriction only.
12-}
13
14
15-- ExtendedDefaultRules
16
17-- >>> []
18-- []
19
20-- >>> reverse []
21-- []
22
23-- NoMonomorphismRestriction
24
25-- >>> plus = (+)
26-- >>> :t plus
27-- plus :: Num a => a -> a -> a
28