<< Back to previous view

[CTYP-70] Having trouble typing core.string/blank? Created: 24/Sep/13  Updated: 28/Sep/13

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

Type: Defect Priority: Major
Reporter: Julian Birch Assignee: Ambrose Bonnaire-Sergeant
Resolution: Unresolved Votes: 0
Labels: None


(ns moonrise
(:require [clojure.core.typed :refer :all]
[clojure.string :as s]))

(cf (ann core.string/blank? [String -> Boolean]))

(ann x [String -> Boolean])
(defn x [s] (s/blank? s))


Apologies if this is wrong.

Comment by Ambrose Bonnaire-Sergeant [ 25/Sep/13 3:12 AM ]

I think core.string/blank? should be clojure.string/blank?. Also cf is not allowed inside a typed file.

Comment by Julian Birch [ 28/Sep/13 2:58 PM ]

Clunk. You're absolutely right. Assuming there's no (cf) there, is there any way you could log an error for an annotation with no associated actual definition? Obviously, to be useful, it'd have to appear in the appropriate location in the file.

Comment by Ambrose Bonnaire-Sergeant [ 28/Sep/13 10:16 PM ]

I don't know. Perhaps at the end of type checking a namespace I can check if a var exists for each annotation. I don't think it's really feasible for REPL development though.

Generated at Sat Apr 19 09:30:30 CDT 2014 using JIRA 4.4#649-r158309.