LambdaHack-0.7.0.0: A game engine library for roguelike dungeon crawlers

Safe Haskell None Haskell2010

Game.LambdaHack.Common.Prelude

Description

Custom Prelude, compatible across many GHC versions.

Synopsis

# Documentation

module Data.Maybe

data Text :: * #

A space efficient, packed, unboxed Unicode text type.

Instances

 MethodshashWithSalt :: Int -> Text -> Int #hash :: Text -> Int # type Item Text type Item Text = Char

(<+>) :: Text -> Text -> Text infixr 6 #

Separated by space unless one of them is empty (in which case just the non-empty one).

tshow :: Show a => a -> Text Source #

Show and pack the result.

divUp :: Integral a => a -> a -> a infixl 7 Source #

Integer division, rounding up.

(<>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) infixl 4 Source #

partitionM :: Applicative m => (a -> m Bool) -> [a] -> m ([a], [a]) Source #

(***) :: Arrow a => forall b c b' c'. a b c -> a b' c' -> a (b, b') (c, c') infixr 3 #

Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.

The default definition may be overridden with a more efficient version if desired.

(&&&) :: Arrow a => forall b c c'. a b c -> a b c' -> a b (c, c') infixr 3 #

Fanout: send the input to both argument arrows and combine their output.

The default definition may be overridden with a more efficient version if desired.

first :: Arrow a => forall b c d. a b c -> a (b, d) (c, d) #

Send the first component of the input through the argument arrow, and copy the rest unchanged to the output.

second :: Arrow a => forall b c d. a b c -> a (d, b) (d, c) #

A mirror image of first.

The default definition may be overridden with a more efficient version if desired.