| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Drasil.Database.UIDRef
Contents
Synopsis
- data UIDRef typ
- hide :: IsChunk t => t -> UIDRef t
- unhide :: IsChunk t => UIDRef t -> ChunkDB -> Maybe t
- unhideOrErr :: IsChunk t => UIDRef t -> ChunkDB -> t
- data UnitypedUIDRef
- hideUni :: IsChunk t => t -> UnitypedUIDRef
- unhideUni :: IsChunk t => UnitypedUIDRef -> ChunkDB -> Maybe t
- unhideUniOrErr :: IsChunk t => UnitypedUIDRef -> ChunkDB -> t
UID References
A reference to another chunk through its UID, with a type variable to
retain information about the original chunk's type, useful for type-safe
dereferencing.
unhideOrErr :: IsChunk t => UIDRef t -> ChunkDB -> t Source #
Find a chunk by a UIDRef, erroring if not found.
data UnitypedUIDRef Source #
A variant of UIDRef without type information about the chunk being
referred to, effectively treating chunks as being "unityped."
Instances
| HasChunkRefs UnitypedUIDRef Source # | |
Defined in Drasil.Database.UIDRef | |
hideUni :: IsChunk t => t -> UnitypedUIDRef Source #
Create a UnitypedUIDRef to a chunk.
unhideUni :: IsChunk t => UnitypedUIDRef -> ChunkDB -> Maybe t Source #
Find a chunk by its UnitypedUIDRef.
unhideUniOrErr :: IsChunk t => UnitypedUIDRef -> ChunkDB -> t Source #
Find a chunk by its UnitypedUIDRef, erroring if not found.