diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2018-12-07 23:25:20 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-12-07 23:25:30 -0500 |
commit | 45e98f64e82f6ff16dc3e437c3031b9d315f1313 (patch) | |
tree | 16e45c4a587b8108623b900522b79621912815bb /testsuite/tests/safeHaskell | |
parent | 04caa935ac22bd2bd1a254f26df9dca4ee6abdd1 (diff) | |
download | haskell-45e98f64e82f6ff16dc3e437c3031b9d315f1313.tar.gz |
Add -fno-safe-haskell flag
This flag can be set to turn off the Safe Haskell checks.
Whether a module is marked Safe/Unsafe/Trustworthy is ignored when
this flag to set.
Reviewers: bgamari, tdammers
Reviewed By: tdammers
Subscribers: rwbarton, carter
GHC Trac Issues: #15920
Differential Revision: https://phabricator.haskell.org/D5360
Diffstat (limited to 'testsuite/tests/safeHaskell')
-rw-r--r-- | testsuite/tests/safeHaskell/flags/SafeIgnore.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/flags/SafeIgnoreA.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/flags/all.T | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/safeHaskell/flags/SafeIgnore.hs b/testsuite/tests/safeHaskell/flags/SafeIgnore.hs new file mode 100644 index 0000000000..8c2ee88c37 --- /dev/null +++ b/testsuite/tests/safeHaskell/flags/SafeIgnore.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE Safe #-} +module SafeIgnore where + +import SafeIgnoreA + +foo = () diff --git a/testsuite/tests/safeHaskell/flags/SafeIgnoreA.hs b/testsuite/tests/safeHaskell/flags/SafeIgnoreA.hs new file mode 100644 index 0000000000..52ed7192a4 --- /dev/null +++ b/testsuite/tests/safeHaskell/flags/SafeIgnoreA.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE Unsafe #-} +module SafeIgnoreA where + +qux = () diff --git a/testsuite/tests/safeHaskell/flags/all.T b/testsuite/tests/safeHaskell/flags/all.T index 0fa30e5628..8b1ea974b1 100644 --- a/testsuite/tests/safeHaskell/flags/all.T +++ b/testsuite/tests/safeHaskell/flags/all.T @@ -63,3 +63,5 @@ test('Flags01', normal, compile, ['-XSafe']) test('Flags02', normal, compile, ['-XSafe']) test('SafeFlags30', normal, compile_fail, ['']) + +test('SafeIgnore', [], multimod_compile, ['SafeIgnore', '-v0 -fno-safe-haskell']) |