Skip to content

Commit

Permalink
initialize evchain
Browse files Browse the repository at this point in the history
  • Loading branch information
wavewave committed May 15, 2012
0 parents commit 998e2e3
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 0 deletions.
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
The following license covers this documentation, and the source code, except
where otherwise indicated.

Copyright 2012, Ian-Woo Kim. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 changes: 10 additions & 0 deletions Setup.lhs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /usr/bin/env runhaskell

> import Distribution.Simple
> import Distribution.PackageDescription
> --import System.Process
> main = defaultMain
> --main = defaultMainWithHooks testUserHooks
> --testUserHooks = simpleUserHooks {
> -- preConf = \_ _ -> runCommand "cd rootcode; make; cd .." >>return emptyHookedBuildInfo
> -- }
37 changes: 37 additions & 0 deletions evchain.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Name: evchain
Version: 0.0
Synopsis:
Description:
License: BSD3
License-file: LICENSE
Author: Ian-Woo Kim
Maintainer: Ian-Woo Kim <[email protected]>
Build-Type: Simple
Cabal-Version: >= 1.8
data-files:


Executable evchain
Main-is: evchain.hs
hs-source-dirs: exe
ghc-options: -Wall -O2 -threaded -funbox-strict-fields -fno-warn-unused-do-bind
ghc-prof-options: -caf-all -auto-all
Build-Depends:
base>4, mtl>2, directory, filepath,
cmdargs, evchain

Library
hs-source-dirs: lib
ghc-options: -Wall -O2 -threaded -funbox-strict-fields -fno-warn-unused-do-bind
ghc-prof-options: -caf-all -auto-all
Build-Depends:
base>4, mtl>2, directory, filepath,
cmdargs
Exposed-Modules:
HEP.Automation.MadGraph.EventChain.ProgType
HEP.Automation.MadGraph.EventChain.Job
HEP.Automation.MadGraph.EventChain.Command
Other-Modules:



13 changes: 13 additions & 0 deletions exe/evchain.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Main where

import System.Console.CmdArgs

import HEP.Automation.MadGraph.EventChain.ProgType
import HEP.Automation.MadGraph.EventChain.Command

main :: IO ()
main = do
putStrLn "evchain"
param <- cmdArgs mode

commandLineProcess param
9 changes: 9 additions & 0 deletions lib/HEP/Automation/MadGraph/EventChain/Command.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module HEP.Automation.MadGraph.EventChain.Command where

import HEP.Automation.MadGraph.EventChain.ProgType
import HEP.Automation.MadGraph.EventChain.Job

commandLineProcess :: Evchain -> IO ()
commandLineProcess Test = do
putStrLn "test called"
startJob
5 changes: 5 additions & 0 deletions lib/HEP/Automation/MadGraph/EventChain/Job.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module HEP.Automation.MadGraph.EventChain.Job where

startJob :: IO ()
startJob = do
putStrLn "job started"
14 changes: 14 additions & 0 deletions lib/HEP/Automation/MadGraph/EventChain/ProgType.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{-# LANGUAGE DeriveDataTypeable #-}

module HEP.Automation.MadGraph.EventChain.ProgType where

import System.Console.CmdArgs

data Evchain = Test
deriving (Show,Data,Typeable)

test :: Evchain
test = Test

mode = modes [test]

0 comments on commit 998e2e3

Please sign in to comment.