summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/ghci057.script
blob: db77b80cb16620d94a81b1b2ef8e9a467f9f66ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
:set -XHaskell2010
: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