Skip to content

Commit

Permalink
Merge branch 'master' of github.com:clojure/core.contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
fogus committed Mar 11, 2013
2 parents 3d95099 + a5adc38 commit 286b1c4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ 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)

* [Development Snapshot Versions](https://oss.sonatype.org/index.html#nexus-search;gav~org.clojure~core.contracts~~~)

[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>


Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/index.org
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -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"]]
Expand Down
10 changes: 6 additions & 4 deletions src/main/clojure/clojure/core/contracts/constraints.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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#]
Expand Down

0 comments on commit 286b1c4

Please sign in to comment.