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

View File

@ -0,0 +1,21 @@
import System.Plugins
import API
import Data.Either
conf = "../Tiny.conf"
stub = "../Tiny.stub"
apipath = "../api"
main = do
status <- makeWith conf stub ["-i"++apipath]
o <- case status of
MakeFailure e -> mapM_ putStrLn e >> error "failed"
MakeSuccess _ o -> return o
m_v <- load o [apipath] [] "resource"
v <- case m_v of
LoadSuccess _ v -> return v
_ -> error "load failed"
putStrLn $ field v
makeCleaner o

View File

@ -0,0 +1 @@
hello strange world