gore-and-ash-1.2.2.0: Core of FRP game engine called Gore&Ash

Copyright(c) Anton Gushcha, 2015-2016 Oganyan Levon, 2016
LicenseBSD3
Maintainerncrashed@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Data.Filterable

Description

Defines generic filter utilities for collections.

Synopsis

Documentation

class Filterable f where Source

Generic filter for collections

Associated Types

type FilterConstraint f o :: Constraint Source

Specific constraint for instance

Methods

fNull :: FilterConstraint f a => f a -> Bool Source

Test collection for emptiness

fFilter :: FilterConstraint f a => (a -> Bool) -> f a -> f a Source

Filter function for collection

fFilterM :: (FilterConstraint f a, Monad m) => (a -> m Bool) -> f a -> m (f a) Source

Monad version of filter

Instances

Filterable [] Source 
Filterable Seq Source 
(Eq k, Hashable k) => Filterable (HashMap k) Source 
Filterable (KeyHashMap v) Source 

newtype KeyHashMap v k Source

Wrapper around HashMap to Filterable instance over keys

Constructors

KeyHashMap 

Fields

unKeyHashMap :: HashMap k v
 

Instances

Filterable (KeyHashMap v) Source 
type FilterConstraint (KeyHashMap v) o = (Eq o, Hashable o) Source