antisplice-0.15.0.1: An engine for text-based dungeons.

Safe HaskellNone

Game.Antisplice.Monad.Vocab

Description

Provides a monad that collects vocab during dungeon construction and reproduces it later.

Synopsis

Documentation

data Token Source

Algebraic type for primitive and complex tokens.

Constructors

Unintellegible String 
Verb String 
Prep String 
Noun String 
Adj String 
Ordn Int String 
Fixe String 
Skilln String 
Nounc [String] (Maybe Int) String

Complex noun, with attributes and maybe ordinal index.

class Monad m => MonadVocab m whereSource

Tyepclass for all vocab-memorizing monads.

Methods

lookupVocab :: String -> m TokenSource

Lookup a word and return its token.

insertVocab :: String -> (String -> Token) -> m ()Source

Learn a new word.

vocabKnown :: String -> m BoolSource

Check if a word is already known.