<< Back to previous view

[CTYP-25] Mark unannotated vars Created: 26/Mar/13  Updated: 25/Sep/13  Resolved: 09/Apr/13

Status: Closed
Project: core.typed
Component/s: None
Affects Version/s: 0.2.0
Fix Version/s: 0.2.0

Type: Enhancement Priority: Minor
Reporter: Ambrose Bonnaire-Sergeant Assignee: Ambrose Bonnaire-Sergeant
Resolution: Completed Votes: 1
Labels: None


 Description   

Instead of using tc-ignore, provide `ann-unchecked` to signify we should skip certain vars when type checking.



 Comments   
Comment by Ambrose Bonnaire-Sergeant [ 09/Apr/13 1:17 AM ]

Added :nocheck metadata to `ann`. Print warnings if a var is marked as checked, but no definition found. Ignore `def` forms marked as nocheck.





[CTYP-19] ann-form requires fully qualified classnames Created: 10/Mar/13  Updated: 15/Sep/13  Resolved: 29/Mar/13

Status: Closed
Project: core.typed
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2.0

Type: Defect Priority: Major
Reporter: Andrew Brehaut Assignee: Ambrose Bonnaire-Sergeant
Resolution: Completed Votes: 0
Labels: None


 Description   

Classes imported into a namespace are visible to clojure.core.type/ann without qualification, but require full qualification with 'clojure.core.type/ann-form.

For example:

(ns ring.typed.util.data
  "Miscellaneous functions for manipulating data structures."
  (:require [clojure.core.typed :refer [ann ann-form]])

  (:import (clojure.lang IPersistentVector
                         IPersistentMap)))

(ann assoc-conj
     (All [x] (Fn [(IPersistentMap Any (U x (IPersistentVector (U Any x)))) Any x -> 
                   (IPersistentMap Any (U x (IPersistentVector x)))]
                  [(IPersistentVector (U x (IPersistentVector x))) Integer x ->
                   (IPersistentVector (U x (IPersistentVector x)))])))
(defn assoc-conj
  "Associate a key with a value in a map. If the key already exists in the map,
  a vector of values is associated with the key."
  [map key val]
  (assoc map key
    (if-let [cur (get map key)]
      (if (vector? cur)
        (ann-form (conj cur val)
                  (IPersistentVector x))
        [cur val])
      val)))

This results in a "Cannot parse list: (IPersistentVector x)" Exception

When

(ann-form (conj cur val)
                  (IPersistentVector x))

is changed to

(ann-form (conj cur val)
                  (clojure.lang.IPersistentVector x))

checking works.

I have been running check-ns from the 'user namespace



 Comments   
Comment by Ambrose Bonnaire-Sergeant [ 10/Mar/13 9:25 PM ]

Confirmed. This is due to running the type checker in a namespace other than the namespace being checked.

Comment by Ambrose Bonnaire-Sergeant [ 29/Mar/13 7:50 AM ]

Fixed: https://github.com/clojure/core.typed/commit/0d195fbc879f5e62051ec922ffbd2c8ada4a194a





[CTYP-17] Decomposition Alms inference phase Created: 09/Mar/13  Updated: 15/Sep/13  Resolved: 13/Apr/13

Status: Closed
Project: core.typed
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2.0

Type: Task Priority: Major
Reporter: Ambrose Bonnaire-Sergeant Assignee: Ambrose Bonnaire-Sergeant
Resolution: Declined Votes: 0
Labels: None


 Comments   
Comment by Ambrose Bonnaire-Sergeant [ 13/Apr/13 7:38 PM ]

This can wait.





[CTYP-16] Parameterise IFn instead of special function type. Created: 08/Mar/13  Updated: 16/Sep/13

Status: Open
Project: core.typed
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2.0

Type: Task Priority: Minor
Reporter: Ambrose Bonnaire-Sergeant Assignee: Ambrose Bonnaire-Sergeant
Resolution: Unresolved Votes: 0
Labels: None


 Comments   
Comment by Chris Spencer [ 16/Sep/13 5:54 AM ]

Need to support primitive hinted functions too:

user=> (defn f [^long x] x)
#'user/f
user=> (clojure.tools.analyzer/analyze-form '(fn [] (f 5)))
{:op :fn-expr, :env {:line 1, :locals {}, :ns {:name user}}, :methods ({:op :fn-method, :env {:locals {}, :ns {:name user}}, :body {:op :do, :env {:source "NO_SOURCE_FILE", :column 46, :line 1, :locals {}, :ns {:name user}}, :exprs ({:op :instance-method, :env {:source "NO_SOURCE_FILE", :column 46, :line 1, :locals {}, :ns {:name user}}, :target {:op :var, :env {:locals {}, :ns {:name user}}, :var #'user/f, :tag clojure.lang.IFn$LO}, :method-name "invokePrim", :method #clojure.reflect.Method{:name invokePrim, :return-type java.lang.Object, :declaring-class clojure.lang.IFn$LO, :parameter-types [long], :exception-types [], :flags #{:public :abstract}}, :args ({:op :number, :env {:locals {}, :ns {:name user}}, :val 5}), :tag nil})}, :required-params (), :rest-param nil}), :variadic-method nil, :tag nil}




[CTYP-15] Eliminate the need to specify all ancestors in alter-class. Created: 08/Mar/13  Updated: 08/Mar/13

Status: Open
Project: core.typed
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2.0

Type: Task Priority: Minor
Reporter: Ambrose Bonnaire-Sergeant Assignee: Ambrose Bonnaire-Sergeant
Resolution: Unresolved Votes: 0
Labels: None





[CTYP-8] Support complex map manipulation functions Created: 03/Mar/13  Updated: 08/Mar/13

Status: Open
Project: core.typed
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2.0

Type: Enhancement Priority: Minor
Reporter: Ambrose Bonnaire-Sergeant Assignee: Ambrose Bonnaire-Sergeant
Resolution: Unresolved Votes: 0
Labels: None


 Description   

update-in, assoc-in, select-keys






[CTYP-5] Support keyword arguments Created: 03/Mar/13  Updated: 25/Sep/13  Resolved: 13/Apr/13

Status: Closed
Project: core.typed
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2.0

Type: Enhancement Priority: Minor
Reporter: Ambrose Bonnaire-Sergeant Assignee: Ambrose Bonnaire-Sergeant
Resolution: Completed Votes: 0
Labels: None


 Comments   
Comment by Ambrose Bonnaire-Sergeant [ 13/Apr/13 9:33 PM ]

Supports mandatory and optional keyword arguments.





[CTYP-3] Support Strings as Seqables Created: 03/Mar/13  Updated: 25/Sep/13  Resolved: 08/Mar/13

Status: Closed
Project: core.typed
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2.0

Type: Enhancement Priority: Minor
Reporter: Ambrose Bonnaire-Sergeant Assignee: Ambrose Bonnaire-Sergeant
Resolution: Completed Votes: 0
Labels: None





[CTYP-2] Support looping macros Created: 03/Mar/13  Updated: 15/Sep/13  Resolved: 26/Mar/13

Status: Closed
Project: core.typed
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2.0

Type: Enhancement Priority: Major
Reporter: Ambrose Bonnaire-Sergeant Assignee: Ambrose Bonnaire-Sergeant
Resolution: Completed Votes: 0
Labels: None


 Description   

Work out how to support `for`, `doseq` and friends.



 Comments   
Comment by Ambrose Bonnaire-Sergeant [ 26/Mar/13 5:43 AM ]

Added doseq>, for> and dotimes>.





Generated at Tue Oct 21 16:43:02 CDT 2014 using JIRA 4.4#649-r158309.