Import hs-plugins cvs
This commit is contained in:
14
examples/dynload/should_fail/prog/Main.hs
Normal file
14
examples/dynload/should_fail/prog/Main.hs
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
import Plugins
|
||||
import API
|
||||
|
||||
main = do
|
||||
m_v <- dynload "../Plugin.o"
|
||||
["../api"]
|
||||
["../../../../plugins.conf.inplace"]
|
||||
"resource_dyn"
|
||||
|
||||
case m_v of
|
||||
LoadFailure _ -> putStrLn "didn't compile"
|
||||
LoadSuccess _ v -> putStrLn $ function v
|
||||
|
4
examples/dynload/should_fail/prog/expected
Normal file
4
examples/dynload/should_fail/prog/expected
Normal file
@ -0,0 +1,4 @@
|
||||
Couldn't match `API.Interface' against `Int'
|
||||
Expected type: API.Interface
|
||||
Inferred type: Int
|
||||
didn't compile
|
Reference in New Issue
Block a user