Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

running the pipe part

  • Loading branch information...
commit 501609063631e566fc0f6721a8883b901cd95d10 1 parent 5edc790
@phischu authored
Showing with 9 additions and 1 deletion.
  1. +8 −1 Master.hs
  2. +1 −0  MasterPipe.hs
View
9 Master.hs
@@ -42,6 +42,7 @@ newtype CreateModuleList = CreateModuleList Package deriving (Show,Typeable,Eq,H
newtype ModuleList = ModuleList [Module] deriving (Show,Typeable,Eq,Hashable,Binary,NFData,Read)
newtype GetAST = GetAST (Package,Module) deriving (Show,Typeable,Eq,Hashable,Binary,NFData)
newtype CreatePackageList = CreatePackageList () deriving (Show,Typeable,Eq,Hashable,Binary,NFData)
+newtype RunMasterPipe = RunMasterPipe () deriving (Show,Typeable,Eq,Hashable,Binary,NFData)
instance Rule ExtractedPackage () where
storedValue (ExtractedPackage (Package (name,version))) = do
@@ -66,6 +67,9 @@ instance Rule CreatePackageList () where
exists <- IO.doesFileExist "packages.list"
if exists then return (Just ()) else return Nothing
+instance Rule RunMasterPipe () where
+ storedValue _ = return Nothing
+
instance Rule GetAST () where
storedValue = undefined
@@ -94,7 +98,8 @@ main = shakeArgs shakeOptions {shakeThreads = 4} $ do
action (do
PackageList packages <- apply1 (GetPackageList ())
apply (map ExtractedPackage packages) :: Action [()]
- apply1 (CreatePackageList ()) :: Action ())
+ apply1 (CreatePackageList ()) :: Action ()
+ apply1 (RunMasterPipe ()) :: Action ())
rule (\(GetPackageList ()) -> Just (do
need ["00-index.tar"]
@@ -133,6 +138,8 @@ main = shakeArgs shakeOptions {shakeThreads = 4} $ do
need [cabalfile]
liftIO (createModuleList package))
+ rule (\(RunMasterPipe ()) -> Just (liftIO MasterPipe.masterpipe))
+
rule (\(GetAST (package,modul))-> Just $ do
return ())
View
1  MasterPipe.hs
@@ -58,6 +58,7 @@ saveConfigurations () = runIdentityP $ forever $ do
if exists
then respond (package,configuration)
else do
+ createDirectoryIfMissing True path
lift (writeFile path (show configuration))
respond (package,configuration)
Please sign in to comment.
Something went wrong with that request. Please try again.