Praglude

The Original Prelude

Monoids

class Monoid a

(<>)

data Dual a

data Endo a

data All

data Any

data Sum a

data Product a

data First a

data Alt k f a

concat

append

empty

Maybe

data Maybe a

maybe

isJust

isNothing

fromJust

fromMaybe

listToMaybe

maybeToList

catMaybes

mapMaybe

Applicative

(<|>)

Monads

class Monad m

class MonadPlus m

mapM

mapM_

forM

forM_

sequence

sequence_

(=<<)

(>=>)

(<=<)

forever

void

join

msum

mfilter

filterM

mapAndUnzipM

zipWithM

zipWithM_

foldM

foldM_

replicateM

replicateM_

guard

when

unless

liftM

liftM2

liftM3

liftM4

liftM5

ap

(<$!>)

Arrows

class Arrow a

data Kleisli m a b

returnA

(^>>)

(>>^)

(>>>)

(<<<)

(<<^)

(^<<)

class ArrowZero a

class ArrowPlus a

class ArrowChoice a

class ArrowApply a

data ArrowMonad a b

leftApp

class ArrowLoop a

left

right

(+++)

(|||)

Mutable Variables In IO

IORef

data IORef a

newIORef

readIORef

writeIORef

modifyIORef

modifyIORef'

atomicModifyIORef

atomicModifyIORef'

atomicWriteIORef

mkWeakIORef

MVar

data MVar a

newEmptyMVar

newMVar

takeMVar

putMVar

readMVar

swapMVar

tryTakeMVar

tryPutMVar

isEmptyMVar

withMVar

withMVarMasked

modifyMVar_

modifyMVar

modifyMVarMasked_

modifyMVarMasked

tryReadMVar

mkWeakMVar

addMVarFinalizer

Chan

data Chan a

newChan

writeChan

readChan

dupChan

getChanContents

writeList2Chan

Default

class Default a

Lens

