Update examples
This commit is contained in:
8
testsuite/hier/hier2/A/B/C/Module.hs
Normal file
8
testsuite/hier/hier2/A/B/C/Module.hs
Normal file
@ -0,0 +1,8 @@
|
||||
--
|
||||
-- A simple module
|
||||
--
|
||||
|
||||
module A.B.C.Module where
|
||||
|
||||
symbol = "You found me"
|
||||
|
7
testsuite/hier/hier2/A/Makefile
Normal file
7
testsuite/hier/hier2/A/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
all:
|
||||
ghc -c B/C/Module.hs
|
||||
|
||||
|
||||
clean:
|
||||
rm -f B/C/*.hi B/C/*.o
|
7
testsuite/hier/hier2/Makefile
Normal file
7
testsuite/hier/hier2/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
TEST= hier/hier2
|
||||
|
||||
PRIOR_OBJS=A/B/C/Module.o
|
||||
EXTRAFLAGS=
|
||||
|
||||
TOP=../../..
|
||||
include ../../build.mk
|
4
testsuite/hier/hier2/api/API.hs
Normal file
4
testsuite/hier/hier2/api/API.hs
Normal file
@ -0,0 +1,4 @@
|
||||
module API where
|
||||
|
||||
-- just a dummy for the build system
|
||||
|
15
testsuite/hier/hier2/prog/Main.hs
Normal file
15
testsuite/hier/hier2/prog/Main.hs
Normal file
@ -0,0 +1,15 @@
|
||||
--
|
||||
-- Test if we can load a module with a hierarchical name from some weird
|
||||
-- path. Tests our the module name handling in the .hi file parser.
|
||||
--
|
||||
|
||||
|
||||
module Main where
|
||||
|
||||
import System.Plugins
|
||||
|
||||
main = do
|
||||
status <- load "../A/B/C/Module.o" [".."] [] "symbol"
|
||||
case status of
|
||||
LoadFailure ers -> mapM_ putStrLn ers
|
||||
LoadSuccess _ v -> print (v :: String)
|
1
testsuite/hier/hier2/prog/expected
Normal file
1
testsuite/hier/hier2/prog/expected
Normal file
@ -0,0 +1 @@
|
||||
"You found me"
|
Reference in New Issue
Block a user