Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
kongra committed Feb 26, 2019
1 parent 7b8478c commit 7fa3945
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 10 deletions.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;; Copyright (c) Konrad Grzanek
;; Created 2019-01-05
(defproject kongra/prelude "0.1.14"
(defproject kongra/prelude "0.1.15"
:description "Predule codebase for Clojure"
:url "https://github.com/kongra/prelude"
:license {:name "Eclipse Public License"
Expand All @@ -11,9 +11,9 @@
[org.clojure/math.numeric-tower "0.0.4"]
[org.apache.commons/commons-lang3 "3.8.1"]
[org.uncommons.maths/uncommons-maths "1.2.2a"]
[kongra/ch "0.1.15"]
[kongra/ch "0.1.16"]

[org.clojure/clojurescript "1.10.516"]]
[org.clojure/clojurescript "1.10.520"]]

:plugins [[lein-cljsbuild "1.1.7"]]

Expand All @@ -23,8 +23,7 @@

:java-source-paths ["src/main/java"]

:global-vars {*warn-on-reflection* true
*assert* true
:global-vars {*warn-on-reflection* false
*print-length* 500}

;; :pedantic? :warn
Expand All @@ -36,7 +35,7 @@
:aliases {"fig:repl" ["trampoline" "run" "-m" "figwheel.main" "-b" "dev" "-r"]}

:profiles {:repl {:plugins [[lein-nodisassemble "0.1.3"]
[cider/cider-nrepl "0.20.0"]]
[cider/cider-nrepl "0.21.0"]]

:middleware [lein-nodisassemble.plugin/middleware
cider-nrepl.plugin/middleware]
Expand All @@ -46,7 +45,8 @@
"-XX:+UseCompressedOops"
"-Xms1G"
"-Xmx1G"
"-verbose:gc"]}
;; "-verbose:gc"
]}

:dev {:dependencies [[com.bhauman/figwheel-main "0.2.0"]
[com.bhauman/rebel-readline-cljs "0.1.4"]]
Expand Down
4 changes: 3 additions & 1 deletion src/main/clojure/clojure/kongra/prelude.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
:as m]

[clojure.kongra.ch
:refer [defchP chBool chUnit chMaybe chString chAtom
:refer [defchP chBool chUnit chOptional chString chAtom
chNumber chNatLong chIfn
chSeq chSequential chAssoc chColl chVector]]))

(set! *warn-on-reflection* true)

;; SYS/JVM
(defn room
[]
Expand Down
2 changes: 2 additions & 0 deletions src/main/clojure/clojure/kongra/prelude/doclean.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
[clojure.kongra.ch
:refer [defchP chIfn chUnit]]))

(set! *warn-on-reflection* true)

;; CLEANUP CONTEXT
(defchP chDoclean (instance? jkongra.prelude.Doclean x))

Expand Down
2 changes: 2 additions & 0 deletions src/main/clojure/clojure/kongra/prelude/io.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
(:import
[java.nio.charset Charset]))

(set! *warn-on-reflection* true)

;; SYSTEM-WIDE CHARACTER ENCODING
(def ^Charset ENCODING (chSome (Charset/forName "UTF-8")))
2 changes: 2 additions & 0 deletions src/main/clojure/clojure/kongra/prelude/locrefs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
:exclude [boolean byte short char int long float double
reset!]))

(set! *warn-on-reflection* true)

;; FAST MUTABLE, THREAD-UNSAFE (LOCAL) REFS FOR JAVA PRIMITIVE TYPES.
;; NO IDENTITY SEMANTICS.
;; (:require [clongra.locrefs :as lr])
Expand Down
6 changes: 4 additions & 2 deletions src/main/clojure/clojure/kongra/prelude/print.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@

(:require
[clojure.kongra.ch
:refer [chString chBool chMaybe chSequential chIfn
:refer [chString chBool chOptional chSequential chIfn
chNatLong chUnit chAtom]]

[clojure.kongra.prelude
:refer [markLast]]))

(set! *warn-on-reflection* true)

;; TREE-PRINTING
(def ^:private PRINT-TREE-INDENT "")
(def ^:private PRINT-TREE-EMPTYINDENT " ")
Expand All @@ -32,7 +34,7 @@
[[isLast? & lastChildInfos]]
(chString
(do (chBool isLast?)
(chMaybe chSequential lastChildInfos)
(chOptional chSequential lastChildInfos)
(let [suffix (if isLast?
PRINT-TREE-FORLASTCHILD
PRINT-TREE-FORCHILD)
Expand Down
2 changes: 2 additions & 0 deletions src/main/clojure/clojure/kongra/prelude/search.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
[clojure.kongra.prelude
:refer [lazyCat]]))

(set! *warn-on-reflection* true)

;; TREE SEARCH ROUTINES FROM BY PAIP, CHAPTER 6.4

;; COMBINERS
Expand Down

0 comments on commit 7fa3945

Please sign in to comment.