Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:clojure/core.contracts

  • Loading branch information...
commit 286b1c44a35ba4121081a3b0d373dcae172749f8 2 parents 3d95099 + a5adc38
@fogus fogus authored
View
9 README.md
@@ -11,7 +11,7 @@ Based on [Trammel](http://github.com/fogus/trammel) and [clojure-contracts](http
Releases and Dependency Information
========================================
-Latest stable release: 0.0.1
+Latest stable release: 0.0.4
* [All Released Versions](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22core.cache%22)
@@ -19,14 +19,14 @@ Latest stable release: 0.0.1
[Leiningen](https://github.com/technomancy/leiningen) dependency information:
- [org.clojure/core.contracts "0.0.1"]
+ [org.clojure/core.contracts "0.0.4"]
[Maven](http://maven.apache.org/) dependency information:
<dependency>
<groupId>org.clojure</groupId>
<artifactId>core.contracts</artifactId>
- <version>0.0.1</version>
+ <version>0.0.4</version>
</dependency>
@@ -71,6 +71,9 @@ Developer Information
Change Log
====================
+* Release 0.0.4 on 2013.03.07
+ * Rolled in `defconstrainedrecord`
+ * Rolled in associative checks
* Release 0.0.1 on 2012.06.01
* Rolled in `contract`, `with-constraints` and `provide` from Trammel
View
2  docs/index.org
@@ -7,7 +7,7 @@
First add the following to your [[https://github.com/technomancy/leiningen][Leiningen]] /project.clj/ file in the ~:dependencies~ section:
#+begin_src clojure
-[org.clojure/core.contracts "0.0.1"]
+[org.clojure/core.contracts "0.0.4"]
#+end_src
To include core.contracts, add it to your namespace declaration:
View
2  pom.xml
@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>core.contracts</artifactId>
- <version>0.0.3-SNAPSHOT</version>
+ <version>0.0.5-SNAPSHOT</version>
<name>${artifactId}</name>
<description>A contracts programming library for Clojure</description>
<packaging>jar</packaging>
View
2  project.clj
@@ -1,4 +1,4 @@
-(defproject core.contracts "0.0.3-SNAPSHOT"
+(defproject core.contracts "0.0.5-SNAPSHOT"
:description "Contracts programming for Clojure."
:dependencies [[org.clojure/clojure "1.5.0"]
[org.clojure/core.unify "0.5.3"]]
View
10 src/main/clojure/clojure/core/contracts/constraints.clj
@@ -2,6 +2,7 @@
(:refer-clojure :exclude [== = not=])
(:use [clojure.core.contracts.impl.utils :only (defcurry-from)])
(:require [clojure.set :as set]
+ clojure.core.contracts
clojure.core.contracts.impl.transformers))
;; # constraint functions and multimethods
@@ -143,10 +144,11 @@
ctor-name (symbol (str name \.))
positional-factory-name (symbol (str "->" name))
map-arrow-factory-name (symbol (str "map->" name))
- chk `(contract ~(symbol (str "chk-" name))
- ~inv-description
- [{:keys ~fields :as m#}]
- ~invariants)]
+ chk `(clojure.core.contracts/contract
+ ~(symbol (str "chk-" name))
+ ~inv-description
+ [{:keys ~fields :as m#}]
+ ~invariants)]
`(do
(let [t# (defrecord ~name ~fields ~@etc)]
(defn ~(symbol (str name \?)) [r#]
Please sign in to comment.
Something went wrong with that request. Please try again.