Skip to content

Commit 7dbf0a1

Browse files
committed
Fix small things.
1 parent 8b0337e commit 7dbf0a1

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A minimalist data driven data model library, inspired by [Clojure Spec](https://
1616

1717
(def hiccup-model
1818
(h/let ['hiccup (h/alt [:node (h/in-vector (h/cat [:name (h/fn keyword?)]
19-
[:props (h/? (h/map-of (h/fn keyword?) (h/fn any?)))]
19+
[:props (h/? (h/map-of (h/vector (h/fn keyword?) (h/fn any?))))]
2020
[:children (h/* (h/not-inlined (h/ref 'hiccup)))]))]
2121
[:primitive (h/alt [:nil (h/fn nil?)]
2222
[:boolean (h/fn boolean?)]
@@ -30,8 +30,8 @@ A minimalist data driven data model library, inspired by [Clojure Spec](https://
3030

3131
(describe hiccup-model [:div {:class [:foo :bar]}
3232
[:p "Hello, world of data"]])
33-
;=> [:node {:name :div,
34-
; :props [{:class [:foo :bar]}],
33+
;=> [:node {:name :div
34+
; :props [[[:class [:foo :bar]]]]
3535
; :children [[:node {:name :p
3636
; :props []
3737
; :children [[:primitive [:text "Hello, world of data"]]]}]]}]

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
;; clj -Spom
1818
;; - build the jar:
1919
;; clojure -A:depstar -m hf.depstar.jar minimallist.jar -v
20+
;; - add a tag "v0.0.x" to the latest commit and push to repo
2021
;; - deploy:
2122
;; mvn deploy:deploy-file -Dfile=minimallist.jar -DpomFile=pom.xml -DrepositoryId=clojars -Durl=https://clojars.org/repo/
22-
;; - add a tag "v0.0.x" to the latest commit and push to repo

doc/model_builder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ outside of a `:condition-model` field, you need to add your own generator to the
104104
(h/set-of (h/fn keyword?))
105105

106106
;; Map of id->name.
107-
(h/map-of (h/fn int?) (h/fn string?))
107+
(h/map-of (h/vector (h/fn int?) (h/fn string?)))
108108

109109
;; Sequence of numbers, either in a list or in a vector.
110110
(h/sequence-of (h/fn int?))

src/minimallist/minicup.cljc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
[:map (h/in-vector (h/cat (h/val :map)
8888
(h/+ (entry-of (h/ref 'model)))))]
8989
[:map-of (h/vector (h/val :map-of)
90-
(h/ref 'model)
9190
(h/ref 'model))]
9291
[:sequence-of (h/in-vector (h/cat (h/val :sequence-of)
9392
(h/? (h/map [:count {:optional true} (h/ref 'model)]))

src/minimallist/minimap.cljc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@
6161
[:condition-model (h/ref 'model)])
6262
(h/with-condition (h/fn #(<= (:min %) (:max %)))))]
6363
[:let (h/map [:type (h/val :let)]
64-
[:bindings (h/map-of (h/fn any?)
65-
(h/ref 'model))]
64+
[:bindings (h/map-of (h/vector (h/fn any?) (h/ref 'model)))]
6665
[:body (h/ref 'model)])]
6766
[:ref (h/map [:type (h/val :ref)]
6867
[:key (h/fn any?)])])]

0 commit comments

Comments
 (0)