classy-prelude-0.2.0.1: A typeclass-based Prelude.

Safe HaskellSafe-Infered

ClassyPrelude

Contents

Synopsis

CorePrelude

Non-standard

List-like classes

map :: CanMap f i o => (i -> o) -> fSource

concatMap :: CanConcatMap f i o => (i -> o) -> fSource

filter :: CanFilter f i => (i -> Bool) -> fSource

length :: CanLength c len => c -> lenSource

singleton :: CanSingleton c i => i -> cSource

null :: CanNull c => c -> BoolSource

pack :: CanPack c i => [i] -> cSource

unpack :: CanPack c i => c -> [i]Source

repack :: (CanPack a i, CanPack b i) => a -> bSource

Repack from one type to another, dropping to a list in the middle.

repack = pack . unpack.

fromList :: CanPack c i => [i] -> cSource

toList :: CanPack c i => c -> [i]Source

mapM :: CanMapM f m i o => (i -> m o) -> fSource

mapM_ :: CanMapM_ f m i => (i -> m o) -> fSource

break :: CanBreak c i => (i -> Bool) -> c -> (c, c)Source

span :: CanBreak c i => (i -> Bool) -> c -> (c, c)Source

dropWhile :: CanBreak c i => (i -> Bool) -> c -> cSource

takeWhile :: CanBreak c i => (i -> Bool) -> c -> cSource

any :: CanAny c i => (i -> Bool) -> c -> BoolSource

all :: CanAny c i => (i -> Bool) -> c -> BoolSource

splitAt :: CanSplitAt c i => i -> c -> (c, c)Source

take :: CanSplitAt c i => i -> c -> cSource

drop :: CanSplitAt c i => i -> c -> cSource

fold :: CanFold f i accum => (accum -> i -> accum) -> accum -> fSource

Strict left fold.

words :: CanWords t => t -> [t]Source

unwords :: CanWords t => [t] -> tSource

lines :: CanWords t => t -> [t]Source

unlines :: CanWords t => [t] -> tSource

split :: CanSplit c i => (i -> Bool) -> c -> [c]Source

reverse :: CanReverse a => a -> aSource

readMay :: (Read b, CanPack a Char) => a -> Maybe bSource

replicate :: CanReplicate a i len => len -> i -> aSource

Map-like

lookup :: CanLookup c k v => k -> c -> Maybe vSource

delete :: CanDelete c k => k -> c -> cSource

Set-like

member :: CanMember c k => k -> c -> BoolSource

Text-like

show :: (Show a, CanPack c Char) => a -> cSource

Files