Commit 1bd1ceff authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Don't use self {-# SOURCE #-} import in test-cases.



Summary:
It's kind of buggy, c.f. #10182, and isn't motivated by any
real world programs, so we're going to get rid of it (despite
it being handy for GHC test cases.)
Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>

Test Plan: validate

Reviewers: simonpj, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D862
parent 1bb1ff22
......@@ -5,5 +5,6 @@ include $(TOP)/mk/test.mk
.PHONY: T1133
T1133:
'$(TEST_HC)' $(TEST_HC_OPTS) -c T1133.hs-boot
'$(TEST_HC)' $(TEST_HC_OPTS) -c T1133a.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -c T1133.hs
......@@ -3,6 +3,6 @@
module T1133 where
import {-# SOURCE #-} T1133
import T1133a
newtype X = X Int deriving Enum
module T1133a where
import {-# SOURCE #-} T1133
......@@ -32,7 +32,7 @@ test('drv-functor2', normal, compile, [''])
test('drv-foldable-traversable1', normal, compile, [''])
test('T6031', extra_clean(['T6031a.o', 'T6031a.hi']), multimod_compile, ['T6031', '-v0'])
test('T1133',
extra_clean(['T1133.o-boot', 'T1133.hi-boot']),
extra_clean(['T1133.o-boot', 'T1133.hi-boot', 'T1133a.o', 'T1133a.hi']),
run_command,
['$MAKE --no-print-directory -s T1133'])
test('T7704', normal, compile, [''])
......
......@@ -6,11 +6,8 @@ drvfail016:
$(RM) -f drvfail016.hi-boot drvfail016.o-boot
'$(TEST_HC)' $(TEST_HC_OPTS) -XGeneralizedNewtypeDeriving -c drvfail016.hs-boot; echo $$?
.PHONY: T1133A Roles12
.PHONY: T1133A
T1133A:
'$(TEST_HC)' $(TEST_HC_OPTS) -c T1133A.hs-boot
-'$(TEST_HC)' $(TEST_HC_OPTS) -c T1133Aa.hs
-'$(TEST_HC)' $(TEST_HC_OPTS) -c T1133A.hs
Roles12:
'$(TEST_HC)' $(TEST_HC_OPTS) -c Roles12.hs-boot
-'$(TEST_HC)' $(TEST_HC_OPTS) -c Roles12.hs
module T1133A where
import {-# SOURCE #-} T1133A
import T1133Aa
newtype X = X Int deriving Enum
module T1133Aa where
import {-# SOURCE #-} T1133A
......@@ -35,7 +35,7 @@ test('T5478', normal, compile_fail, [''])
test('T5686', normal, compile_fail, [''])
test('T5922', normal, compile_fail, [''])
test('T1133A',
extra_clean(['T1133A.o-boot', 'T1133A.hi-boot']),
extra_clean(['T1133A.o-boot', 'T1133A.hi-boot', 'T1133Aa.o', 'T1133Aa.hi']),
run_command,
['$MAKE --no-print-directory -s T1133A'])
# 5863a was removed as it was out of date re: fixing #9858
......
......@@ -2,7 +2,7 @@
module ClosedFam1 where
import {-# SOURCE #-} ClosedFam1
import ClosedFam1a
type family Foo a where
Foo Int = Bool
......
module ClosedFam1a where
import {-# SOURCE #-} ClosedFam1
......@@ -2,7 +2,7 @@
module ClosedFam2 where
import {-# SOURCE #-} ClosedFam2
import ClosedFam2a
type family Foo a where
Foo Int = Bool
......
module ClosedFam2a where
import {-# SOURCE #-} ClosedFam2
......@@ -233,9 +233,9 @@ test('T8500',
test('T8018', normal, compile, [''])
test('T8020', normal, compile, [''])
test('ClosedFam1', extra_clean(['ClosedFam1.o-boot', 'ClosedFam1.hi-boot']),
test('ClosedFam1', extra_clean(['ClosedFam1.o-boot', 'ClosedFam1.hi-boot', 'ClosedFam1a.o', 'ClosedFam1a.hi']),
multimod_compile, ['ClosedFam1', '-v0'])
test('ClosedFam2', extra_clean(['ClosedFam2.o-boot', 'ClosedFam2.hi-boot']),
test('ClosedFam2', extra_clean(['ClosedFam2.o-boot', 'ClosedFam2.hi-boot', 'ClosedFam2a.o', 'ClosedFam2a.hi']),
multimod_compile, ['ClosedFam2', '-v0'])
test('T8651', normal, compile, [''])
test('T8889', normal, compile, [''])
......
......@@ -2,7 +2,7 @@
module ClosedFam3 where
import {-# SOURCE #-} ClosedFam3
import ClosedFam3a
type family Foo a where
Foo Int = Bool
......
module ClosedFam3a where
import {-# SOURCE #-} ClosedFam3
......@@ -103,7 +103,7 @@ test('T7967', normal, compile_fail, [''])
test('T7938', normal, compile_fail, [''])
test('ClosedFam3', extra_clean(['ClosedFam3.o-boot', 'ClosedFam3.hi-boot']),
test('ClosedFam3', extra_clean(['ClosedFam3.o-boot', 'ClosedFam3.hi-boot', 'ClosedFam3a.hi', 'ClosedFam3a.o']),
multimod_compile_fail, ['ClosedFam3', '-v0'])
test('ClosedFam4', normal, compile_fail, [''])
test('T8155', normal, compile_fail, [''])
......
......@@ -6,8 +6,10 @@ include $(TOP)/mk/test.mk
Roles12:
'$(TEST_HC)' $(TEST_HC_OPTS) -c Roles12.hs-boot
'$(TEST_HC)' $(TEST_HC_OPTS) -c Roles12a.hs
-'$(TEST_HC)' $(TEST_HC_OPTS) -c Roles12.hs
T9204:
'$(TEST_HC)' $(TEST_HC_OPTS) -c T9204.hs-boot
-'$(TEST_HC)' $(TEST_HC_OPTS) -c T9204a.hs
-'$(TEST_HC)' $(TEST_HC_OPTS) -c T9204.hs
module Roles12 where
import {-# SOURCE #-} Roles12
import Roles12a
data T a
module Roles12a where
import {-# SOURCE #-} Roles12
module T9204 where
import {-# SOURCE #-} T9204
import T9204a
data D a
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