Commit 6e56fa9d authored by dterei's avatar dterei
Browse files

Add some safe haskell test for '-trust' flag.

parent c41b9a84
{-# OPTIONS_GHC -trust base, -trust bytestring #-}
-- | Basic test to see if no safe infer flag compiles
-- This module would usually infer safely, so it shouldn't be safe now.
-- We don't actually check that here though, see test '' for that.
module SafeFlags28 where
f :: Int
f = 1
SafeFlags28.hs:1:16:
unknown flag in {-# OPTIONS_GHC #-} pragma: -trust
SafeFlags28.hs:1:16:
unknown flag in {-# OPTIONS_GHC #-} pragma: base,
SafeFlags28.hs:1:16:
unknown flag in {-# OPTIONS_GHC #-} pragma: -trust
SafeFlags28.hs:1:16:
unknown flag in {-# OPTIONS_GHC #-} pragma: bytestring
{-# LANGUAGE Safe #-}
{-# OPTIONS_GHC -trust base -trust bytestring #-}
-- | Basic test to see if no safe infer flag compiles
-- This module would usually infer safely, so it shouldn't be safe now.
-- We don't actually check that here though, see test '' for that.
module SafeFlags29 where
f :: Int
f = 1
SafeFlags29.hs:2:16:
unknown flag in {-# OPTIONS_GHC #-} pragma: -trust
SafeFlags29.hs:2:16:
unknown flag in {-# OPTIONS_GHC #-} pragma: base
SafeFlags29.hs:2:16:
unknown flag in {-# OPTIONS_GHC #-} pragma: -trust
SafeFlags29.hs:2:16:
unknown flag in {-# OPTIONS_GHC #-} pragma: bytestring
......@@ -54,6 +54,10 @@ test('SafeFlags26', normal, compile_fail, [''])
# test -fno-safe-infer
test('SafeFlags27', normal, compile, [''])
# test package flags don't work
test('SafeFlags28', normal, compile_fail, [''])
test('SafeFlags29', normal, compile_fail, [''])
# test certain flags are still allowed under -XSafe
test('Flags01', normal, compile, ['-XSafe'])
test('Flags02', normal, compile, ['-XSafe'])
......
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