Update examples

This commit is contained in:
Don Stewart
2005-09-03 04:45:14 +00:00
parent 5321754614
commit dff0363224
421 changed files with 19 additions and 9 deletions

11
testsuite/hier/hier4/A.hs Normal file
View File

@ -0,0 +1,11 @@
-- now, the question is: is it possible to not depend on a module or
-- package, but nonetheless have an orphan to it? this could cause
-- problems....
module A where
import B
u :: Int
u = undefined

View File

@ -0,0 +1,4 @@
module B where
import C () -- instances, to make available to those who use B

12
testsuite/hier/hier4/C.hs Normal file
View File

@ -0,0 +1,12 @@
-- try to construct an orphan module == an instance decl-only module,
-- that uses classes and types not defined in this module
module C (C) where
import D
instance C a => D (T a) where
class C a where

View File

@ -0,0 +1,6 @@
module D where
class D a where
data T a = T

View File

@ -0,0 +1,12 @@
module Main where
import System.Plugins
main = do
makeAll "A.hs" []
y <- load "A.o" ["."] [] "u"
case y of
LoadSuccess _ _ -> putStrLn $ "YES"
LoadFailure e -> mapM_ putStrLn e

View File

@ -0,0 +1,4 @@
TEST= hier/hier4
TOP=../../..
include ../../eval.mk

View File

@ -0,0 +1 @@
YES