packages feed

bla (empty) → 2009.10.13

raw patch · 6 files changed

+106/−0 lines, 6 filesdep +basedep +haskell98dep +unixsetup-changed

Dependencies added: base, haskell98, unix

Files

+ LICENSE view
@@ -0,0 +1,31 @@+Copyright (c) 2009, Jinjing Wang++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.++    * Neither the name of Jinjing Wang nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"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+OWNER OR CONTRIBUTORS 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.
+ Setup.lhs view
@@ -0,0 +1,4 @@+#! /usr/bin/env runhaskell++> import Distribution.Simple+> main = defaultMain
+ bla.cabal view
@@ -0,0 +1,23 @@+Name:                 bla+Version:              2009.10.13+Build-type:           Simple+Synopsis:             a stupid cron+Description:+        +    run a script forever++License:              BSD3+License-file:         LICENSE+Author:               Wang, Jinjing+Maintainer:           Wang, Jinjing <nfjinjing@gmail.com>+Build-Depends:        base+Cabal-version:        >= 1.2+category:             System+homepage:             http://github.com/nfjinjing/bla+data-files:           readme.md, changelog.md++Executable            bla+  ghc-options:        -Wall+  build-depends:      base >= 4 && < 5, unix, haskell98+  hs-source-dirs:     src/+  main-is:            bla.hs
+ changelog.md view
@@ -0,0 +1,1 @@+init
+ readme.md view
@@ -0,0 +1,11 @@+Bla : A stupid cron+====================+++    i=3 bla ls+++will run ls every 3 seconds.++do the math.+    
+ src/bla.hs view
@@ -0,0 +1,36 @@+import System.Environment+import Prelude hiding ((-))+import Control.Monad hiding (join)+import System+import System.Posix (sleep)+import Data.Maybe+import Control.Applicative+import Data.List+import Control.Arrow ((>>>))++main :: IO ()+main = forever - do+  env <- getEnvironment++  let i = lookup "i" >>> fromMaybe "1" >>> read - env++  cmd <- intercalate " " <$> getArgs+  +  br+  puts - "* " ++ cmd+  system cmd+  br++  puts - " ... "++  sleep i++  return ()++  where+    puts = putStrLn+    br = puts ""+    (-) = ($)+    infixr 0 -+  +