Having trouble typing core.string/blank?

Description

(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))

Fails.

Apologies if this is wrong.

Environment

None

Activity

Show:
Ambrose Bonnaire-Sergeant
September 25, 2013, 9:12 AM

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

import
September 28, 2013, 8:58 PM

Comment made by: julian

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.

Ambrose Bonnaire-Sergeant
September 29, 2013, 4:16 AM

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.

Completed

Assignee

Ambrose Bonnaire-Sergeant

Reporter

import

Labels

None

Approval

None

Patch

None

Affects versions

Priority

Major
Configure