[commit: packages/filepath] master: Basic generator cleanups (909d6e6)

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


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

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

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

commit 909d6e6bbf52700ac0813f8a65aad63b35202e2b
Author: Neil Mitchell <ndmitchell at gmail.com>
Date:   Wed Oct 29 08:04:26 2014 +0000

    Basic generator cleanups


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

909d6e6bbf52700ac0813f8a65aad63b35202e2b
 Generate.hs | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/Generate.hs b/Generate.hs
index 7f956e7..8453818 100755
--- a/Generate.hs
+++ b/Generate.hs
@@ -1,22 +1,25 @@
 
-module Main where
+module Generate(main) where
 
 import Data.Char
 import Data.List
 import System.IO
 
 
-data Test = Expr String
-          | Test [String] String
-          deriving Show
+data Test
+    = Expr String
+    | Test [String] String
+      deriving Show
 
 isExpr (Expr{}) = True
 isExpr _ = False
 
 
-main = do src <- readFile "System/FilePath/Internal.hs"
-          let tests = concatMap getTest $ zip [1..] (lines src)
-          writeFileBinary "tests/FilePath_Test.hs" (prefix ++ genTests tests)
+main :: IO ()
+main = do
+    src <- readFile "System/FilePath/Internal.hs"
+    let tests = concatMap getTest $ zip [1..] (lines src)
+    writeFileBinary "tests/FilePath_Test.hs" (prefix ++ genTests tests)
 
 prefix = unlines
     ["import AutoTest"



More information about the ghc-commits mailing list