drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Drasil.Database.Chunk

Synopsis

Documentation

data Chunk Source #

A piece of reusable knowledge, with an internal identifier (UID), possibly dependant on other chunks.

Instances

Instances details
HasUID Chunk Source # 
Instance details

Defined in Drasil.Database.Chunk

Methods

uid :: Getter Chunk UID Source #

Eq Chunk Source # 
Instance details

Defined in Drasil.Database.Chunk

Methods

(==) :: Chunk -> Chunk -> Bool #

(/=) :: Chunk -> Chunk -> Bool #

type IsChunk a = (HasUID a, HasChunkRefs a, Typeable a) Source #

Constraint for anything that may be considered a valid chunk type.

class HasChunkRefs a where Source #

All chunks should expose what chunks they reference/rely on, so that we can test ChunkDBs to ensure all presupposed chunks are already registered.

Methods

chunkRefs :: a -> Set UID Source #

mkChunk :: IsChunk a => a -> Chunk Source #

Create a Chunk, ensuring that Chunks are never placed within Chunks.

unChunk :: Typeable a => Chunk -> Maybe a Source #

Open chunks, casting them to a specific type.

chunkType :: Chunk -> TypeRep Source #

Ask a Chunk for the type of data it codifies.