From 5dbfa70f744404397c706841925e9ae06a82fd51 Mon Sep 17 00:00:00 2001 From: dons Date: Fri, 19 Aug 2005 01:04:43 +0000 Subject: [PATCH] More fixes for 605, and adjust expected output --- examples/conf/simple/prog/Main.hs | 4 ---- examples/dynload/should_fail_2/prog/expected.605 | 7 +++++++ examples/dynload/should_fail_3/prog/expected.605 | 8 ++++++++ examples/eval/eval3/Main.hs | 6 ++---- examples/iface/null/expected.605 | 5 +++++ examples/pdynload/spj3/prog/expected.605 | 9 +++++++++ src/System/Plugins/Make.hs | 2 -- 7 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 examples/dynload/should_fail_2/prog/expected.605 create mode 100644 examples/dynload/should_fail_3/prog/expected.605 create mode 100644 examples/iface/null/expected.605 create mode 100644 examples/pdynload/spj3/prog/expected.605 diff --git a/examples/conf/simple/prog/Main.hs b/examples/conf/simple/prog/Main.hs index 472abbf..8d0dae6 100644 --- a/examples/conf/simple/prog/Main.hs +++ b/examples/conf/simple/prog/Main.hs @@ -8,9 +8,6 @@ apipath = "../api" main = do status <- makeWith conf stub ["-i"++apipath] - print status - return () -{- o <- case status of MakeFailure e -> mapM_ putStrLn e >> error "failed" MakeSuccess _ o -> return o @@ -23,4 +20,3 @@ main = do putStrLn user_editor makeCleaner o --} diff --git a/examples/dynload/should_fail_2/prog/expected.605 b/examples/dynload/should_fail_2/prog/expected.605 new file mode 100644 index 0000000..c3f5417 --- /dev/null +++ b/examples/dynload/should_fail_2/prog/expected.605 @@ -0,0 +1,7 @@ + +../Plugin.in:13:15: + Couldn't match `Dynamic' against `(a, b)' + Expected type: Dynamic + Inferred type: (a, b) + In the definition of `resource_dyn': resource_dyn = (typeOf v, unsafeCoerce v) +failed diff --git a/examples/dynload/should_fail_3/prog/expected.605 b/examples/dynload/should_fail_3/prog/expected.605 new file mode 100644 index 0000000..a0c3be1 --- /dev/null +++ b/examples/dynload/should_fail_3/prog/expected.605 @@ -0,0 +1,8 @@ + +../Plugin.in:12:15: + Couldn't match `Dynamic' against `(a, b)' + Expected type: Dynamic + Inferred type: (a, b) + In the definition of `resource_dyn': + resource_dyn = (typeOf plugin, unsafeCoerce v) +a.out: failed diff --git a/examples/eval/eval3/Main.hs b/examples/eval/eval3/Main.hs index 47af6e3..68e4a0e 100644 --- a/examples/eval/eval3/Main.hs +++ b/examples/eval/eval3/Main.hs @@ -13,8 +13,6 @@ import System.Eval import AltData.Dynamic -pkgconf = TOP ++ "/plugins.conf.inplace" - main = do a <- return $ toDyn (3::Integer) @@ -22,8 +20,8 @@ main = do -- looks like with GHC 6.4, we need to make sure the package.confs work: m_b <- unsafeEval_ "\\dyn -> fromDyn dyn (7 :: Integer)" ["AltData.Dynamic"] - [ "-package-conf "++pkgconf , "-package altdata" ] - [ pkgconf ] + [ ] + [ ] [] case m_b of diff --git a/examples/iface/null/expected.605 b/examples/iface/null/expected.605 new file mode 100644 index 0000000..e467488 --- /dev/null +++ b/examples/iface/null/expected.605 @@ -0,0 +1,5 @@ +interface "unknown" Main +module dependencies: A, B +package dependencies: base-1.0, plugins-0.9.10 +import B +import A diff --git a/examples/pdynload/spj3/prog/expected.605 b/examples/pdynload/spj3/prog/expected.605 new file mode 100644 index 0000000..6e0b917 --- /dev/null +++ b/examples/pdynload/spj3/prog/expected.605 @@ -0,0 +1,9 @@ + +../Plugin.hs:5:31: + Couldn't match the rigid variable `a' against `Int' + `a' is bound by the polymorphic type `forall a. (Num a) => a -> a -> a' + at ../Plugin.hs:5:11-56 + Expected type: a -> a -> a + Inferred type: Int -> Int -> Int + In the expression: (+) :: Int -> Int -> Int + In the `function' field of a record diff --git a/src/System/Plugins/Make.hs b/src/System/Plugins/Make.hs index be7371b..0f32ee8 100644 --- a/src/System/Plugins/Make.hs +++ b/src/System/Plugins/Make.hs @@ -239,8 +239,6 @@ build src obj extra_opts = do #endif (out,err) <- exec ghc flags -- this is a fork() - print $ "OUT = " ++ show out - print $ "ERR = " ++ show err obj_exists <- doesFileExist obj -- sanity return $ if not obj_exists && null err -- no errors, but no object?