{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MonoLocalBinds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Diagrams.Names
(
AName, Name, IsName(..), (.>)
, Qualifiable(..)
, Subdiagram, mkSubdiagram, subPoint, getSub, rawSub, location
, SubMap, fromNames, rememberAs, lookupSub
, named, nameSub, namePoint, localize
, names
, lookupName
, withName, withNameAll, withNames
) where
import Data.Semigroup
import Diagrams.Core (OrderedField, Point)
import Diagrams.Core.Names
import Diagrams.Core.Types
import Linear.Metric
named :: (IsName nm, Metric v, OrderedField n, Semigroup m)
=> nm -> QDiagram b v n m -> QDiagram b v n m
named :: forall nm (v :: * -> *) n m b.
(IsName nm, Metric v, OrderedField n, Semigroup m) =>
nm -> QDiagram b v n m -> QDiagram b v n m
named = forall nm (v :: * -> *) n m b.
(IsName nm, Metric v, OrderedField n, Semigroup m) =>
(QDiagram b v n m -> Subdiagram b v n m)
-> nm -> QDiagram b v n m -> QDiagram b v n m
nameSub forall b (v :: * -> *) n m. QDiagram b v n m -> Subdiagram b v n m
mkSubdiagram
namePoint :: (IsName nm , Metric v, OrderedField n, Semigroup m)
=> (QDiagram b v n m -> Point v n) -> nm -> QDiagram b v n m -> QDiagram b v n m
namePoint :: forall nm (v :: * -> *) n m b.
(IsName nm, Metric v, OrderedField n, Semigroup m) =>
(QDiagram b v n m -> Point v n)
-> nm -> QDiagram b v n m -> QDiagram b v n m
namePoint QDiagram b v n m -> Point v n
p = forall nm (v :: * -> *) n m b.
(IsName nm, Metric v, OrderedField n, Semigroup m) =>
(QDiagram b v n m -> Subdiagram b v n m)
-> nm -> QDiagram b v n m -> QDiagram b v n m
nameSub (forall (v :: * -> *) n b m.
(Metric v, OrderedField n) =>
Point v n -> Subdiagram b v n m
subPoint forall b c a. (b -> c) -> (a -> b) -> a -> c
. QDiagram b v n m -> Point v n
p)