module Drasil.Database.TypedUIDRef
( TypedUIDRef(..),
mkRef
)
where
import Drasil.Database.Chunk (IsChunk)
import Drasil.Database.UID (HasUID (uid), UID)
import Control.Lens ((^.))
newtype TypedUIDRef typ = TypedUIDRef UID
mkRef :: IsChunk t => t -> TypedUIDRef t
mkRef :: forall t. IsChunk t => t -> TypedUIDRef t
mkRef t
t = UID -> TypedUIDRef t
forall typ. UID -> TypedUIDRef typ
TypedUIDRef (UID -> TypedUIDRef t) -> UID -> TypedUIDRef t
forall a b. (a -> b) -> a -> b
$ t
t t -> Getting UID t UID -> UID
forall s a. s -> Getting a s a -> a
^. Getting UID t UID
forall c. HasUID c => Getter c UID
Getter t UID
uid