app

Safe Haskell None
Language Haskell2010

Mana

Description

Module dealing with mana

Synopsis

Documentation

amount :: T -> Mana -> Nat #

amount t m returns the amount of mana of m at turn t

class Labeler a where #

How to typeset mana when an a is available

Methods

labeler :: a -> Mana -> String #

Instances
Contains a T => Labeler a #  
Instance details

Defined in Mana

Methods

labeler :: a -> Mana -> String #

data Mana #

Different mana costs

Constructors

Const Nat

Mana cost is constant

RemainingNbOfTurns

Mana cost equals the number of remaining turns

Instances
Show Mana #  
Instance details

Defined in Mana

Methods

showsPrec :: Int -> Mana -> ShowS #

show :: Mana -> String #

showList :: [Mana] -> ShowS #

Generic Mana #  
Instance details

Defined in Mana

Associated Types

type Rep Mana :: Type -> Type #

Methods

from :: Mana -> Rep Mana x #

to :: Rep Mana x -> Mana #

FromJSON Mana #  
Instance details

Defined in Json

Read Mana #  
Instance details

Defined in Mana

Methods

read :: String -> Maybe Mana #

type Rep Mana #  
Instance details

Defined in Mana

type Rep Mana = D1 (MetaData "Mana" "Mana" "main" False) (C1 (MetaCons "Const" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Nat)) :+: C1 (MetaCons "RemainingNbOfTurns" PrefixI False) (U1 :: Type -> Type))

class Read a where #

A safe alternative to prelude's Read

Methods

read :: String -> Maybe a #

Instances
Read Mana #  
Instance details

Defined in Mana

Methods

read :: String -> Maybe Mana #

Read Command #  
Instance details

Defined in Command

Methods

read :: String -> Maybe Command #

(>=) :: T -> Mana -> Nat -> Bool #

>= t m n returns whether m >= n when it's turn t

(<=) :: T -> Mana -> Nat -> Bool #

<= t m n returns whether m <= n when it's turn t

(>) :: T -> Mana -> Nat -> Bool #

> t m n returns whether m > n when it's turn t

(<) :: T -> Mana -> Nat -> Bool #

< t m n returns whether m < n when it's turn t

show :: Maybe T -> Mana -> String #

The text to show for mana, depending on whether the turn is provided or not