[commit: packages/filepath] master: Change the generated file to be in module Test (c14bd97)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 11:36:25 UTC 2015


Repository : ssh://git@git.haskell.org/filepath

On branch  : master
Link       : http://git.haskell.org/packages/filepath.git/commitdiff/c14bd978e59dd4c9564d253e8d56a5173432da8b

>---------------------------------------------------------------

commit c14bd978e59dd4c9564d253e8d56a5173432da8b
Author: Neil Mitchell <ndmitchell at gmail.com>
Date:   Wed Oct 29 08:27:15 2014 +0000

    Change the generated file to be in module Test


>---------------------------------------------------------------

c14bd978e59dd4c9564d253e8d56a5173432da8b
 Generate.hs    | 4 +++-
 filepath.cabal | 4 +++-
 tests/Test.hs  | 2 ++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Generate.hs b/Generate.hs
index 52efebd..48e88c6 100755
--- a/Generate.hs
+++ b/Generate.hs
@@ -22,9 +22,11 @@ main = do
     writeFileBinary "tests/Test.hs" (prefix ++ genTests tests)
 
 prefix = unlines
-    ["import AutoTest"
+    ["module Test(main) where"
+    ,"import AutoTest"
     ,"import qualified System.FilePath.Windows as W"
     ,"import qualified System.FilePath.Posix as P"
+    ,"main :: IO ()"
     ,"main = do"
     ]
 
diff --git a/filepath.cabal b/filepath.cabal
index 069ce29..70c4520 100644
--- a/filepath.cabal
+++ b/filepath.cabal
@@ -50,8 +50,10 @@ test-suite filepath-tests
     type: exitcode-stdio-1.0
     default-language: Haskell98
     main-is: Test.hs
+    ghc-options: -main-is Test
     hs-source-dirs: tests
-    other-modules: AutoTest
+    other-modules:
+        AutoTest
     build-depends:
         filepath,
         base,
diff --git a/tests/Test.hs b/tests/Test.hs
index bbad53c..c5fb57d 100755
--- a/tests/Test.hs
+++ b/tests/Test.hs
@@ -1,6 +1,8 @@
+module Test(main) where
 import AutoTest
 import qualified System.FilePath.Windows as W
 import qualified System.FilePath.Posix as P
+main :: IO ()
 main = do
  block1
  block2



More information about the ghc-commits mailing list