Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tag: core.typed-0.1…
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (21 sloc) 0.72 kB
(ns clojure.core.typed.hole
(:require [clojure.core.typed :refer [ann ann-datatype]]))
(ann silent-hole [-> Nothing])
(defn silent-hole
"A silent hole. (silent-hole) passes for any other type
when type checking.
Use (silent-hole) as a placeholder for code.
Throws an exception when evaluted."
[]
(throw (Exception. "silent hole")))
(ann-datatype NoisyHole [])
(deftype NoisyHole [])
(ann noisy-hole [-> NoisyHole])
(defn noisy-hole
"A noisy hole. The type system will complain when
(noisy-hole) is used in positions that expect a type
more specific than Object or Any.
Use (noisy-hole) as a placeholder for code.
Throws an exception when evaluted."
[]
(throw (Exception. "noisy hole")))
Jump to Line
Something went wrong with that request. Please try again.