Commit 4b9d1033 authored by simonmar's avatar simonmar
Browse files

[project @ 2005-09-19 15:10:17 by simonmar]

add test for forkm crash
parent e1ffbb21
module A (f, y) where
import B.C (T(..))
f (T x) = x
y = T 42
module B.C where
newtype T = T Int
deriving Show
module Main (main, z) where
import A
main = print (f y)
z = y
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# This test caused a panic in GHC 6.4, but in reality it is user
# error, caused by compiling separate modules in the program using
# different search paths. GHC gets confused when it can't find a
# module mentioned as a dependency in another interface file.
# If the package format changes, we might have to re-generate pkg.conf
# using the supplied Cabal configuration.
rn.prog006:
@$(TEST_HC) --make B.C -no-recomp -v0
@$(TEST_HC) -c -package-conf pkg.conf -package test -no-recomp A.hs -i
-@$(TEST_HC) -c -package-conf pkg.conf -package test -no-recomp Main.hs
#!/usr/bin/runhaskell
> module Main where
> import Distribution.Simple
> main :: IO ()
> main = defaultMain
test('rn.prog006', normal, run_command, ['$MAKE -s --no-print-directory rn.prog006'])
[InstalledPackageInfo {package = PackageIdentifier {pkgName = "test", pkgVersion = Version {versionBranch = [1,0], versionTags = []}}, license = AllRightsReserved, copyright = "", maintainer = "", author = "", stability = "", homepage = "", pkgUrl = "", description = "", category = "", exposed = True, exposedModules = ["B.C"], hiddenModules = [], importDirs = ["/home/simonmar/scratch/forkm"], libraryDirs = ["/usr/local/lib/test-1.0"], hsLibraries = ["HStest-1.0"], extraLibraries = [], includeDirs = [], includes = [], depends = [], hugsOptions = [], ccOptions = [], ldOptions = [], frameworkDirs = [], frameworks = [], haddockInterfaces = [], haddockHTMLs = []}]
./A.hi:
Interface file inconsistency:
home-package module `B.C' is mentioned,
but does not appear in the dependencies of the interface
Cannot continue after interface file error
name: test
version: 1.0
exposed-modules: B.C
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