LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Definition.DefsInternal

Description

Very basic types for content definitions with their internals exposed.

Synopsis

- newtype GroupName c = GroupName {
  - fromGroupName :: Text
  }
- displayGroupName :: GroupName c -> Text
- data ContentId c
- toContentId :: Word16 -> ContentId c
- fromContentId :: ContentId c -> Word16
- contentIdIndex :: ContentId c -> Int
- type ContentSymbol c = Char
- toContentSymbol :: Char -> ContentSymbol c
- displayContentSymbol :: ContentSymbol c -> Char

# Documentation

newtype GroupName c Source #

Constructors

GroupName |

Fields

- fromGroupName :: Text

#### Instances

Instances details

Binary (GroupName c) Source # |
Instance details Defined in Game.LambdaHack.Definition.DefsInternal Methods put :: GroupName c -> Put Source # get :: Get (GroupName c) Source # putList :: [GroupName c] -> Put Source #
NFData (GroupName c) Source # |
Instance details Defined in Game.LambdaHack.Definition.DefsInternal Methods rnf :: GroupName c -> () Source #
Show (GroupName c) Source # |
Instance details Defined in Game.LambdaHack.Definition.DefsInternal Methods showsPrec :: Int -> GroupName c -> ShowS Source # show :: GroupName c -> String Source # showList :: [GroupName c] -> ShowS Source #
Eq (GroupName c) Source # |
Instance details Defined in Game.LambdaHack.Definition.DefsInternal Methods (==) :: GroupName c -> GroupName c -> Bool Source # (/=) :: GroupName c -> GroupName c -> Bool Source #
Ord (GroupName c) Source # |

Instance details

Defined in Game.LambdaHack.Definition.DefsInternal

Methods

compare :: GroupName c -> GroupName c -> Ordering Source #

(<) :: GroupName c -> GroupName c -> Bool Source #

(<=) :: GroupName c -> GroupName c -> Bool Source #

(>) :: GroupName c -> GroupName c -> Bool Source #

(>=) :: GroupName c -> GroupName c -> Bool Source #

max :: GroupName c -> GroupName c -> GroupName c Source #

min :: GroupName c -> GroupName c -> GroupName c Source #

Hashable (GroupName c) Source # |
Instance details Defined in Game.LambdaHack.Definition.DefsInternal Methods hashWithSalt :: Int -> GroupName c -> Int Source # hash :: GroupName c -> Int Source #

displayGroupName :: GroupName c -> Text Source #

This does not need to be 1-1, so should not be used in place of the `Eq` instance, etc.

data ContentId c Source #

Content identifiers for the content type `c`.

#### Instances

Instances details

UnboxRepClass (ContentId k) Source # |

Instance details

Defined in Game.LambdaHack.Common.PointArray

Associated Types

type UnboxRep (ContentId k) |
Instance details Defined in Game.LambdaHack.Common.PointArray type UnboxRep (ContentId k) = Word16

Methods

toUnboxRepUnsafe :: ContentId k -> UnboxRep (ContentId k) Source #

fromUnboxRep :: UnboxRep (ContentId k) -> ContentId k Source #

Binary (ContentId c) Source # |
Instance details Defined in Game.LambdaHack.Definition.DefsInternal Methods put :: ContentId c -> Put Source # get :: Get (ContentId c) Source # putList :: [ContentId c] -> Put Source #
Enum (ContentId c) Source # |

Instance details

Defined in Game.LambdaHack.Definition.DefsInternal

Methods

succ :: ContentId c -> ContentId c Source #

pred :: ContentId c -> ContentId c Source #

toEnum :: Int -> ContentId c Source #

fromEnum :: ContentId c -> Int Source #

enumFrom :: ContentId c -> [ContentId c] Source #

enumFromThen :: ContentId c -> ContentId c -> [ContentId c] Source #

enumFromTo :: ContentId c -> ContentId c -> [ContentId c] Source #

enumFromThenTo :: ContentId c -> ContentId c -> ContentId c -> [ContentId c] Source #

Show (ContentId c) Source # |
Instance details Defined in Game.LambdaHack.Definition.DefsInternal Methods showsPrec :: Int -> ContentId c -> ShowS Source # show :: ContentId c -> String Source # showList :: [ContentId c] -> ShowS Source #
Eq (ContentId c) Source # |
Instance details Defined in Game.LambdaHack.Definition.DefsInternal Methods (==) :: ContentId c -> ContentId c -> Bool Source # (/=) :: ContentId c -> ContentId c -> Bool Source #
Ord (ContentId c) Source # |

Instance details

Defined in Game.LambdaHack.Definition.DefsInternal

Methods

compare :: ContentId c -> ContentId c -> Ordering Source #

(<) :: ContentId c -> ContentId c -> Bool Source #

(<=) :: ContentId c -> ContentId c -> Bool Source #

(>) :: ContentId c -> ContentId c -> Bool Source #

(>=) :: ContentId c -> ContentId c -> Bool Source #

max :: ContentId c -> ContentId c -> ContentId c Source #

min :: ContentId c -> ContentId c -> ContentId c Source #

Hashable (ContentId c) Source # |
Instance details Defined in Game.LambdaHack.Definition.DefsInternal Methods hashWithSalt :: Int -> ContentId c -> Int Source # hash :: ContentId c -> Int Source #
type UnboxRep (ContentId k) Source # |
Instance details Defined in Game.LambdaHack.Common.PointArray type UnboxRep (ContentId k) = Word16

toContentId :: Word16 -> ContentId c Source #

fromContentId :: ContentId c -> Word16 Source #

contentIdIndex :: ContentId c -> Int Source #

type ContentSymbol c = Char Source #

toContentSymbol :: Char -> ContentSymbol c Source #

displayContentSymbol :: ContentSymbol c -> Char Source #