flaw-editor-0.1.0.0

LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Flaw.Editor.Entity.Tag

Description

Entity tags are special types of entities which could be only attached to other entities. Each entity may only have zero or one attached tag of any single tag type. Tags are entities too, but they have unusual entity id: it's concatenation of tag id and attached entity's id.

Synopsis

Documentation

newtype EntityTagId Source #

Entity tag id, used for prefixing entity id of tag entities.

pattern ENTITY_TAG_ID_SIZE :: forall a. (Eq a, Num a) => a Source #

entityTagEntityId :: EntityTagId -> EntityId -> EntityId Source #

Combine entity tag id and entity id to get entity tag's entity id.

hashTextToEntityTagId :: Text -> Q Exp Source #

Handy function to generate compile-time entity tag id out of text.