(#)

(#%%=)

(#%%~)

(#%=)

(#%~)

(#=)

(#~)

(%%=)

(%%@=)

(%%@~)

(%%~)

(%=)

(%@=)

(%@~)

(%~)

(&)

(&&=)

(&&~)

(&~)

(**=)

(**~)

(*=)

(*~)

(+=)

(+~)

(-=)

(-~)

(...)

(.=)

(.>)

(.@=)

(.@~)

(.~)

(//=)

(//~)

(<#%=)

(<#%~)

(<#=)

(<#~)

(<%=)

(<%@=)

(<%@~)

(<%~)

(<&&=)

(<&&~)

(<&>)

(<**=)

(<**~)

(<*=)

(<*~)

(<+=)

(<+~)

(<-=)

(<-~)

(<.)

(<.=)

(<.>)

(<.~)

(<//=)

(<//~)

(<<%=)

(<<%@=)

(<<%@~)

(<<%~)

(<<&&=)

(<<&&~)

(<<**=)

(<<**~)

(<<*=)

(<<*~)

(<<+=)

(<<+~)

(<<-=)

(<<-~)

(<<.=)

(<<.~)

(<<//=)

(<<//~)

(<<<>=)

(<<<>~)

(<<>=)

(<<>~)

(<<^=)

(<<^^=)

(<<^^~)

(<<^~)

(<<||=)

(<<||~)

(<<~)

(<>=)

(<>~)

(<?=)

(<?~)

(<^=)

(<^^=)

(<^^~)

(<^~)

(<|)

(<||=)

(<||~)

(<~)

(?=)

(??)

(?~)

type ALens s t a b

type ALens' s a

type APrism s t a b

type APrism' s a

type AReview t b

type ASetter s t a b

type ASetter' s a

type ATraversal s t a b

type ATraversal' s a

type ATraversal1 s t a b

type ATraversal1' s a

type Accessing p m s a

type AnEquality k2 k1 s t a b

type AnEquality' k2 s a

type AnIndexedLens i s t a b

type AnIndexedLens' i s a

type AnIndexedSetter i s t a b

type AnIndexedSetter' i s a

type AnIndexedTraversal i s t a b

type AnIndexedTraversal' i s a

type AnIndexedTraversal1 i s t a b

type AnIndexedTraversal1' i s a

type AnIso s t a b

type AnIso' s a

type As k2 a

class AsEmpty a

class Ixed m

data Bazaar p a b t

type Bazaar' p a

data Bazaar1 p a b t

data Bazaar1 p a b t

type Bazaar1' p a

class Bifunctor p

class Profunctor p

type ClassyNamer

class Cons s t a b

data Const k a b

data Const k a b

class Contains m

data Context a b t

type Context' a

class Contravariant f

data DefName

class Each s t a b

type Equality k2 k1 s t a b

type Equality' k2 s a

class Field1 s t a b

class Field2 s t a b

class Field3 s t a b

class Field4 s t a b

class Field5 s t a b

class Field6 s t a b

class Field7 s t a b

class Field8 s t a b

class Field9 s t a b

type FieldNamer

type Fold s a

type Fold1 s a

class Foldable t

class Functor f

class GPlated a g

type Getter s a

type Getting r s a

data Identical k k1 a b s t

data Identical k k1 a b s t

data Identity a

type family Index s :: *

type IndexPreservingFold s a

type IndexPreservingFold1 s a

type IndexPreservingGetter s a

type IndexPreservingLens s t a b

type IndexPreservingLens' s a

type IndexPreservingSetter s t a b

type IndexPreservingSetter' s a

type IndexPreservingTraversal s t a b

type IndexPreservingTraversal' s a

type IndexPreservingTraversal1 s t a b

type IndexPreservingTraversal1' s a

class Conjoined p

data Indexed i a b

type IndexedFold i s a

type IndexedFold1 i s a

type IndexedGetter i s a

type IndexedGetting i m s a

type IndexedLens i s t a b

type IndexedLens' i s a

type IndexedLensLike k i f s t a b

type IndexedLensLike' i f s a

type IndexedSetter i s t a b

type IndexedSetter' i s a

type IndexedTraversal i s t a b

type IndexedTraversal' i s a

type IndexedTraversal1 i s t a b

type IndexedTraversal1' i s a

type Iso s t a b

type Iso' s a

type family IxValue m :: *

class Ixed m

data Leftmost a

type Lens s t a b

type Lens' s a

type LensLike k f s t a b

type LensLike' f s a

data LensRules

data Level i a

data Magma i t b a

type family Magnified (m :: * -> *) :: * -> * -> *

type Optic k k1 k2 p f s t a b

type Optic' k k1 p f s a

type Optical k k1 k2 k3 p q f s t a b

type Optical' k k1 p q f s a

type Over k k1 p f s t a b

type Over' p f s a

class Plated a

type Prism s t a b

type Prism' s a

class Profunctor p

data ReifiedFold s a

data ReifiedFold s a

data ReifiedGetter s a

data ReifiedGetter s a

data ReifiedIndexedFold i s a

data ReifiedIndexedFold i s a

data ReifiedIndexedGetter i s a

data ReifiedIndexedGetter i s a

data ReifiedIndexedLens i s t a b

data ReifiedIndexedLens i s t a b

type ReifiedIndexedLens' i s a

data ReifiedIndexedSetter i s t a b

data ReifiedIndexedSetter i s t a b

type ReifiedIndexedSetter' i s a

data ReifiedIndexedTraversal i s t a b

data ReifiedIndexedTraversal i s t a b

type ReifiedIndexedTraversal' i s a

data ReifiedIso s t a b

data ReifiedIso s t a b

type ReifiedIso' s a

data ReifiedLens s t a b

data ReifiedLens s t a b

type ReifiedLens' s a

data ReifiedPrism s t a b

data ReifiedPrism s t a b

type ReifiedPrism' s a

data ReifiedSetter s t a b

data ReifiedSetter s t a b

type ReifiedSetter' s a

data ReifiedTraversal s t a b

data ReifiedTraversal s t a b

type ReifiedTraversal' s a

class Reversing t

type Review t b

class Wrapped s

data Rightmost a

data Sequenced a m

data Sequenced a m

type Setter s t a b

type Setter' s a

type Setting p s t a b

type Setting' p s a

type Simple k k1 k2 f s a

class Snoc s t a b

class Strict lazy strict

class Strict lazy strict

class Swapped p

class Bifunctor p

type Traversal s t a b

type Traversal' s a

type Traversal1 s t a b

type Traversal1' s a

class Ord a

class Ord a

data Traversed a f

data Traversed a f

type Traversing p f s t a b

type Traversing' p f s a

type Traversing1 p f s t a b

type Traversing1' p f s a

type family Unwrapped s :: *

class Wrapped s

class Wrapped s

type family Zoomed (m :: * -> *) :: * -> * -> *

(^#)

(^.)

(^..)

(^=)

(^?)

(^?!)

(^@.)

(^@..)

(^@?)

(^@?!)

(^^=)

(^^~)

(^~)

_1'

_2'

_3'

_4'

_5'

_6'

_7'

_8'

_9'

_Just

_Left

_Nothing

_Right

_Show

_Unwrapped

_Unwrapped'

_Unwrapping

_Unwrapping'

_Void

_Wrapped

_Wrapping

_Wrapping'

_head

_init

_last

_tail

abbreviatedFields

abbreviatedNamer

ala

alaf

allOf

alongside

andOf

anon

anyOf

argument

asIndex

aside

assign

assignA

asumOf

au

auf

backwards

below

beside

bimapping

both

camelCaseFields

camelCaseNamer

censoring

children

choosing

chosen

classyRules

classyRules_

cloneIndexPreservingLens

cloneIndexPreservingSetter

cloneIndexPreservingTraversal

cloneIndexPreservingTraversal1

cloneIndexedLens

cloneIndexedSetter

cloneIndexedTraversal

cloneIndexedTraversal1

cloneIso

cloneLens

clonePrism

cloneSetter

cloneTraversal

cloneTraversal1

coerced

composOpFold

concatMapOf

concatOf

confusing

cons

contexts

contextsOf

contextsOn

contextsOnOf

contramapped

contramapping

cosmos

cosmosOf

cosmosOn

cosmosOnOf

createClass

curried

cycled

declareClassy

declareClassyFor

declareFields

declareLenses

declareLensesFor

declareLensesWith

declarePrisms

declareWrapped

deep

deepOf

defaultFieldRules

devoid

dimapping

dropping

droppingWhile

elemIndexOf

elemIndicesOf

elemOf

element

elementOf

elements

elementsOf

enum

failing

failover

filtered

findIndexOf

findIndicesOf

findMOf

findOf

firstOf

firsting

flipped

foldBy

foldByOf

foldMapBy

foldMapByOf

foldMapOf

foldOf

folded

folded64

folding

foldl1Of

foldl1Of'

foldlMOf

foldlOf

foldlOf'

foldr1Of

foldr1Of'

foldrMOf

foldrOf

foldrOf'

foldring

forMOf

forMOf_

forOf

forOf_

from

fromEq

fusing

generateLazyPatterns

generateSignatures

generateUpdateableOptics

getting

gplate

has

hasn't

holes

holesOf

holesOn

holesOnOf

iall

iallOf

iany

ianyOf

iat

icensoring

icompose

iconcatMap

iconcatMapOf

icontains

idroppingWhile

ifailover

ifiltered

ifind

ifindMOf

ifindOf

ifoldMapBy

ifoldMapByOf

ifoldMapOf

ifolding

ifoldlM

ifoldlMOf

ifoldlOf

ifoldlOf'

ifoldrM

ifoldrMOf

ifoldrOf

ifoldrOf'

ifoldring

ifor

iforM

iforMOf

iforMOf_

iforM_

iforOf

iforOf_

ifor_

ignored

iix

ilens

ilevels

ilike

ilistening

ilistenings

iloci

imagma

imapAccumL

imapAccumLOf

imapAccumR

imapAccumROf

imapM

imapMOf

imapMOf_

imapM_

imapOf

imodifying

index

indexing

indexing64

indices

inone

inoneOf

inside

involuted

iover

ipartsOf

ipartsOf'

ipassing

iplens

ipre

ipreuse

ipreuses

ipreview

ipreviews

iset

isets

isn't

iso

itakingWhile

iterated

ito

itoList

itoListOf

itraverseBy

itraverseByOf

itraverseOf

itraverseOf_

itraverse_

iunsafePartsOf

iunsafePartsOf'

iuse

iuses

iview

iviews

ixAt

lastOf

lazy

lengthOf

lens

lensClass

lensField

lensRules

lensRulesFor

levels

lifted

like

lined

listening

listenings

lmapping

loci

locus

lookingupNamer

lookupOf

magma

makeClassy

makeClassyFor

makeClassyPrisms

makeClassy_

makeFields

makeLenses

makeLensesFor

makeLensesWith

makePrisms

makeWrapped

mapAccumLOf

mapAccumROf

mapEq

mapMOf

mapMOf_

mapOf

mapped

mapping

mappingNamer

matching

maximumByOf

maximumOf

minimumByOf

minimumOf

modifying

msumOf

nearly

non

non'

none

noneOf

notElemOf

notNullOf

nullOf

only

op

orOf

outside

over

overA

para

paraOf

parts

partsOf

partsOf'

passing

pre

preuse

preuses

preview

previews

prism

prism'

productOf

re

reindexed

repeated

replicated

retagged

reuse

reuses

reversed

review

reviews

rewrite

rewriteM

rewriteMOf

rewriteMOn

rewriteMOnOf

rewriteOf

rewriteOn

rewriteOnOf

rmapping

runEq

sans

scanl1Of

scanr1Of

scribe

seconding

selfIndex

sequenceAOf

sequenceAOf_

sequenceBy

sequenceByOf

sequenceOf

sequenceOf_

set

set'

sets

setting

simple

simpleLenses

simply

singular

snoc

storing

substEq

sumOf

taking

takingWhile

to

toListOf

transform

transformM

transformMOf

transformMOn

transformMOnOf

transformOf

transformOn

transformOnOf

transposeOf

traverseBy

traverseByOf

traverseOf

traverseOf_

traversed

traversed1

traversed64

un

uncons

uncurried

under

underscoreFields

underscoreNamer

underscoreNoPrefixNamer

unfolded

united

universe

universeOf

universeOn

universeOnOf

unsafePartsOf

unsafePartsOf'

unsafeSingular

unsnoc

unto

use

uses

view

views

withIndex

withIso

withPrism

without

worded

(|>)

(||=)

(||~)

State monads

Class

class MonadTrans t

Class

class MonadIO m

State

class MonadState s m

modify

modify'

gets

type State s

runState

evalState

execState

mapState

withState

data StateT s m a

runStateT

evalStateT

execStateT

mapStateT

withStateT

Painless String Types

s

class ToString a

class IsString a

type Text

type LText

type ByteString

type LByteString

Generalized String Operations

trim

ltrim

rtrim

words

lines

data Char

isControl

isSpace

isLower

isUpper

isAlpha

isAlphaNum

isPrint

isDigit

isOctDigit

isHexDigit

isLetter

isMark

isNumber

isPunctuation

isSymbol

isSeparator

isAscii

isLatin1

isAsciiUpper

isAsciiLower

data GeneralCategory

generalCategory

toUpper

toLower

toTitle

digitToInt

intToDigit

ord

chr

showLitChar

lexLitChar

readLitChar

String Case Conversions

kebab

snake

pascal

quietSnake

screamingSnake

I/O

stderr

stdout

stdin

data Handle

Environment

getArgs

getProgName

getExecutablePath

getEnv

lookupEnv

setEnv

unsetEnv

withArgs

withProgName

getEnvironment

Generalized I/O

class StringIO a

Printf

Printf

printf

hPrintf

class PrintfArg a

type FieldFormatter

data FieldFormat

data FormatAdjustment

data FormatSign

vFmt

type ModifierParser

data FormatParse

formatString

formatChar

formatInt

formatInteger

formatRealFloat

errorBadFormat

errorShortFormat

errorMissingArgument

errorBadArgument

perror

class PrintfType t

class HPrintfType t

class IsChar c

Filename And File System Manipulation

FilePath

(</>)

type FilePath

addExtension

addTrailingPathSeparator

combine

dropDrive

dropExtension

dropExtensions

dropFileName

dropTrailingPathSeparator

equalFilePath

extSeparator

getSearchPath

hasDrive

hasExtension

hasTrailingPathSeparator

isAbsolute

isDrive

isExtSeparator

isPathSeparator

isRelative

isSearchPathSeparator

joinDrive

joinPath

makeRelative

makeValid

normalise

pathSeparator

pathSeparators

replaceBaseName

replaceDirectory

replaceExtension

replaceFileName

searchPathSeparator

splitDirectories

splitDrive

splitExtension

splitExtensions

splitFileName

splitPath

splitSearchPath

takeBaseName

takeDirectory

takeDrive

takeExtension

takeExtensions

takeFileName

module System.Directory

data Permissions

data XdgDirectory

canonicalizePath

copyFile

copyFileWithMetadata

copyPermissions

createDirectory

createDirectoryIfMissing

doesDirectoryExist

doesFileExist

emptyPermissions

findExecutable

findExecutables

findExecutablesInDirectories

findFile

findFileWith

findFiles

findFilesWith

getAccessTime

getAppUserDataDirectory

getCurrentDirectory

getDirectoryContents

getHomeDirectory

getModificationTime

getPermissions

getTemporaryDirectory

getUserDocumentsDirectory

getXdgDirectory

isSymbolicLink

listDirectory

makeAbsolute

makeRelativeToCurrentDirectory

removeDirectory

removeDirectoryRecursive

removeFile

renameDirectory

renameFile

setAccessTime

setCurrentDirectory

setModificationTime

setOwnerExecutable

setOwnerReadable

setOwnerSearchable

setOwnerWritable

setPermissions

withCurrentDirectory

exeExtension

Type Forcers

asString

asText

asLText

asByteString

asLByteString

asHashMap

Container Types With Unified Interfaces

class Foldable t

Special biased folds

foldrM

foldlM

Folding actions

Applicative actions

traverse_

for_

sequenceA_

asum

Monadic actions

mapM_

forM_

sequence_

msum

Specialized folds

concat

concatMap

and

or

any

all

maximumBy

minimumBy

Searches

notElem

find

data AList k v

type HashMap

data LHashMap k v

type HashSet

data Map k a

data Set a

data Vector a

class Hashable a

class Lookup m k

class ListLike m a

class DictLike m k

class SetLike m v

class Filterable m

cull

startsWith

endsWith

intercalate

JSON

class ToJSON a

class FromJSON a

data Value

object

prettyJsonOptions

derivePrettyJSON

deriveJSON

encodeJSON

decodeJSON

encodeJSONStrict

decodeJSONStrict

(~>)

Base-64

encodeBase64

decodeBase64

Concurrency And Exception Handling

class Exception e

threadDelay

forkIO

bracket

bracket_

throw

catch

catches

Generics

class Generic a

Functions

chain

id

const

(.)

flip

($)

(&)

fix

on

Date and Time

data Day

data TimeOfDay

data UTCTime

data LocalTime

data TimeZone

data ZonedTime

data TimeLocale

data DiffTime

data NominalDiffTime

secondsToDiffTime

picosecondsToDiffTime

addUTCTime

diffUTCTime

getCurrentTime

defaultTimeLocale

toGregorian

fromGregorian

formatTime