Commit 8359158f authored by Simon Marlow's avatar Simon Marlow
Browse files

add a test for :seti

parent 05c51c0c
...@@ -81,6 +81,8 @@ test('ghci056', ...@@ -81,6 +81,8 @@ test('ghci056',
], ],
ghci_script, ['ghci056.script']) ghci_script, ['ghci056.script'])
test('ghci057', normal, ghci_script, ['ghci057.script'])
test('2452', normal, ghci_script, ['2452.script']) test('2452', normal, ghci_script, ['2452.script'])
test('T2766', normal, ghci_script, ['T2766.script']) test('T2766', normal, ghci_script, ['T2766.script'])
......
module Test where
data T a where
C :: T Int
:set
putStrLn "Should fail, GADTs is not enabled"
data T a where C :: T Int
:set -XGADTs
:set
putStrLn "Should work, GADTs is in force from :set"
:load ghci057.hs
:set -XNoGADTs
:set
putStrLn "Should fail, GADTs is now disabled"
:load ghci057.hs
:seti -XGADTs
:seti
putStrLn "Should fail, GADTs is only enabled at the prompt"
:load ghci057.hs
-- Should work
data T a where C :: T Int
:t C
options currently set: none.
base language is: Haskell2010
with the following modifiers:
-XNoDatatypeContexts
-XNondecreasingIndentation
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-ghci-history
-fimplicit-import-qualified
warning settings:
Should fail, GADTs is not enabled
options currently set: none.
base language is: Haskell2010
with the following modifiers:
-XGADTs
-XGADTSyntax
-XNoDatatypeContexts
-XNondecreasingIndentation
-XMonoLocalBinds
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-ghci-history
-fimplicit-import-qualified
warning settings:
Should work, GADTs is in force from :set
options currently set: none.
base language is: Haskell2010
with the following modifiers:
-XGADTSyntax
-XNoDatatypeContexts
-XNondecreasingIndentation
-XMonoLocalBinds
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-ghci-history
-fimplicit-import-qualified
warning settings:
Should fail, GADTs is now disabled
base language is: Haskell2010
with the following modifiers:
-XGADTs
-XGADTSyntax
-XNoDatatypeContexts
-XNondecreasingIndentation
-XMonoLocalBinds
-XExtendedDefaultRules
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-ghci-history
-fimplicit-import-qualified
warning settings:
Should fail, GADTs is only enabled at the prompt
C :: T Int
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment