Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move to Clojure 1.3.0

  • Loading branch information...
commit 6d9176176566b64ed963b377dab0cccdc06c4725 1 parent bbeead6
Jim Duey authored
View
14 project.clj
@@ -1,13 +1,7 @@
-(defproject conduit "0.9.0"
+(defproject net.intensivesystems/conduit "0.9.0"
:description "Conduit: Stream Processing in Clojure."
- :dependencies [[org.clojure/clojure "1.2.1"]
- [org.clojure/clojure-contrib "1.2.0"]
- [arrows "1.2.0"]]
+ :dependencies [[org.clojure/clojure "1.3.0"]
+ [net.intensivesystems/arrows "1.2.0"]]
:dev-dependencies [[clj-stacktrace "0.2.2"]
- [lein-difftest "1.3.3"]
[lein-fail-fast "1.0.0"]
- [lein-release "1.1.1"]
- [swank-clojure "1.2.1"]]
- ;; for ci purposes
- :repositories {"snapshots" "http://localhost/archiva/repository/snapshots"
- "releases" "http://localhost/archiva/repository/internal"})
+ [lein-release "1.1.1"]])
View
21 src/conduit/core.clj
@@ -1,7 +1,5 @@
(ns conduit.core
- (:use [clojure.contrib.seq-utils :only [indexed]]
- [clojure.contrib.def :only [defalias defmacro-]]
- [clojure.pprint :only [pprint]]
+ (:use [clojure.pprint :only [pprint]]
[arrows.core]))
(defn merge-parts [ps]
@@ -36,17 +34,6 @@
(cons (first y)
(a-run new-f))))))
-(defn wait-for-reply [f x]
- ((second (f x)) identity))
-
-(defn enqueue [f & xs]
- (loop [[x & xs] xs
- f f]
- (when x
- (let [[new-f result-f] (f x)]
- (result-f nil)
- (recur xs new-f)))))
-
(defn comp-fn [[f & fs]]
(fn curr-fn [x]
(let [[new-f first-c] (f x)
@@ -303,6 +290,9 @@
:args p
:parts (:parts p)}))
+(defn wait-for-reply [f x]
+ ((second (f x)) identity))
+
(defn test-conduit [p]
(let [args (:args (meta p))]
(condp = (:created-by p)
@@ -329,5 +319,4 @@
:disperse (disperse (test-conduit args)))))
(defn test-conduit-fn [p]
- (fn [x]
- ((second (p x)) identity)))
+ (partial wait-for-reply (test-conduit p)))
View
12 src/conduit/require.clj
@@ -1,27 +1,23 @@
(ns conduit.require
(:use [conduit.core :exclude [disperse test-conduit test-conduit-fn]])
- (:refer-clojure :exclude [case comp juxt reduce map identity]))
+ (:refer-clojure :exclude [case comp juxt reductions filter map identity]))
(def identity pass-through)
(def proc a-arr)
-(def proc* conduit-proc)
(def case a-selectp)
(def comp a-comp)
(def split a-all)
(def juxt a-par)
-(def reduce a-loop)
+(def reductions a-loop)
(def map conduit-map)
-(def do conduit-do)
+(def filter a-filter)
(def select a-select)
(def selectp a-selectp)
(def if a-if)
-(def try a-except)
+(def try a-catch)
(def finally a-finally)
(def disperse conduit.core/disperse)
(def test-conduit conduit.core/test-conduit)
(def test-conduit-fn conduit.core/test-conduit-fn)
(defmacro def [name args & body]
`(def ~name (a-arr (fn ~name ~args ~@body))))
-(defmacro def* [name args & body]
- `(def ~name (conduit-proc (fn ~name ~args ~@body))))
-
View
3  test/conduit/test/core.clj
@@ -1,5 +1,5 @@
(ns conduit.test.core
- #_(:require [conduit.require :as conduit])
+ (:require [conduit.require :as conduit])
(:use conduit.core :reload-all)
(:use clojure.test
arrows.core))
@@ -256,4 +256,3 @@
(deftest test-text-conduit-fn
(is (= 5 (first ((test-conduit-fn pl) 4)))))
-(run-tests)
Please sign in to comment.
Something went wrong with that request. Please try again.