Public Vars

Back

derive (clj)

(source)

function

(derive tag parent) (derive h tag parent)
Establishes a parent/child relationship between parent and tag. Parent must be a namespace-qualified symbol or keyword and child can be either a namespace-qualified symbol or keyword or a class. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to, and modifies, the global hierarchy.

Examples

clojure/core.typed
(ns ^:skip-wiki clojure.core.typed.ann.clojure
  "Type annotations for the base Clojure distribution."
  (:require [#?(:clj clojure.core.typed
                :cljs cljs.core.typed)
             :refer [defalias] :as t]))

(defalias
  ^{:doc "A hierarchy for use with derive, isa? etc."
    :forms '[Hierarchy]}
  t/Hierarchy
  '{:parents (t/Map Any Any)
    :ancestors (t/Map Any Any)
    :descendants (t/Map Any Any)})
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))))

(t/defalias
  ^{:doc "A hierarchy for use with derive, isa? etc."
    :forms '[Hierarchy]}
  t/Hierarchy
  '{:parents (t/Map t/Any t/Any)
    :ancestors (t/Map t/Any t/Any)
    :descendants (t/Map t/Any t/Any)})

cc/derive [t/Hierarchy :?, (t/U t/Named #?(:clj Class)), t/Named :-> t/Hierarchy]
clojure-numerics/expresso
(ns numeric.expresso.types
  (:refer-clojure :exclude [== long double record?])
  (:use [clojure.test]
        [clojure.core.logic.protocols]
        [clojure.core.logic :exclude [is]])
  (:require 
   [clojure.set :as set]
   [clojure.core.matrix :as mat]
   [clojure.walk :as walk]))

(derive integer number)
(derive long number)
(derive double number)
re-path/studio
(ns renderer.tools.svg
  "https://www.w3.org/TR/SVG/struct.html#SVGElement"
  (:require
   [clojure.core.matrix :as mat]
   [clojure.string :as str]
   [renderer.element.handlers :as element.h]
   [renderer.tools.base :as tools]
   [renderer.utils.units :as units]))

(derive :svg ::tools/container)
re-path/studio
(ns renderer.tools.edit
  (:require
   [clojure.core.matrix :as mat]
   [renderer.element.handlers :as element.h]
   [renderer.handlers :as handlers]
   [renderer.history.handlers :as history]
   [renderer.tools.base :as tools]
   [renderer.utils.pointer :as pointer]))

(derive :edit ::tools/transform)