Import hs-plugins cvs

This commit is contained in:
Don Stewart
2005-04-24 08:51:33 +00:00
commit 887fa59389
494 changed files with 23721 additions and 0 deletions

View File

@ -0,0 +1,6 @@
TEST= load/thiemann0
#EXTRA_OBJS=Test.o
TOP=../../..
include ../../build.mk

View File

@ -0,0 +1,11 @@
-- P.Thiemann reports that 'import Char' leads to undefined symbol for
-- __stginit_Char_.
module Test where
import API
import Char
resource = test { field = map toUpper "success" }

View File

@ -0,0 +1,8 @@
module API where
data Test = Test {
field :: String
}
test :: Test
test = Test { field = "default value" }

View File

@ -0,0 +1,16 @@
import Plugins
import API
main = do
status <- make "../Test.hs" ["-i../api"]
obj <- case status of
MakeSuccess _ o -> return o
MakeFailure e -> mapM_ putStrLn e >> error "failed"
m_v <- load_ obj ["../api"] "resource"
v <- case m_v of
LoadFailure _ -> error "load failed"
LoadSuccess _ v -> return v
let s = field v
print s

View File

@ -0,0 +1 @@
"SUCCESS"