Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
Thanks Bost. To workaround the need to delete annotations, manually add these requires to your ns form. You can choose whatever alias name you want. (:require [clojure.core.typed :as t] [clojure.spec.alpha :as s]) Thanks, Ambrose On Friday, October 13, 2017 at 6:56:34 PM UTC-4, Bost

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Rostislav Svoboda
A hint to a casual reader just trying stuff out: $ lein new hello $ cd hello # added {:user {:plugins [[lein-typed "0.4.2"]]}} to ~/.lein/profiles.clj # added [org.clojure/core.typed "0.4.2"] to project.clj $ lein typed infer-type hello.core CompilerException java.lang.RuntimeException: No such na

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
I enabled opt-in macro spec inference in core.typed 0.4.3, via a :spec-macros option. Here's an example with slingshot: Setup Inferred Macro specs

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
This is pretty much the extent of my macro heuristics: binding forms are often the first argument, and it's usually a vector. Also,

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
Potentially. Actually, it currently instruments and gathers data about macros, but doesn't output them

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Colin Fleming
This looks great! Can this be used to infer macro specs based on examples of usage? On 14 October 2017 at 04:30, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Hi, > > Happy to announce a new set of tools to *automatically* > *generate* types and specs for your projects. > > *D