Permalink
Browse files

Set up Dyre for Cabal distribution.

I need to go through the import list and narrow down exactly what
is necessary. On the plus side, it seems to work just fine now.
  • Loading branch information...
1 parent e8408ab commit 1e16577761289e8208732761f672654f56d29b1f @willdonnelly committed Jul 18, 2009
Showing with 29 additions and 41 deletions.
  1. +0 −3 Main.hs
  2. +3 −0 Setup.hs
  3. +0 −38 TestDyre.hs
  4. +26 −0 dyre.cabal
View
@@ -1,3 +0,0 @@
-import TestDyre
-
-main = runDefault
View
@@ -0,0 +1,3 @@
+#!/usr/bin/env runhaskell
+import Distribution.Simple
+main = defaultMain
View
@@ -1,38 +0,0 @@
-module TestDyre ( runDefault, testDyre, Config(..), defaultConf ) where
-
-import qualified Dyre as Dyre
-import System
-import System.IO
-
-data Config = Config { errorMsg :: Maybe String
- , message :: String
- }
-
-defaultConf = Config { errorMsg = Nothing
- , message = "Hello, world!"
- }
-
-confError :: String -> Config -> Config
-confError msg cfg = cfg {errorMsg = Just msg}
-
-realMain :: Config -> IO ()
-realMain (Config err msg) = do
- putStrLn "Entered program"
- args <- getArgs
- putStrLn $ "Arguments: " ++ show args
- case err of
- Just eMsg -> putStrLn $ "Error: " ++ eMsg
- Nothing -> putStrLn $ "Message: " ++ msg
-
-(runDefault, testDyre) = Dyre.runWith Dyre.Params
- { Dyre.projectName = "testDyre"
- , Dyre.configDir = return "/home/will/.testDyre"
- , Dyre.tmpDir = return "/home/will/.testDyre/tmp"
- , Dyre.binDir = return "/home/will/projects/dyre"
- , Dyre.defaultConf = defaultConf
- , Dyre.confError = confError
- , Dyre.realMain = realMain
- , Dyre.hidePackages = []
- , Dyre.ghcOpts = []
- , Dyre.statusOut = hPutStrLn stderr
- }
View
@@ -0,0 +1,26 @@
+Name: dyre
+Version: 0.1
+Category: Example
+Synopsis: Dynamic reconfiguration in Haskell
+
+Homepage: http://github.com/willdonnelly/dyre
+Bug-Reports: http://github.com/willdonnelly/dyre/issues
+Stability: alpha
+Author: Will Donnelly
+Maintainer: Will Donnelly <will.donnelly@gmail.com>
+Copyright: (c) 2009 Will Donnelly
+
+Build-Type: Simple
+Cabal-Version: >= 1.2
+
+library
+ exposed-modules: Dyre,
+ Dyre.Params,
+ Dyre.Compile,
+ Dyre.Exec,
+ Dyre.Launch
+ build-depends: base, ghc-paths, directory, filepath, process, old-time, haskell98, unix
+
+source-repository head
+ type: git
+ location: git://github.com/willdonnelly/dyre.git

0 comments on commit 1e16577

Please sign in to comment.