Public Vars

Back

loaded-libs (clj)

(source)

function

(loaded-libs)
Returns a sorted set of symbols naming the currently loaded libs

Examples

typedclojure/typedclojure
(ns ^:no-doc typed.ann.clojure
  "Type annotations for the base Clojure distribution."
  #?(:cljs (:require-macros [typed.ann-macros.clojure :as macros]))
  (:require [clojure.core :as cc]
            [typed.clojure :as t]
            #?(:clj [typed.ann-macros.clojure :as macros])
            #?(:clj typed.ann.clojure.jvm) ;; jvm annotations
            #?(:clj clojure.core.typed))
  #?(:clj
     (:import (clojure.lang PersistentHashSet PersistentList
                            APersistentMap #_IPersistentCollection
                            #_ITransientSet
                            IRef)
              (java.util Comparator Collection))))

#?@(:cljs [] :default [
cc/require [t/Any :* :-> nil]
cc/requiring-resolve [t/Sym :-> (t/Nilable t/AnyVar)]
cc/use [t/Any :* :-> nil]
cc/*loaded-libs* (t/Ref (t/Set t/Sym))
])
clojure-goes-fast/lazy-require
  ;; First, ensure that it really takes awhile to load.
  (let [start (System/currentTimeMillis)]
    (require 'clojure.core.reducers)
    (is (> (- (System/currentTimeMillis) start) 50)
        "Loading c.c.reducers should take some time."))

  ;; Flush *loaded-libs* so that c.c.reducers is not "loaded" now
  (dosync (ref-set @#'clojure.core/*loaded-libs* (sorted-set)))