Commit 2274cbd4 authored by dterei's avatar dterei
Browse files

More updates to Safe Haskell tests

parent 5c466ca9
......@@ -17,7 +17,7 @@ author: simonmar@microsoft.com
exposed: True
exposed-modules: A
hidden-modules: B C.D
trusted: True
trusted: False
import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
hs-libraries: testpkg-1.2.3.4
......@@ -51,7 +51,7 @@ author: simonmar@microsoft.com
exposed: True
exposed-modules: A
hidden-modules: B C.D
trusted: True
trusted: False
import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
hs-libraries: testpkg-1.2.3.4
......@@ -91,7 +91,7 @@ author: simonmar@microsoft.com
exposed: False
exposed-modules: A
hidden-modules: B C.D C.E
trusted: True
trusted: False
import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
hs-libraries: testpkg-2.0
......@@ -125,7 +125,7 @@ author: simonmar@microsoft.com
exposed: False
exposed-modules: A
hidden-modules: B C.D C.E
trusted: True
trusted: False
import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
hs-libraries: testpkg-2.0
......@@ -159,7 +159,7 @@ author: simonmar@microsoft.com
exposed: True
exposed-modules: A
hidden-modules: B C.D
trusted: True
trusted: False
import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
hs-libraries: testpkg-1.2.3.4
......@@ -200,7 +200,7 @@ author: simonmar@microsoft.com
exposed: False
exposed-modules: A
hidden-modules: B C.D
trusted: True
trusted: False
import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
hs-libraries: testpkg-1.2.3.4
......
{-# LANGUAGE Safe #-}
module UnsafeInfered04 where
module SafeInfered04 where
import safe UnsafeInfered04_A
import safe SafeInfered04_A
g :: Int
g = f
......
[1 of 2] Compiling SafeInfered04_A ( SafeInfered04_A.hs, SafeInfered04_A.o )
[2 of 2] Compiling SafeInfered04 ( SafeInfered04.hs, SafeInfered04.o )
{-# OPTIONS_GHC -fenable-rewrite-rules #-}
-- | Safe as while it enables rules it doesn't define any. UnsafeInfered05 is a
-- test case for when rules are defined and it should be unsafe
module SafeInfered04_A where
f :: Int
f = 1
UnsafeInfered04_A.hs:1:14: Unsupported extension: RULES
{-# LANGUAGE RULES #-}
-- | Unsafe as uses RULES
-- Although only turns on the flag doesn't define? So mark safe
-- maybe?
module UnsafeInfered04_A where
f :: Int
f = 1
......@@ -11,12 +11,12 @@ setTestOpts(f)
test('SafeInfered01', normal, multimod_compile, ['SafeInfered01', ''])
test('SafeInfered02', normal, multimod_compile, ['SafeInfered02', ''])
test('SafeInfered03', normal, multimod_compile, ['SafeInfered03', ''])
test('SafeInfered04', normal, multimod_compile, ['SafeInfered04', ''])
# Tests that should fail to compile as they should be infered unsafe
test('UnsafeInfered01', normal, multimod_compile_fail, ['UnsafeInfered01', ''])
test('UnsafeInfered02', normal, multimod_compile_fail, ['UnsafeInfered02', ''])
test('UnsafeInfered03', normal, multimod_compile_fail, ['UnsafeInfered03', ''])
test('UnsafeInfered04', normal, multimod_compile_fail, ['UnsafeInfered04', ''])
test('UnsafeInfered05', normal, multimod_compile_fail, ['UnsafeInfered05', ''])
test('UnsafeInfered06', normal, multimod_compile_fail, ['UnsafeInfered06', ''])
test('UnsafeInfered07', normal, multimod_compile_fail, ['UnsafeInfered07', ''])
......
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