This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; [org.clojure/tools.trace "0.7.5"] | |
(require '[clojure.tools.trace :as trace] | |
'[clojure.repl :as repl]) | |
(defmacro spit-to | |
"Dump diagnostics to a file" | |
[f & body] | |
`(spit ~f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Without dynalint: | |
(first 1) | |
IllegalArgumentException Don't know how to create ISeq from: java.lang.Long clojure.lang.RT.seqFrom (RT.java:505) | |
With dynalint: | |
(first 1) | |
ExceptionInfo ERROR (Dynalint id 4): First argument to clojure.core/first must be seqable: 1 (instance of class java.lang.Long) clojure.core/ex-info (core.clj:4327) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ^:skip-wiki clojure.core.typed.analyze-clj | |
(:require [clojure.jvm.tools.analyzer :as analyze] | |
[clojure.jvm.tools.analyzer.hygienic :as hygienic] | |
[clojure.tools.analyzer :as ta] | |
[clojure.tools.analyzer.jvm :as taj] | |
[clojure.tools.reader :as tr] | |
[clojure.tools.reader.reader-types :as readers] | |
[clojure.string :as str] | |
[clojure.java.io :as io] | |
[clojure.core.typed.utils :as u])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; CTYP-108 | |
(tc-e | |
(let [{:keys [a] :as props} | |
(ann-form {} '{})] | |
(when-not (and a) | |
(print-env "") | |
props))) | |
{:env {a__#0 (U nil false), props__#0 (HMap :mandatory {}), map__63343__#1 (HMap :mandatory {}), map__63343__#0 (HMap :mandatory {})}, | |
:props ((when (is (U nil false) props__#0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; [org.clojure/tools.analyzer.jvm "0.1.0-beta4"] | |
(ns tst.ana | |
(:require | |
[clojure.tools.analyzer.jvm :as taj] | |
[clojure.tools.analyzer.passes.jvm.emit-form :as emit-for m])) | |
(defn ^:private analyze1 [form env] | |
(let [a (taj/analyze form env) | |
frm (emit-form/emit-form a)] | |
(eval frm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
char string[] = "Hello World"; | |
printf("%s\n", string); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns analyze.clj | |
(:require [clojure.tools.analyzer :as ta] | |
[clojure.tools.analyzer.jvm :as taj] | |
[clojure.tools.analyzer.passes.jvm.emit-form :as emit-form] | |
[clojure.tools.reader :as tr] | |
[clojure.tools.reader.reader-types :as readers] | |
[clojure.string :as str] | |
[clojure.java.io :as io])) | |
(defn ^:private analyze1 [form env] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(deftype FooDT [normal other-keys?]) | |
(.normal ^FooDT (->FooDT 2 1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(t/ann overtone.music.pitch/chord | |
(Fn [Note Scale -> (t/Set MIDINote)] | |
[Note Scale Inversion -> (t/Set MIDINote)])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clojure.core.typed=> (cf (let [^clojure.lang.APersistentVector a (ann-form [] (Vec Any)) | |
_ (assert (instance? clojure.lang.APersistentVector a))] | |
(.indexOf a 0))) | |
int |
OlderNewer