h"  >6       !"# $%& '()*+, -./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ ` a b c d e f g!h!i!jk"l"m"nopq#rstu$vwxy%z{|}&~'(")*+++++,-./ 011111 23456666677899++++++++++++++++++++++++++,-,,,,,-,,,,-(((-! 22:; <88=((----+++++++++++++++++!                                                                                                                                                                                                                                                                                                                                                                                                                                                     ; ; ; ; > > > > > >   ? ? ; ;            @ @ @ @ < < A A B         C C C     C D D    E   F F    " " " " " " "  B B " " "             0       <                                                                   G H H   IIIIJKJJJJJJJJJKKLLL<<MMMMMMMMMMMMMMMMMMNNOO    PPPP222222222&&&&QQQ&&&&QQ0QQQQ0QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQRRR4RRSS4RRRRRRRTUTTTU?VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV:::::::::333::::#::::::::::::::::::::::::''W''WXXXXXXXXXXXXWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY0000000000000000000000000000000ZZ00000000000000000000ZZZZZZ[\[[[\;;;;;;;;;;;;;;;6;;;;;;6;;;;;;66666;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#########################]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]^^^^^^^^^^^^^^^^^^^^^^^__________________________%%%%%%%%00#%``%`````````````````````````````````````````################777777777aaaaaabb====cc>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>ddddddee5555555555555555555555555555ffffffffffffffffffggggggggghhhhhhhhhhhhhhhhhhh8888888888888888%%%%00000&!!,,,,,,,,,,,--------------iijjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkkkkkkkkkkkkkkkkkkkkkkk777777777777777777777777777777777lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++BBmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))nnnnnnnnnnnnnnnnnnnnnnnnnnn(((((((((o(((((((((((((ooooooooooooooooooooooo@@@@@@DDDDDDpppppq q<4<SS<<<r<<<<<stsssttttttstuuvvvvvvvvvuvvuuvvvvuuvuuwuxuvvvuuuuuyyyyyyyyyyyyy y y y y y y y y y y y y y y y y y y y y y y y y y y y y z z z z z z z z z z z z z z z z z z z z z z z z s s s s s { { { { { { { { { | | | } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!q! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! ! ! !!! ! ! !! ! ! ! ! ! ! ! ! " " " " " " " " " " " " " " " " " " " " " " " " " " " """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""################################################################################################################################$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( ( (((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))))q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)q)4)r)r)r)r)r)L))))|)|)|)|)|)|)|)|)|)|)|)|)|)|)|)|)|)|)G)G)G)G)G)G)G)G)G)G)G)G)G)))))))))))))))))))))))))))))))))))))))))*****J*J*J*J*J*J*J*J*J**************************************************************************p*p*p***************************************+++++++++++++++++++c+c+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"+"+"+"+"+"+"+"+"+"+",",",",",",",",",",",",",",",",",",",",",*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,, , , , , , , , , , , , ,,,,O,O,O,O,O,O,O,O,O,O,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-------------------------------------------------------[-[-[-------------------------------------------------------------------/-.---.................T.T.3.............................................................................................................////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////0000000000000000000000000000000000000000000F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F00000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222 2 2 2 2 2 222222222222222222222222222222222$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$333B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B44444444444444444444444444444455555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555666666666666666666666666666666ANonexbaseThe 8 type encapsulates an optional value. A value of type  a! either contains a value of type a (represented as  a#), or it is empty (represented as  ). Using  is a good way to deal with errors or exceptional cases without resorting to drastic measures such as .The  type is also a monad. It is a simple kind of error monad, where all errors are represented by 0. A richer error monad can be built using the 8 type. base base (C) 2014 Herbert Valerio Riedel, (C) 2011 Edward Kmettsee libraries/base/LICENSElibraries@haskell.orginternalnon-portable (GHC Extensions)None_ base` baseabase Additionbbase subtraction. May r r.cbase multiplicationdbase Construct  value from list of s..This function is used by GHC for constructing  literals.ebasein [0, maxBound::Word]fbaseConvert a Word# into a NaturalBuilt-in rule ensures that applications of this function to literal Word# are lifted into Natural literals.base String -> IO () as a variant of putStrLn that will get its call-site and print it, along with the string given as argument. We can access the call-stack inside putStrLnWithCallStack with . putStrLnWithCallStack :: HasCallStack => String -> IO () putStrLnWithCallStack msg = do putStrLn msg putStrLn (prettyCallStack callStack) Thus, if we call putStrLnWithCallStack: we will get a formatted call-stack alongside our string.putStrLnWithCallStack "hello"helloCallStack (from HasCallStack): putStrLnWithCallStack, called at :2:1 in interactive:Ghci1 GHC solves   constraints in three steps: If there is a 3 in scope -- i.e. the enclosing function has a   constraint -- GHC will append the new call-site to the existing .If there is no  in scope -- e.g. in the GHCi session above -- and the enclosing definition does not have an explicit type signature, GHC will infer a   constraint for the enclosing definition (subject to the monomorphism restriction).If there is no  in scope and the enclosing definition has an explicit type signature, GHC will solve the  " constraint for the singleton + containing just the current call-site.s do not interact with the RTS and do not require compilation with -prof>. On the other hand, as they are built up explicitly via the   constraints, they will generally not contain as much information as the simulated call-stacks maintained by the RTS.A  is a [(String, SrcLoc)]. The String/ is the name of function that was called, the   is the call-site. The list is ordered with the most recently called function at the head.(NOTE: The intrepid user may notice that  - is just an alias for an implicit parameter ?callStack :: CallStack(. This is an implementation detail and  should not be considered part of the  API, we may decide to change the implementation in the future. base%A single location in the source code. baseFreeze the stack at the given  CallStack?, preventing any further call-sites from being pushed onto it.  baseRequest a CallStack.NOTE: The implicit parameter ?callStack :: CallStack" is an implementation detail and  should not be considered part of the  API, we may decide to change the implementation in the future. base&Extract a list of call-sites from the .(The list is ordered by most recent call.  base"Convert a list of call-sites to a .  baseFreeze a call-stack, preventing any further call-sites from being appended.pushCallStack callSite (freezeCallStack callStack) = freezeCallStack callStack  base\]   \ ]  E((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy./ base / stops execution and displays an error message.  base A variant of  % that does not produce a stack trace. baseA special case of  . It is expected that compilers will recognize this and insert error messages which are more appropriate to the context in which   appears. baseUsed for compiler-generated error message; encoding saves bytes of string junk.  ((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)Unsafe ./base'A list producer that can be fused with . This function is merely  augment g xs = g (:) xs?but GHC's simplifier will transform an expression of the form  k z ( g xs)&, which may arise after inlining, to g k ( k z xs)., which avoids producing an intermediate list.baseAppend two lists, i.e., [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn] [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]>If the first list is not finite, the result is the first list.base'A list producer that can be fused with . This function is merely  build g = g (:) []?but GHC's simplifier will transform an expression of the form  k z ( g)%, which may arise after inlining, to g k z/, which avoids producing an intermediate list.base, applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left: foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)baseThis   equality predicate is used when desugaring pattern-matches against strings.base is defined as the value /. It helps to make guards more readable. eg. - f x | x < 0 = ... | otherwise = ...base#If the first argument evaluates to 9, then the result is the second argument. Otherwise an r$ exception is raised, containing a  6 with the source file and line number of the call to .Assertions can normally be turned on or off with a compiler flag (for GHC, assertions are normally on unless optimisation is turned on with -O or the -fignore-asserts option is given). When assertions are turned off, the first argument to  is ignored, and the second argument is returned as the result.*base\mathcal{O}(n). * f xs" is the list obtained by applying f to each element of xs, i.e., map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...]map (+1) [1, 2, 3][2,3,4],baseApplication operator. This operator is redundant, since ordinary application (f x) means the same as (f , x) . However, , has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example: f $ g $ h x = f (g (h x))6It is also useful in higher-order situations, such as * (, 0) xs, or  (,) fs xs. Note that (,)4 is levity-polymorphic in its result type, so that foo , True where foo :: Bool -> Int# is well-typed.<baseSequentially compose two actions, passing any value produced by the first as an argument to the second.'as < bs' can be understood as the do expression do a <- as bs a =baseSequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.'as = bs' can be understood as the do expression  do as bs >baseUsing  ApplicativeDo: '> f as' can be understood as the do expression do a <- as pure (f a) with an inferred Functor constraint.?base%Inject a value into the monadic type.XbaseAn associative operation.[1,2,3] <> [4,5,6] [1,2,3,4,5,6]Ybase Identity of Z"Hello world" <> mempty "Hello world"ZbaseAn associative operationNOTE?: This method is redundant and has the default implementation Z = (X) since  base-4.11.0.0,. Should it be implemented manually, since Z is a synonym for (X), it is expected that the two functions are defined the same way. In a future GHC release Z will be removed from .[baseFold a list using the monoid.+For most types, the default definition for [ will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.&mconcat ["Hello", " ", "Haskell", "!"]"Hello Haskell!"jbaseThe j function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.'j bss' can be understood as the do expression do bs <- bss bs ExamplesA common use of j is to run an  computation returned from an  transaction, since  transactions can't perform  directly. Recall that  :: STM a -> IO a is used to run < transactions atomically. So, by specializing the types of  and j to  :: STM (IO b) -> IO (IO b) j :: IO (IO b) -> IO b we can compose them as j .  :: STM (IO b) -> IO b  to run an  transaction and the  action it returns.kbaseSequential application.,A few functors support an implementation of k. that is more efficient than the default one.Using  ApplicativeDo: 'fs k as' can be understood as the do expression $do f <- fs a <- as pure (f a) lbase Lift a value.mbase=Sequence actions, discarding the value of the first argument.'as m bs' can be understood as the do expression  do as bs "This is a tad complicated for our  ApplicativeDo! extension which will give it a Monad constraint. For an  Applicative$ constraint we write it of the form  do _ <- as b <- bs pure b tbaseThe t+ class defines the basic operations over a monad2, a concept from a branch of mathematics known as category theory. From the perspective of a Haskell programmer, however, it is best to think of a monad as an abstract datatype of actions. Haskell's do expressions provide a convenient syntax for writing monadic expressions. Instances of t should satisfy the following:  Left identity? a < k = k aRight identitym < ? = m Associativitym < (\x -> k x < h) = (m < k) < hFurthermore, the t and % operations should relate as follows: l = ? m1 k m2 = m1 < (x1 -> m2 < (x2 -> ? (x1 x2)))The above laws imply: > f xs = xs < ? . f (=) = (m) and that l and (k') satisfy the applicative functor laws.The instances of t for lists, 2 and  defined in the Prelude satisfy these laws.vbaseA type f( is a Functor if it provides a function fmap which, given any types a and b" lets you apply any function from (a -> b) to turn an f a into an f b, preserving the structure of f. Furthermore f" needs to adhere to the following: Identity>   ==   Composition> (f . g) == > f . > gNote, that the second law follows from the free theorem of the type > and the first law, so you need only check that the former condition holds.base3A functor with application, providing operations toembed pure expressions (l), and1sequence computations and combine their results (k and  ).>A minimal complete definition must include implementations of l and of either k or  . If it defines both, then they must behave the same as their default definitions: (k) =       f x y = f  x k y3Further, any definition must satisfy the following: Identity l   k v = v Composition l (.) k u k v k w = u k (v k w) Homomorphism l f k l x = l (f x) Interchange u k l y = l (, y) k uThe other methods have the following default definitions, which may be overridden with equivalent specialized implementations: u m v = (    u) k v u   v =     u v$As a consequence of these laws, the v instance for f will satisfy > f x = l f k x'It may be useful to note that supposing !forall x y. p (q x y) = f x . g yit follows from the above that   p (  q u v) =   f u .   g vIf f is also a t, it should satisfy l = ? m1 k m2 = m1 < (x1 -> m2 < (x2 -> ? (x1 x2))) (m) = (=)(which implies that l and k' satisfy the applicative functor laws). baseThe class of semigroups (types with an associative binary operation).'Instances should satisfy the following:  Associativityx X (y X z) = (x X y) X zbaseThe class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following: Right identityx X Y = x Left identityY X x = x Associativityx X (y X z) = (x X y) X z ( law) Concatenation[ =  (X) YThe method names refer to the monoid of lists under concatenation, but there are many other instances.Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtypes and make those instances of , e.g. B and B.NOTE:  is a superclass of  since  base-4.11.0.0. baseA   is a list of characters. String constants in Haskell are values of type  .See  Data.List for operations on lists.  base%Non-empty (and non-strict) list type. base,Monads that also support choice and failure. baseThe identity of  '. It should also satisfy the equations +mzero >>= f = mzero v >> mzero = mzeroThe default definition is mzero =   base3An associative operation. The default definition is  mplus = ( ) base!A monoid on applicative functors. If defined,   and  1 should be the least solutions of the equations:   v = (:)  v k   v   v =   v   l [] baseThe identity of  baseAn associative binary operation base One or more. base Zero or more. base"Lift a binary function to actions.+Some functors support an implementation of   that is more efficient than the default one. In particular, if >8 is an expensive operation, it is likely better to use   than to >! over the structure and then use k.This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of k and >.Using  ApplicativeDo: '  f as bs' can be understood as the do expression &do a <- as b <- bs pure (f a b) base>Sequence actions, discarding the value of the second argument.Using  ApplicativeDo: 'as   bs' can be understood as the do expression do a <- as bs pure a baseReplace all locations in the input with the same value. The default definition is > .  <, but this may be overridden with a more efficient version.Using  ApplicativeDo: 'a   bs' can be understood as the do expression do bs pure a with an inferred Functor constraint. baseReduce a non-empty list with XThe default definition should be sufficient, but this can be overridden for efficiency.import Data.List.NonEmpty*sconcat $ "Hello" :| [" ", "Haskell", "!"]"Hello Haskell!" baseRepeat a value n times.Given that this works on a  it is allowed to fail if you request 0 or fewer repetitions, and the default definition will do so.By making this a member of the class, idempotent semigroups and monoids can upgrade this to execute in \mathcal{O}(1) by picking  stimes = B or  stimes =   respectively. stimes 4 [1] [1,1,1,1] base A variant of k with the arguments reversed.Using  ApplicativeDo: 'as   fs' can be understood as the do expression $do a <- as f <- fs pure (f a) baseLift a function to actions. This function may be used as a value for > in a v instance.Using  ApplicativeDo: '  f as' can be understood as the do expression do a <- as pure (f a) with an inferred Functor constraint, weaker than  Applicative. base#Lift a ternary function to actions.Using  ApplicativeDo: '  f as bs cs' can be understood as the do expression 3do a <- as b <- bs c <- cs pure (f a b c) baseSame as <&, but with the arguments interchanged. baseConditional execution of  expressions. For example, !when debug (putStrLn "Debugging")will output the string  Debugging if the Boolean value debug is , and otherwise do nothing. baseEvaluate each action in the sequence from left to right, and collect the results. base  f is equivalent to   . * f. basePromote a function to a monad. basePromote a function to a monad, scanning the monadic arguments from left to right. For example, liftM2 (+) [0,1] [0,2] = [0,2,1,3] liftM2 (+) (Just 1) Nothing = Nothing basePromote a function to a monad, scanning the monadic arguments from left to right (cf.  ). basePromote a function to a monad, scanning the monadic arguments from left to right (cf.  ). basePromote a function to a monad, scanning the monadic arguments from left to right (cf.  ). baseIn many situations, the  ' operations can be replaced by uses of  &, which promotes function application. !return f `ap` x1 `ap` ... `ap` xnis equivalent to liftMn f x1 x2 ... xn baseThe  method restricted to the type 0. baseIdentity function. id x = x baseconst x( is a unary function which evaluates to x for all inputs.const 42 "hello"42map (const 42) [0..3] [42,42,42,42] baseFunction composition. base  f9 takes its (first) two arguments in the reverse order of f.flip (++) "hello" "world" "worldhello" baseStrict (call-by-value) application operator. It takes a function and an argument, evaluates the argument to weak head normal form (WHNF), then calls the function with that value. base  p f yields the result of applying f until p holds. base ! is a type-restricted version of  . It is usually used as an infix operator, and its typing forces its first argument (which is usually overloaded) to have the same type as the second. baseReturns the tag of a constructor application; this function is used by the deriving code for Eq, Ord and Enum. baseShift the argument left by the specified number of bits (which must be non-negative). baseShift the argument right by the specified number of bits (which must be non-negative). The RL means "right, logical" (as opposed to RA for arithmetic) (although an arithmetic right shift wouldn't make sense for Word#) baseShift the argument left by the specified number of bits (which must be non-negative). baseShift the argument right (signed) by the specified number of bits (which must be non-negative). The RA9 means "right, arithmetic" (as opposed to RL for logical) baseShift the argument right (unsigned) by the specified number of bits (which must be non-negative). The RL9 means "right, logical" (as opposed to RA for arithmetic) base base base base base base base base base base base base base base base  base base base  base base base  base  base  base  base  base  base  base  base  base  base  base  base  base  base  base base base base base  base baseFor tuples, the  constraint on a7 determines how the first values merge. For example,  s concatenate: <("hello ", (+15)) <*> ("world!", 2002) ("hello world!",2017) baseLift a semigroup into  forming a  according to  #http://en.wikipedia.org/wiki/Monoid: "Any semigroup S= may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and  e*s = s = s*e for all s D S." Since 4.11.0: constraint on inner a value generalised from  to . base base base base base base base base  base  base  66!"$%'()*,-01Ujp9 t?= x :  mlk X [YZ66 66666666 66 66 666 6 !'(*,jt?=  mlk X [YZ 5,0<1=1X6k4m4 5 3 4 4 4 1 9  0H Trustworthya baseStart attributing ticks to cost centres. This is called by the RTS on startup. baseStop attributing ticks to cost centres. Allocations will still be attributed.  I'(c) The University of Glasgow 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy 2baseConversion from an . An integer literal represents the application of the function 2" to the appropriate value of type , so such literals have type (w a) => a.;baseUnary negation.wbaseBasic numeric class.'The Haskell Report defines no laws for w . However, ( ) and ( ) are customarily expected to define a ring and have the following properties: Associativity of ( ) (x + y) + z =  x + (y + z)Commutativity of ( )x + y = y + x2 0 is the additive identityx + fromInteger 0 = x; gives the additive inverse x + negate x =  fromInteger 0Associativity of ( ) (x * y) * z =  x * (y * z)2 1 is the multiplicative identityx * fromInteger 1 = x and fromInteger 1 * x = xDistributivity of ( ) with respect to ( ) a * (b + c) = (a * b) + (a * c) and  (b + c) * a = (b * a) + (c * a) Note that it isn't3 customarily expected that a type instance of both w and x' implement an ordered ring. Indeed, in base only  and 3 do. baseAbsolute value.base!Sign of a number. The functions   and  should satisfy the law: abs x * signum x == xFor real numbers, the  is either -1 (negative), 0 (zero) or 1 (positive).base the same as   (3).Because -/ is treated specially in the Haskell grammar, (- e) is not a section, but an application of prefix negation. However, ( exp)) is equivalent to the disallowed section.base Note that 's w instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.basebasebase666666666666666666666666666666666666_`abcdfw 2;3 e 666666666  w 2;3 36 6 7K"(c) The University of Glasgow 2008see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafev baseAn  (pronounced "em-var") is a synchronising variable, used for communication between concurrent threads. It can be thought of as a box, which may be empty or full.base Create an  which is initially empty.base Create an # which contains the supplied value.baseReturn the contents of the  . If the  is currently empty, & will wait until it is full. After a , the  is left empty..There are two further important properties of : is single-wakeup. That is, if there are multiple threads blocked in  , and the  becomes full, only one thread will be woken up. The runtime guarantees that the woken thread completes its  operation.(When multiple threads are blocked on an , they are woken up in FIFO order. This is useful for providing fairness properties of abstractions built using s.base#Atomically read the contents of an  . If the  is currently empty,  will wait until it is full. # is guaranteed to receive the next . is multiple-wakeup, so when multiple readers are blocked on an ,, all of them are woken up at the same time.Compatibility note: Prior to base 4.7,  was a combination of  and . This mean that in the presence of other threads attempting to ,  could block. Furthermore,  would not receive the next 3 if there was already a pending thread blocked on . The old behavior can be recovered by implementing 'readMVar as follows:  readMVar :: MVar a -> IO a readMVar m = mask_ $ do a <- takeMVar m putMVar m a return a basePut a value into an  . If the  is currently full, " will wait until it becomes empty..There are two further important properties of : is single-wakeup. That is, if there are multiple threads blocked in  , and the  becomes empty, only one thread will be woken up. The runtime guarantees that the woken thread completes its  operation.(When multiple threads are blocked on an , they are woken up in FIFO order. This is useful for providing fairness properties of abstractions built using s.baseA non-blocking version of . The % function returns immediately, with  if the  was empty, or  a if the  was full with contents a . After , the  is left empty.baseA non-blocking version of . The % function attempts to put the value a into the  , returning  if it was successful, or  otherwise.baseA non-blocking version of . The % function returns immediately, with  if the  was empty, or  a if the  was full with contents a.baseCheck whether a given  is empty.Notice that the boolean value returned is just a snapshot of the state of the MVar. By the time you get to react on its result, the MVar may have been filled (or emptied) - so be extremely careful when using this operation. Use  instead if possible.baseAdd a finalizer to an  (GHC only). See Foreign.ForeignPtr and System.Mem.Weak for more about finalizers.base  '(c) The University of Glasgow 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe"pbase!This is the "back door" into the  monad, allowing  computation to be performed at any time. For this to be safe, the  computation should be free of side effects and independent of its environment."If the I/O computation wrapped in  performs side effects, then the relative order in which those side effects take place (relative to the main I/O trunk, or other calls to -) is indeterminate. Furthermore, when using  to cause side-effects, you should take the following precautions to ensure the side effects are performed as many times as you expect them to be. Note that these precautions are necessary for GHC, but may not be sufficient, and other compilers may require different precautions:Use {-# NOINLINE foo #-} as a pragma on any function foo that calls . If the call is inlined, the I/O may be performed more than once.Use the compiler flag -fno-cse to prevent common sub-expression elimination being performed on the module, which might combine two side effects that were meant to be separate. A good example is using multiple global variables (like test in the example below).7Make sure that the either you switch off let-floating (-fno-full-laziness), or that the call to  cannot float outside a lambda. For example, if you say: 8 f x = unsafePerformIO (newIORef [])  you may get only one reference cell shared between all calls to f". Better would be 9 f x = unsafePerformIO (newIORef [x]) 7 because now it can't float outside the lambda.It is less well known that  is not type safe. For example:  test :: IORef [a] test = unsafePerformIO $ newIORef [] main = do writeIORef test [42] bang <- readIORef test print (bang :: [Char])This program will core dump. This problem with polymorphic references is well known in the ML community, and does not arise with normal monadic use of references. There is no easy way to make it impossible once you use #. Indeed, it is possible to write coerce :: a -> b with the help of . So be careful!baseThis version of  is more efficient because it omits the check that the IO is only being performed by a single thread. Hence, when you use , there is a possibility that the IO action may be performed multiple times (on a multiprocessor), and you should therefore ensure that it gives the same results each time. It may even happen that one of the duplicated IO actions is only run partially, and then interrupted in the middle without an exception being raised. Therefore, functions like r cannot be used safely within .base allows an  computation to be deferred lazily. When passed a value of type IO a, the . will only be performed when the value of the a is demanded. This is used to implement lazy file reading, see .base allows an  computation to be deferred lazily. When passed a value of type IO a, the . will only be performed when the value of the a is demanded.The computation may be performed multiple times by different threads, possibly at the same time. To ensure that the computation is performed only once, use  instead.baseEnsures that the suspensions under evaluation by the current thread are unique; that is, the current thread is not evaluating anything that is also under evaluation by another thread that has also executed .,This operation is used in the definition of  to prevent the IO action from being executed multiple times, which is usually undesirable.None " Trustworthy""(c) The University of Glasgow 2012see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)None$YbaseA monad that can execute GHCi statements by lifting them out of m into the IO monad. (e.g state monads)base"A monad that doesn't allow any IO.basebasebasebasebasePPM(c) Daniel Fischer 2010see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy$N(c) Daniel Fischer 2010see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy%None&666666 Trustworthy&E(c) The University of Glasgowsee libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy&"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy)3base&Extract the first component of a pair.base'Extract the second component of a pair.base6 converts an uncurried function to a curried function.Examples curry fst 1 21base4 converts a curried function to a function on pairs.Examplesuncurry (+) (1,2)3uncurry ($) (show, 1)"1"'map (uncurry max) [(1,2), (3,4), (6,8)][2,4,8]baseSwap the components of a pair."(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy4FbaseAn infix synonym for >.,The name of this operator is an allusion to -. Note the similarities between their types:  ($) :: (a -> b) -> a -> b (<$>) :: Functor f => (a -> b) -> f a -> f bWhereas  is function application, ( is function application lifted over a v.ExamplesConvert from a 2 1 to a 2  using :show <$> NothingNothingshow <$> Just 3Just "3"Convert from an 8 1 1 to an 8 1  using :show <$> Left 17Left 17show <$> Right 17 Right "17"Double each element of a list:(*2) <$> [1,2,3][2,4,6]Apply ! to the second element of a pair:even <$> (2,2)(2,True) baseFlipped version of . () =   > ExamplesApply (+1) to a list, a 2 and a 8:Just 2 <&> (+1)Just 3[1,2,3] <&> (+1)[2,3,4]Right 3 <&> (+1)Right 4baseFlipped version of  .Using  ApplicativeDo: 'as  b' can be understood as the do expression do as pure b with an inferred Functor constraint.ExamplesReplace the contents of a 2 1 with a constant :Nothing $> "foo"NothingJust 90210 $> "foo" Just "foo"Replace the contents of an 8 1 1 with a constant , resulting in an 8 1 :Left 8675309 $> "foo" Left 8675309Right 8675309 $> "foo" Right "foo"/Replace each element of a list with a constant :[1,2,3] $> "foo"["foo","foo","foo"]5Replace the second element of a pair with a constant :(1,2) $> "foo" (1,"foo")base value discards or ignores the result of evaluation, such as the return value of an  action.Using  ApplicativeDo: ' as' can be understood as the do expression do as pure () with an inferred Functor constraint.ExamplesReplace the contents of a 2 1 with unit: void NothingNothing void (Just 3)Just ()Replace the contents of an 8 1 1 with unit, resulting in an 8 1 '()':void (Left 8675309) Left 8675309void (Right 8675309)Right ()*Replace every element of a list with unit: void [1,2,3] [(),(),()]/Replace the second element of a pair with unit: void (1,2)(1,())Discard the result of an  action:mapM print [1,2]12[(),()]void $ mapM print [1,2]12v> v> 414 Nils Anders Danielsson 2006 , Alexander Berntsen 20144BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportable Trustworthy:base f* is the least fixed point of the function f, i.e. the least defined x such that f x = x.For example, we can write the factorial function using direct recursion as8let fac n = if n <= 1 then 1 else n * fac (n-1) in fac 5120"This uses the fact that Haskell@s let introduces recursive bindings. We can rewrite this definition using ,5fix (\rec n -> if n <= 1 then 1 else n * rec (n-1)) 5120Instead of making a recursive call, we introduce a dummy parameter rec; when used within  , this parameter then refers to 2@s argument, hence the recursion is reintroduced.base b u x y runs the binary function b on) the results of applying unary function u to two arguments x and y. From the opposite perspective, it transforms two inputs and combines the outputs. ((+) `` f) x y = f x + f yTypical usage:  ( `on` ).Algebraic properties:  (*) `on`   = (*) -- (if (*) D {E,   E}) &((*) `on` f) `on` g = (*) `on` (f . g)   on f .   on g =   on (g . f)base is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator ,, which allows  to be nested in ,.5 & (+1) & show"6",  ,01"(c) The University of Glasgow 2005/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy;p9 p9 "(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableUnsafe a;  If False a b ==> b23(C) 2015 David Luposchainsky, (C) 2015 Herbert Valerio Riedel BSD-style (see the file LICENSE)libraries@haskell.org provisionalportable TrustworthyE baseWhen a value is bound in do1-notation, the pattern on the left hand side of <- might not match. In this case, this class provides a function to recover.A t without a  instance may only be used in conjunction with pattern that always match, such as newtypes, tuples, data types with only a single data constructor, and irrefutable patterns (~pat). Instances of # should satisfy the following law: fail s should be a left zero for , fail s >>= f = fail s If your t is also , a popular definition is fail _ = mzero  base base baseAA2"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable TrustworthyW( baseThe 3 function takes a default value, a function, and a  value. If the  value is , the function returns the default value. Otherwise, it applies the function to the value inside the  and returns the result.Examples Basic usage:maybe False odd (Just 3)Truemaybe False odd NothingFalse$Read an integer from a string using %;. If we succeed, return twice the integer; that is, apply (*2)8 to it. If instead we fail to parse an integer, return 0 by default:import Text.Read ( readMaybe )maybe 0 (*2) (readMaybe "5")10maybe 0 (*2) (readMaybe "")0Apply  to a  Maybe Int . If we have Just n", we want to show the underlying  n. But if we have , we return the empty string instead of (for example) "Nothing":maybe "" show (Just 5)"5"maybe "" show Nothing""baseThe  function returns " iff its argument is of the form Just _.Examples Basic usage:isJust (Just 3)TrueisJust (Just ())TrueisJust NothingFalse7Only the outer constructor is taken into consideration:isJust (Just Nothing)TruebaseThe  function returns  iff its argument is .Examples Basic usage:isNothing (Just 3)FalseisNothing (Just ())FalseisNothing NothingTrue7Only the outer constructor is taken into consideration:isNothing (Just Nothing)FalsebaseThe ( function extracts the element out of a ) and throws an error if its argument is .Examples Basic usage:fromJust (Just 1)12 * (fromJust (Just 10))202 * (fromJust Nothing)&*** Exception: Maybe.fromJust: NothingbaseThe & function takes a default value and a  value. If the  is , it returns the default values; otherwise, it returns the value contained in the .Examples Basic usage:#fromMaybe "" (Just "Hello, World!")"Hello, World!"fromMaybe "" Nothing""$Read an integer from a string using %5. If we fail to parse an integer, we want to return 0 by default:import Text.Read ( readMaybe )fromMaybe 0 (readMaybe "5")5fromMaybe 0 (readMaybe "")0baseThe , function returns an empty list when given  or a singleton list when given .Examples Basic usage:maybeToList (Just 7)[7]maybeToList Nothing[] One can use  to avoid pattern matching when combined with a function that (safely) works on lists:import Text.Read ( readMaybe )!sum $ maybeToList (readMaybe "3")3 sum $ maybeToList (readMaybe "")0baseThe  function returns  on an empty list or  a where a" is the first element of the list.Examples Basic usage:listToMaybe []NothinglistToMaybe [9]Just 9listToMaybe [1,2,3]Just 1 Composing  with 2 should be the identity on singleton/empty lists:maybeToList $ listToMaybe [5][5]maybeToList $ listToMaybe [][],But not on lists with more than one element:!maybeToList $ listToMaybe [1,2,3][1]baseThe  function takes a list of !s and returns a list of all the  values.Examples Basic usage:#catMaybes [Just 1, Nothing, Just 3][1,3]When constructing a list of  values,  can be used to return all of the "success" results (if the list is the result of a *, then  would be more appropriate):import Text.Read ( readMaybe )4[readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ][Just 1,Nothing,Just 3]catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ][1,3]baseThe  function is a version of * which can throw out elements. In particular, the functional argument returns something of type  b. If this is 8, no element is added on to the result list. If it is  b, then b! is included in the result list.ExamplesUsing  f x is a shortcut for  $ * f x in most cases:import Text.Read ( readMaybe )3let readMaybeInt = readMaybe :: String -> Maybe Int'mapMaybe readMaybeInt ["1", "Foo", "3"][1,3].catMaybes $ map readMaybeInt ["1", "Foo", "3"][1,3]If we map the 1 constructor, the entire list should be returned:mapMaybe Just [1,2,3][1,2,3]  '(c) The University of Glasgow 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy=3baseConcatenate a list of lists. concat [][] concat [[42]][42] concat [[1,2,3], [4,5], [6], []] [1,2,3,4,5,6]base\mathcal{O}(n). , applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e., !filter p xs = [ x | x <- xs, p x]filter odd [1, 2, 3][1,3]base\mathcal{O}(\min(m,n)). < takes two lists and returns a list of corresponding pairs.zip [1, 2] ['a', 'b'][(1, 'a'), (2, 'b')]If one input list is shorter than the other, excess elements of the longer list are discarded, even if one of the lists is infinite:zip [1] ['a', 'b'] [(1, 'a')]zip [1, 2] ['a'] [(1, 'a')] zip [] [1..][] zip [1..] [][] is right-lazy: zip [] _|_[] zip _|_ []_|_ is capable of list fusion, but it is restricted to its first list argument and its resulting list.base\mathcal{O}(1)?. Extract the first element of a list, which must be non-empty.head [1, 2, 3]1 head [1..]1head []#Exception: Prelude.head: empty listbase\mathcal{O}(1)*. Decompose a list into its head and tail.If the list is empty, returns ."If the list is non-empty, returns  (x, xs) , where x is the head of the list and xs its tail. uncons []Nothing uncons [1] Just (1,[])uncons [1, 2, 3]Just (1,[2,3])base\mathcal{O}(1). Extract the elements after the head of a list, which must be non-empty.tail [1, 2, 3][2,3]tail [1][]tail []#Exception: Prelude.tail: empty listbase\mathcal{O}(n). Extract the last element of a list, which must be finite and non-empty.last [1, 2, 3]3 last [1..]* Hangs forever *last []#Exception: Prelude.last: empty listbase\mathcal{O}(n). Return all the elements of a list except the last one. The list must be non-empty.init [1, 2, 3][1,2]init [1][]init []#Exception: Prelude.init: empty listbase\mathcal{O}(1). Test whether a list is empty.null []Truenull [1]False null [1..]Falsebase\mathcal{O}(n). , returns the length of a finite list as an (. It is an instance of the more general 6, the result type of which may be any kind of number. length []0length ['a', 'b', 'c']3 length [1..]* Hangs forever *base, applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right: foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xnThe list must be finite.foldl (+) 0 [1..4]10foldl (+) 42 []42foldl (-) 100 [1..4]90foldl (\reversedString nextChar -> nextChar : reversedString) "foo" ['a', 'b', 'c', 'd'] "dcbafoo"foldl (+) 0 [1..]* Hangs forever *baseA strict version of .base is a variant of  that has no starting value argument, and thus must be applied to non-empty lists. Note that unlike , the accumulated value must be of the same type as the list elements.foldl1 (+) [1..4]10 foldl1 (+) []%Exception: Prelude.foldl1: empty listfoldl1 (-) [1..4]-8%foldl1 (&&) [True, False, True, True]False&foldl1 (||) [False, False, True, True]Truefoldl1 (+) [1..]* Hangs forever *baseA strict version of .baseThe 7 function computes the sum of a finite list of numbers.sum []0sum [42]42 sum [1..10]55sum [4.1, 2.0, 1.7]7.8 sum [1..]* Hangs forever *baseThe ; function computes the product of a finite list of numbers. product []1 product [42]42product [1..10]3628800product [4.1, 2.0, 1.7]13.939999999999998 product [1..]* Hangs forever *base\mathcal{O}(n).  is similar to , but returns a list of successive reduced values from the left: scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...] Note that #last (scanl f z xs) == foldl f z xsscanl (+) 0 [1..4] [0,1,3,6,10]scanl (+) 42 [][42]scanl (-) 100 [1..4][100,99,97,94,90]scanl (\reversedString nextChar -> nextChar : reversedString) "foo" ['a', 'b', 'c', 'd'])["foo","afoo","bafoo","cbafoo","dcbafoo"]scanl (+) 0 [1..]* Hangs forever *base\mathcal{O}(n).  is a variant of & that has no starting value argument: .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]scanl1 (+) [1..4] [1,3,6,10] scanl1 (+) [][]scanl1 (-) [1..4] [1,-1,-4,-8]%scanl1 (&&) [True, False, True, True][True,False,False,False]&scanl1 (||) [False, False, True, True][False,False,True,True]scanl1 (+) [1..]* Hangs forever *base\mathcal{O}(n). A strict version of .base is a variant of  that has no starting value argument, and thus must be applied to non-empty lists. Note that unlike , the accumulated value must be of the same type as the list elements.foldr1 (+) [1..4]10 foldr1 (+) []%Exception: Prelude.foldr1: empty listfoldr1 (-) [1..4]-2%foldr1 (&&) [True, False, True, True]False&foldr1 (||) [False, False, True, True]Truefoldr1 (+) [1..]* Hangs forever *base\mathcal{O}(n).  is the right-to-left dual of . Note that the order of parameters on the accumulating function are reversed compared to . Also note that $head (scanr f z xs) == foldr f z xs.scanr (+) 0 [1..4] [10,9,7,4,0]scanr (+) 42 [][42]scanr (-) 100 [1..4][98,-97,99,-96,100]scanr (\nextChar reversedString -> nextChar : reversedString) "foo" ['a', 'b', 'c', 'd'])["abcdfoo","bcdfoo","cdfoo","dfoo","foo"]scanr (+) 0 [1..]* Hangs forever *base\mathcal{O}(n).  is a variant of & that has no starting value argument.scanr1 (+) [1..4] [10,9,7,4] scanr1 (+) [][]scanr1 (-) [1..4] [-2,3,-1,4]%scanr1 (&&) [True, False, True, True][False,False,True,True]&scanr1 (||) [True, True, False, False][True,True,False,False]scanr1 (+) [1..]* Hangs forever *base returns the maximum value from a list, which must be non-empty, finite, and of an ordered type. It is a special case of , which allows the programmer to supply their own comparison function. maximum []&Exception: Prelude.maximum: empty list maximum [42]42maximum [55, -12, 7, 0, -89]55 maximum [1..]* Hangs forever *base returns the minimum value from a list, which must be non-empty, finite, and of an ordered type. It is a special case of , which allows the programmer to supply their own comparison function. minimum []&Exception: Prelude.minimum: empty list minimum [42]42minimum [55, -12, 7, 0, -89]-89 minimum [1..]* Hangs forever *base f x7 returns an infinite list of repeated applications of f to x: %iterate f x == [x, f x, f (f x), ...] Note that  is lazy, potentially leading to thunk build-up if the consumer doesn't force each iterate. See ( for a strict variant of this function.iterate not True[True,False,True,False...iterate (+3) 42[42,45,48,51,54,57,60,63...base is the strict version of .It forces the result of each application of the function to weak head normal form (WHNF) before proceeding.base x is an infinite list, with x the value of every element. repeat 17[17,17,17,17,17,17,17,17,17...base n x is a list of length n with x the value of every element. It is an instance of the more general  , in which n may be of any integral type.replicate 0 True[]replicate (-1) True[]replicate 4 True[True,True,True,True]base ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.cycle []$Exception: Prelude.cycle: empty list cycle [42]![42,42,42,42,42,42,42,42,42,42...cycle [2, 5, 7][2,5,7,2,5,7,2,5,7,2,5,7...base, applied to a predicate p and a list xs2, returns the longest prefix (possibly empty) of xs of elements that satisfy p.!takeWhile (< 3) [1,2,3,4,1,2,3,4][1,2]takeWhile (< 9) [1,2,3][1,2,3]takeWhile (< 0) [1,2,3][]base p xs$ returns the suffix remaining after  p xs.!dropWhile (< 3) [1,2,3,4,5,1,2,3] [3,4,5,1,2,3]dropWhile (< 9) [1,2,3][]dropWhile (< 0) [1,2,3][1,2,3]base n, applied to a list xs, returns the prefix of xs of length n, or xs itself if n >  xs.take 5 "Hello World!""Hello"take 3 [1,2,3,4,5][1,2,3] take 3 [1,2][1,2] take 3 [][]take (-1) [1,2][] take 0 [1,2][]&It is an instance of the more general  , in which n may be of any integral type.base n xs returns the suffix of xs after the first n elements, or [] if n >  xs.drop 6 "Hello World!""World!"drop 3 [1,2,3,4,5][4,5] drop 3 [1,2][] drop 3 [][]drop (-1) [1,2][1,2] drop 0 [1,2][1,2]&It is an instance of the more general  , in which n may be of any integral type.base n xs( returns a tuple where first element is xs prefix of length n1 and second element is the remainder of the list:splitAt 6 "Hello World!"("Hello ","World!")splitAt 3 [1,2,3,4,5]([1,2,3],[4,5])splitAt 1 [1,2,3] ([1],[2,3])splitAt 3 [1,2,3] ([1,2,3],[])splitAt 4 [1,2,3] ([1,2,3],[])splitAt 0 [1,2,3] ([],[1,2,3])splitAt (-1) [1,2,3] ([],[1,2,3])It is equivalent to ( n xs,  n xs) when n is not _|_ (splitAt _|_ xs = _|_). $ is an instance of the more general  , in which n may be of any integral type.base, applied to a predicate p and a list xs, returns a tuple where first element is longest prefix (possibly empty) of xs of elements that satisfy p1 and second element is the remainder of the list:span (< 3) [1,2,3,4,1,2,3,4]([1,2],[3,4,1,2,3,4])span (< 9) [1,2,3] ([1,2,3],[])span (< 0) [1,2,3] ([],[1,2,3]) p xs is equivalent to ( p xs,  p xs)base, applied to a predicate p and a list xs, returns a tuple where first element is longest prefix (possibly empty) of xs of elements that do not satisfy p1 and second element is the remainder of the list:break (> 3) [1,2,3,4,1,2,3,4]([1,2,3],[4,1,2,3,4])break (< 9) [1,2,3] ([],[1,2,3])break (> 9) [1,2,3] ([1,2,3],[]) p is equivalent to  (  . p).base xs returns the elements of xs in reverse order. xs must be finite. reverse [][] reverse [42][42]reverse [2,5,7][7,5,2] reverse [1..]* Hangs forever *base returns the conjunction of a Boolean list. For the result to be , the list must be finite; , however, results from a 7 value at a finite index of a finite or infinite list.and []True and [True]True and [False]Falseand [True, True, False]Falseand (False : repeat True) -- Infinite list [False,True,True,True,True,True,True...Falseand (repeat True)* Hangs forever *base returns the disjunction of a Boolean list. For the result to be , the list must be finite; , however, results from a 7 value at a finite index of a finite or infinite list.or []False or [True]True or [False]Falseor [True, True, False]Trueor (True : repeat False) -- Infinite list [True,False,False,False,False,False,False...Trueor (repeat False)* Hangs forever *base#Applied to a predicate and a list,  determines if any element of the list satisfies the predicate. For the result to be , the list must be finite; , however, results from a  value for the predicate applied to an element at a finite index of a finite or infinite list. any (> 3) []Falseany (> 3) [1,2]Falseany (> 3) [1,2,3,4,5]Trueany (> 3) [1..]Trueany (> 3) [0, -1..]* Hangs forever *base#Applied to a predicate and a list,  determines if all elements of the list satisfy the predicate. For the result to be , the list must be finite; , however, results from a  value for the predicate applied to an element at a finite index of a finite or infinite list. all (> 3) []Trueall (> 3) [1,2]Falseall (> 3) [1,2,3,4,5]Falseall (> 3) [1..]Falseall (> 3) [4..]* Hangs forever *base is the list membership predicate, usually written in infix form, e.g.,  x `elem` xs. For the result to be , the list must be finite; -, however, results from an element equal to x6 found at a finite index of a finite or infinite list. 3 `elem` []False3 `elem` [1,2]False3 `elem` [1,2,3,4,5]True3 `elem` [1..]True3 `elem` [4..]* Hangs forever *base is the negation of .3 `notElem` []True3 `notElem` [1,2]True3 `notElem` [1,2,3,4,5]False3 `notElem` [1..]False3 `notElem` [4..]* Hangs forever *base\mathcal{O}(n).   key assocs( looks up a key in an association list. lookup 2 []Nothinglookup 2 [(1, "first")]Nothing4lookup 2 [(1, "first"), (2, "second"), (3, "third")] Just "second"baseMap a function returning a list over a list and concatenate the results. # can be seen as the composition of  and *. %concatMap f xs == (concat . map f) xsconcatMap (\i -> [-i,i]) [][] concatMap (\i -> [-i,i]) [1,2,3][-1,1,-2,2,-3,3]baseList index (subscript) operator, starting from 0. It is an instance of the more general -, which takes an index of any integral type.['a', 'b', 'c'] !! 0'a'['a', 'b', 'c'] !! 2'c'['a', 'b', 'c'] !! 3&Exception: Prelude.!!: index too large['a', 'b', 'c'] !! (-1)%Exception: Prelude.!!: negative indexbase takes three lists and returns a list of triples, analogous to . It is capable of list fusion, but it is restricted to its first list argument and its resulting list.base\mathcal{O}(\min(m,n)).  generalises  by zipping with the function given as the first argument, instead of a tupling function. zipWith (,) xs ys == zip xs ys zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..] For example,  (+) is applied to two lists to produce the list of corresponding sums:zipWith (+) [1, 2, 3] [4, 5, 6][5,7,9] is right-lazy:zipWith f [] _|_[] is capable of list fusion, but it is restricted to its first list argument and its resulting list.baseThe  function takes a function which combines three elements, as well as three lists and returns a list of the function applied to corresponding elements, analogous to . It is capable of list fusion, but it is restricted to its first list argument and its resulting list. zipWith3 (,,) xs ys zs == zip3 xs ys zs zipWith3 f [x1,x2,x3..] [y1,y2,y3..] [z1,z2,z3..] == [f x1 y1 z1, f x2 y2 z2, f x3 y3 z3..]base transforms a list of pairs into a list of first components and a list of second components.unzip []([],[])unzip [(1, 'a'), (2, 'b')] ([1,2],"ab")baseThe  function takes a list of triples and returns three lists, analogous to . unzip3 [] ([],[],[])(unzip3 [(1, 'a', True), (2, 'b', False)]([1,2],"ab",[True,False])7*7*449 Q((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy2}/}base!Conversion of values to readable  s.Derived instances of } have the following properties, which are compatible with derived instances of %:The result of  is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used.?If the constructor is defined to be an infix operator, then 4 will produce infix applications of the constructor.the representation will be enclosed in parentheses if the precedence of the top-level constructor in x is less than d* (associativity is ignored). Thus, if d is 0; then the result is never surrounded in parentheses; if d is 11 it is always surrounded in parentheses, unless it is an atomic expression.8If the constructor is defined using record syntax, then  will produce the record-syntax form, with the fields given in the same order as the original declaration.#For example, given the declarations 8infixr 5 :^: data Tree a = Leaf a | Tree a :^: Tree athe derived instance of } is equivalent to instance (Show a) => Show (Tree a) where showsPrec d (Leaf m) = showParen (d > app_prec) $ showString "Leaf " . showsPrec (app_prec+1) m where app_prec = 10 showsPrec d (u :^: v) = showParen (d > up_prec) $ showsPrec (up_prec+1) u . showString " :^: " . showsPrec (up_prec+1) v where up_prec = 5!Note that right-associativity of :^: is ignored. For example, (Leaf 1 :^: Leaf 2 :^: Leaf 3) produces the string  "Leaf 1 :^: (Leaf 2 :^: Leaf 3)".baseConvert a value to a readable  . should satisfy the law 0showsPrec d x r ++ s == showsPrec d x (r ++ s)Derived instances of % and } satisfy the following:(x,"") is an element of (% d ( d x "")). That is, % parses the string produced by , and delivers the value that  started with.baseA specialised variant of <, using precedence context zero, and returning an ordinary  .base The method  is provided to allow the programmer to give a specialised way of showing lists of values. For example, this is used by the predefined } instance of the  type, where values of type   should be shown in double quotes, rather than between square brackets.baseThe shows7 functions return a function that prepends the output   to an existing  . This allows constant-time concatenation of results using function composition.baseequivalent to  with a precedence of 0.baseutility function converting a  to a show function that simply prepends the character unchanged.baseutility function converting a  ? to a show function that simply prepends the string unchanged.baseutility function that surrounds the inner show function with parentheses when the  parameter is .baseConvert a character to a string using only printable characters, using Haskell source-language escape conventions. For example: !showLitChar '\n' s = "\\n" ++ sbaseSame as , but for strings It converts the string to a string using Haskell escape conventions for non-printable characters. Does not add double-quotes around the whole thing; the caller should do that. The main difference from showLitChar (apart from the fact that the argument is a string not a list) is that we must escape double-quotesbaseLike  (expand escape characters using Haskell escape conventions), but * break the string into multiple lines * wrap the entire thing in double quotes Example: (showMultiLineString "hellongoodbyenblah" returns %[""hello\n\", "\goodbyen\", "\blah""]base Convert an  in the range 0..15$ to the corresponding single digit . This function fails on other inputs, and generates lower-case hexadecimal digits.basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase base base basebasebasebasebasebase base base base base base basebasebasebasebasebasethe operator precedence of the enclosing context (a number from 0 to 11(). Function application has precedence 10.basethe value to be converted to a  }}R((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe] base The strict  monad. The  monad allows for destructive updates, but is escapable (unlike IO). A computation of type  s a returns a value of type a, and execute in "thread" s. The s parameter is either7an uninstantiated type variable (inside invocations of ), or (inside invocations of ).It serves to keep the internal states of different invocations of 3 separate from each other and from invocations of .The < and = operations are strict in the state (though not in values stored in the state). For example,  (writeSTRef _|_ v >>= f) = _|_base allows an  computation to be deferred lazily. When passed a value of type ST a, the ; computation will only be performed when the value of the a is demanded. base allows an  computation to be deferred lazily. When passed a value of type ST a, the ; computation will only be performed when the value of the a is demanded.The computation may be performed multiple times by different threads, possibly at the same time. To prevent this, use  instead.base2Return the value computed by a state thread. The forall- ensures that the internal state used by the 9 computation is inaccessible to the rest of the program.base base base basebasebasebase  U((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafebasea value of type  STRef s a' is a mutable variable in state thread s, containing a value of type a:{ runST (do ref <- newSTRef "hello" x <- readSTRef ref! writeSTRef ref (x ++ "world") readSTRef ref ):} "helloworld"base Build a new  in the current state threadbaseRead the value of an baseWrite a new value into an basePointer equality. TrustworthyR6base6base6base7base777777? TrustworthybaseThe  method restricted to the type 0.  V((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy23*5base!Used in Haskell's translation of [n..] with [n..] = enumFrom n%, a possible implementation being "enumFrom n = n : enumFrom (succ n). For example: 'enumFrom 4 :: [Integer] = [4,5,6,7,...] 3enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound :: Int]6base!Used in Haskell's translation of [n,n'..] with [n,n'..] = enumFromThen n n'%, a possible implementation being 2enumFromThen n n' = n : n' : worker (f x) (f x n'), worker s v = v : worker s (s v), x = fromEnum n' - fromEnum n and f n y | n > 0 = f (n - 1) (succ y) | n < 0 = f (n + 1) (pred y) | otherwise = y For example: -enumFromThen 4 6 :: [Integer] = [4,6,8,10...] ;enumFromThen 6 2 :: [Int] = [6,2,-2,-6,...,minBound :: Int]7base!Used in Haskell's translation of [n..m] with [n..m] = enumFromTo n m%, a possible implementation being enumFromTo n m | n <= m = n : enumFromTo (succ n) m | otherwise = []. For example: 'enumFromTo 6 10 :: [Int] = [6,7,8,9,10] !enumFromTo 42 1 :: [Integer] = []8base!Used in Haskell's translation of  [n,n'..m] with ![n,n'..m] = enumFromThenTo n n' m%, a possible implementation being .enumFromThenTo n n' m = worker (f x) (c x) n m, x = fromEnum n' - fromEnum n, c x = bool (>=) ( =)(x 0) f n y | n > 0 = f (n - 1) (succ y) | n < 0 = f (n + 1) (pred y) | otherwise = y and worker s c v m | c v m = v : worker s c (s v) m | otherwise = [] For example: 5enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6] "enumFromThenTo 6 8 2 :: [Int] = []nbaseThe n? class is used to name the upper and lower limits of a type. x is not a superclass of n since types that are not totally ordered may also have upper and lower bounds.The n1 class may be derived for any enumeration type; ( is the first constructor listed in the data declaration and  is the last. n may also be derived for single-constructor datatypes whose constituent types are in n.obaseClass o2 defines operations on sequentially ordered types.The enumFrom... methods are used in Haskell's translation of arithmetic sequences. Instances of o may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by  from 0 through n-1. See Chapter 10 of the Haskell Report for more details.*For any type that is an instance of class n as well as o, the following should hold: The calls   and  % should result in a runtime error. and  should give a runtime error if the result value is not representable in the result type. For example,  7 ::  is an error.5 and 63 should be defined with an implicit bound, thus:  enumFrom x = enumFromTo x maxBound enumFromThen x y = enumFromThenTo x y bound where bound | fromEnum y >= fromEnum x = maxBound | otherwise = minBoundbase.the successor of a value. For numeric types,  adds 1.base0the predecessor of a value. For numeric types,  subtracts 1.baseConvert from an .baseConvert to an '. It is implementation-dependent what  returns when applied to a value that is too large to fit in an .basebasebasebasebasebasebasebasebasebasebase base base base basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebaseno5687no5687:((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy]04baseConversion from a  (that is  4). A floating literal stands for an application of 4 to a value of type , so such literals have type (r a) => a.Jbase$general coercion from integral typesKbase$general coercion to fractional typesLbaseconversion to Mbasethe rational equivalent of its real argument with full precisionrbase-Fractional numbers, supporting real division.'The Haskell Report defines no laws for r . However, ( ) and ( ) are customarily expected to define a division ring and have the following properties: ! gives the multiplicative inverse x * recip x =  recip x * x =  fromInteger 1 Note that it isn't/ customarily expected that a type instance of r. implement a field. However, all instances in base do.sbase.Integral numbers, supporting integer division.'The Haskell Report defines no laws for s . However, s instances are customarily expected to define a Euclidean domain and have the following properties for the  'div'\/'mod' and  'quot'\/'rem', pairs, given suitable Euclidean functions f and g:x = y * quot x y + rem x y with rem x y =  fromInteger 0 or  g (rem x y) < g yx = y * div x y + mod x y with mod x y =  fromInteger 0 or  f (mod x y) < f y1An example of a suitable Euclidean function, for  'Integer'\'s instance, is  .|base#Extracting components of fractions.base9Rational numbers, with numerator and denominator of some s type. Note that 's instances inherit the deficiencies from the type parameter's. For example,  Ratio Natural's w# instance has similar problems to 's.baseArbitrary-precision rational numbers, represented as a ratio of two : values. A rational number may be constructed using the  operator.base The function  takes a real fractional number x and returns a pair (n,f) such that x = n+f, and:n- is an integral number with the same sign as x; andf. is a fraction with the same type and sign as x', and with absolute value less than 1.The default definitions of the , ,  and  functions are in terms of .base x returns the integer nearest x between zero and xbase x returns the nearest integer to x; the even integer if x$ is equidistant between two integersbase x) returns the least integer not less than xbase x/ returns the greatest integer not greater than xbaseFractional division.baseReciprocal fraction.base&integer division truncated toward zerobaseinteger remainder, satisfying !(x `quot` y)*y + (x `rem` y) == xbase3integer division truncated toward negative infinitybaseinteger modulus, satisfying  (x `div` y)*y + (x `mod` y) == xbase simultaneous  and base simultaneous  and base is a subsidiary function used only in this module. It normalises a ratio by dividing both numerator and denominator by their greatest common divisor.base(Forms the ratio of two integral numbers.baseExtract the numerator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.baseExtract the denominator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.baseConverts a possibly-negative z value to a string.base/raise a number to a non-negative integral powerbase#raise a number to an integral powerbase x y$ is the non-negative factor of both x and y" of which every common factor of x and y is also a factor; for example  4 2 = 2,  (-4) 6 = 2,  0 4 = 4.  0 0 = 0. (That is, the common divisor that is "greatest" in the divisibility preordering.)2Note: Since for signed fixed-width integer types,    < 09, the result may be negative if one of the arguments is & (and necessarily is if the other is 0 or ) for such types.base x y, is the smallest positive integer that both x and y divide.basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase(a function that can show unsigned valuesbase'the precedence of the enclosing contextbasethe value to show8JKr4sLzM|8zMsLr4|JK77777788X((c) The University of Glasgow, 1994-2000see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)None~baseThe ~ class is used to map a contiguous subrange of values in a type onto integers. It is used primarily for array indexing (see the array package).The first argument (l,u) of each of these operations is a pair specifying the lower and upper bounds of a contiguous subrange of values.An implementation is entitled to assume the following laws about these operations: (l,u) i == elem i ( (l,u))   (l,u) !!  (l,u) i == i, when  (l,u) i* ( (l,u)) ( (l,u))) == [0.. (l,u)-1]   (l,u) == length ( (l,u))  base>The list of values in the subrange defined by a bounding pair.base,The position of a subscript in the subrange.baseLike 2, but without checking that the value is in range.baseReturns  the given subscript lies in the range defined the bounding pair.base4The size of the subrange defined by a bounding pair.baselike 9, but without checking that the upper bound is in range.basebasebasebasebasebasebasebasebasebasebasebase~~W((c) The University of Glasgow, 1994-2000see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)Unsafebase)Mutable, boxed, non-strict arrays in the , monad. The type arguments are as follows:s&: the state variable argument for the  typei8: the index type of the array (should be an instance of ~)e : the element type of the array.baseThe type of immutable non-strict (boxed) arrays with indices in i and elements in e.baseConstruct an array with the specified bounds and containing values for given indices within these bounds.The array is undefined (i.e. bottom) if any index in the list is out of bounds. The Haskell 2010 Report further specifies that if any two associations in the list have the same index, the value at that index is undefined (i.e. bottom). However in GHC's implementation, the value at such an index is the value part of the last association with that index in the list.6Because the indices must be checked for these errors,  is strict in the bounds argument and in the indices of the association list, but non-strict in the values. Thus, recurrences such as the following are possible: >a = array (1,100) ((1,1) : [(i, i * a!(i-1)) | i <- [2..100]])Not every index within the bounds of the array need appear in the association list, but the values associated with indices that do not appear will be undefined (i.e. bottom).If, in any dimension, the lower bound is greater than the upper bound, then the array is legal, but empty. Indexing an empty array always gives an array-bounds error, but ? still yields the bounds with which the array was constructed.baseConstruct an array from a pair of bounds and a list of values in index order.base)The value at the given index in an array.7base1Look up an element in an array without forcing it7base!A convenient version of unsafeAt#base/The bounds with which an array was constructed.base$The number of elements in the array.base3The list of indices of an array in ascending order.base0The list of elements of an array in index order.baseA right fold over the elementsbaseA left fold over the elementsbase%A strict right fold over the elementsbase$A strict left fold over the elementsbase4A left fold over the elements with no starting valuebase5A right fold over the elements with no starting valuebase4The list of associations of an array in index order.baseThe  function deals with repeated indices in the association list using an accumulating function which combines the values of associations with the same index.8For example, given a list of values of some index type, hist produces a histogram of the number of occurrences of each index within a specified range: hist :: (Ix a, Num b) => (a,a) -> [a] -> Array a b hist bnds is = accumArray (+) 0 bnds [(i, 1) | i<-is, inRange bnds i] accumArray is strict in each result of applying the accumulating function, although it is lazy in the initial value. Thus, unlike arrays built with 9, accumulated arrays should not in general be recursive.baseConstructs an array identical to the first argument except that it has been updated by the associations in the right argument. For example, if m is a 1-origin, n by n matrix, then m//[((i,i), 0) | i <- [1..n]]4is the same matrix, except with the diagonal zeroed. from the  instance of the v class.basebasebasebasebasebase a pair of bounds, each of the index type of the array. These bounds are the lowest and highest indices in the array, in that order. For example, a one-origin vector of length 10 has bounds (1,10), and a one-origin 10 by 10 matrix has bounds ((1,1),(10,10)).base a list of  associations of the form (index, value). Typically, this list will be expressed as a comprehension. An association (i, x)* defines the value of the array at index i to be x.baseaccumulating functionbase initial valuebasebounds of the arraybaseassociation list<~<~9 9 Y"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy"(baseThe 9 class denotes types with a finite, fixed number of bits.baseReturn the number of bits in the type of the argument. The actual value of the argument is ignored. Moreover, * is total, in contrast to the deprecated  function it replaces.  =   =  .  baseCount number of zero bits preceding the most significant set bit.  ( :: a) = finiteBitSize ( :: a) & can be used to compute log base 2 via  logBase2 x =  x - 1 -  x Note: The default implementation for this method is intentionally naive. However, the instances provided for the primitive integral types are implemented using CPU specific machine instructions.baseCount number of zero bits following the least significant set bit.  ( :: a) = finiteBitSize ( :: a)  . ; =   The related  +http://en.wikipedia.org/wiki/Find_first_setfind-first-set operation can be expressed in terms of  as follows findFirstSet x = 1 +  x Note: The default implementation for this method is intentionally naive. However, the instances provided for the primitive integral types are implemented using CPU specific machine instructions.baseThe 6 class defines bitwise operations over integral types.Bits are numbered from 0 with bit 0 being the least significant bit.base Bitwise "and"base Bitwise "or"base Bitwise "xor"base%Reverse all the bits in the argument base x i shifts x left by i bits if i" is positive, or right by -i bits otherwise. Right shifts perform sign extension on signed number types; i.e. they fill the top bits with 1 if the x* is negative and with 0 otherwise.+An instance can define either this unified  or  and , depending on which is more convenient for the type in question. base x i rotates x left by i bits if i" is positive, or right by -i bits otherwise.For unbounded types like ,  is equivalent to .+An instance can define either this unified  or  and , depending on which is more convenient for the type in question. base" is the value with all bits unset. a -> Maybe b toIntegral x | toInteger x == y = Just (fromInteger y) | otherwise = Nothing where y = toInteger x$This version requires going through &, which can be inefficient. However, toIntegralSized is optimized to allow GHC to statically determine the relative type sizes (as measured by  and ) and avoid going through + for many types. (The implementation uses J+, which is itself optimized with rules for base types but may go through  for some type pairs.)7base if the size of a is <= the size of b, where size is measured by  and .basebasebase Interpret  as 1-bit bit-fieldbasebasebasebasebase 756888888Z#(c) The University of Glasgow, 2003see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy2/:baseUnicode General Categories (column 2 of the UnicodeData table) in the order they are listed in the Unicode standard (the Unicode Character Database, in particular).Examples Basic usage::t OtherLetterOtherLetter :: GeneralCategoryp instance:"UppercaseLetter == UppercaseLetterTrue"UppercaseLetter == LowercaseLetterFalsex instance:NonSpacingMark <= MathSymbolTrueo instance:.enumFromTo ModifierLetter SpacingCombiningMark[ModifierLetter,OtherLetter,NonSpacingMark,SpacingCombiningMark]% instance:)read "DashPunctuation" :: GeneralCategoryDashPunctuationread "17" :: GeneralCategory%*** Exception: Prelude.read: no parse} instance:show EnclosingMark"EnclosingMark"n instance:minBound :: GeneralCategoryUppercaseLettermaxBound :: GeneralCategory NotAssigned~ instance:import Data.Ix ( index )&index (OtherLetter,Control) FinalQuote12"index (OtherLetter,Control) Format#*** Exception: Error in array indexbaseLu: Letter, UppercasebaseLl: Letter, LowercasebaseLt: Letter, TitlecasebaseLm: Letter, ModifierbaseLo: Letter, OtherbaseMn: Mark, Non-SpacingbaseMc: Mark, Spacing CombiningbaseMe: Mark, EnclosingbaseNd: Number, DecimalbaseNl: Number, LetterbaseNo: Number, OtherbasePc: Punctuation, ConnectorbasePd: Punctuation, DashbasePs: Punctuation, OpenbasePe: Punctuation, ClosebasePi: Punctuation, Initial quotebasePf: Punctuation, Final quotebasePo: Punctuation, OtherbaseSm: Symbol, MathbaseSc: Symbol, CurrencybaseSk: Symbol, ModifierbaseSo: Symbol, OtherbaseZs: Separator, SpacebaseZl: Separator, LinebaseZp: Separator, ParagraphbaseCc: Other, ControlbaseCf: Other, FormatbaseCs: Other, SurrogatebaseCo: Other, Private UsebaseCn: Other, Not Assignedbase$Version of Unicode standard used by base.baseThe Unicode general category of the character. This relies on the o instance of , which must remain in the same order as the categories are presented in the Unicode standard.Examples Basic usage:generalCategory 'a'LowercaseLettergeneralCategory 'A'UppercaseLettergeneralCategory '0' DecimalNumbergeneralCategory '%'OtherPunctuationgeneralCategory 'L' OtherSymbolgeneralCategory '\31'ControlgeneralCategory ' 'SpacebaseSelects the first 128 characters of the Unicode character set, corresponding to the ASCII character set.baseSelects the first 256 characters of the Unicode character set, corresponding to the ISO 8859-1 (Latin-1) character set.baseSelects ASCII lower-case letters, i.e. characters satisfying both  and .baseSelects ASCII upper-case letters, i.e. characters satisfying both  and .baseReturns > for any Unicode space character, and the control characters \t, \n, \r, \f, \v.baseSelects ASCII digits, i.e. '0'..'9'.base!Selects ASCII octal digits, i.e. '0'..'7'.base(Selects ASCII hexadecimal digits, i.e. '0'..'9', 'a'..'f', 'A'..'F'.baseSelects Unicode punctuation characters, including various kinds of connectors, brackets and quotes.This function returns + if its argument has one of the following s, or  otherwise:"These classes are defined in the  http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character Database, part of the Unicode standard. The same document defines what is and is not a "Punctuation".Examples Basic usage:isPunctuation 'a'FalseisPunctuation '7'FalseisPunctuation 'L'FalseisPunctuation '"'TrueisPunctuation '?'TrueisPunctuation '@'TruebaseSelects Unicode symbol characters, including mathematical and currency symbols.This function returns + if its argument has one of the following s, or  otherwise:"These classes are defined in the  http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character Database, part of the Unicode standard. The same document defines what is and is not a "Symbol".Examples Basic usage: isSymbol 'a'False isSymbol '6'False isSymbol '='TrueThe definition of "math symbol" may be a little counter-intuitive depending on one's background: isSymbol '+'True isSymbol '-'FalsebaseSelects alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function is equivalent to 0.base1Selects alphabetic or numeric Unicode characters.Note that numeric digits outside the ASCII range, as well as numeric characters which aren't digits, are selected by this function but not by . Such characters may be part of identifiers but are not used by the printer and reader to represent numbers.baseSelects control characters, which are the non-printing characters of the Latin-1 subset of Unicode.baseSelects printable Unicode characters (letters, numbers, marks, punctuation, symbols and spaces).baseSelects upper-case or title-case alphabetic Unicode characters (letters). Title case is used by a small number of letter ligatures like the single-character form of Lj.base;Selects lower-case alphabetic Unicode characters (letters).baseConvert a letter to the corresponding lower-case letter, if any. Any other character is returned unchanged.baseConvert a letter to the corresponding upper-case letter, if any. Any other character is returned unchanged.baseConvert a letter to the corresponding title-case or upper-case letter, if any. (Title case differs from upper case only for a small number of ligature letters.) Any other character is returned unchanged.basebasebasebasebasebase55\((c) The University of Glasgow, 1998-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe2>baseA weak pointer object with a key and a value. The value has type v.A weak pointer expresses a relationship between two objects, the key and the value: if the key is considered to be alive by the garbage collector, then the value is also alive. A reference from the value to the key does not keep the key alive.1A weak pointer may also have a finalizer of type IO (); if it does, then the finalizer will be run at most once, at a time after the key has become unreachable by the program ("dead"). The storage manager attempts to run the finalizer(s) for an object soon after the object dies, but promptness is not guaranteed.It is not guaranteed that a finalizer will eventually run, and no attempt is made to run outstanding finalizers when the program exits. Therefore finalizers should not be relied on to clean up resources - other methods (eg. exception handlers) should be employed, possibly in addition to finalizers.References from the finalizer to the key are treated in the same way as references from the value to the key: they do not keep the key alive. A finalizer may therefore ressurrect the key, perhaps by storing it in the same data structure.The finalizer, and the relationship between the key and the value, exist regardless of whether the program keeps a reference to the  object or not.There may be multiple weak pointers with the same key. In this case, the finalizers for each of these weak pointers will all be run in some arbitrary order, or perhaps concurrently, when the key dies. If the programmer specifies a finalizer that assumes it has the only reference to an object (for example, a file that it wishes to close), then the programmer must ensure that there is only one such finalizer.If there are no other threads to run, the runtime system will check for runnable finalizers before declaring the system to be deadlocked.WARNING: weak pointers to ordinary non-primitive Haskell types are particularly fragile, because the compiler is free to optimise away or duplicate the underlying data structure. Therefore attempting to place a finalizer on an ordinary Haskell type may well result in the finalizer running earlier than you expected. This is not a problem for caches and memo tables where early finalization is benign. Finalizers can be used reliably for types that are created explicitly and have identity, such as IORef and MVar. However, to place a finalizer on one of these types, you should use the specific operation provided for that type, e.g.  mkWeakIORef and addMVarFinalizer respectively (the non-uniformity is accidental). These operations attach the finalizer to the primitive object inside the box (e.g. MutVar# in the case of IORef), because attaching the finalizer to the box itself fails when the outer box is optimised away by the compiler.baseEstablishes a weak pointer to k , with value v and a finalizer.?This is the most general interface for building a weak pointer.base>Dereferences a weak pointer. If the key is still alive, then  v is returned (where v is the value! in the weak pointer), otherwise  is returned.The return value of  depends on when the garbage collector runs, hence it is in the  monad.baseCauses a the finalizer associated with a weak pointer to be run immediately.basekeybasevaluebase finalizerbasereturns: a weak pointer object;((c) The University of Glasgow, 1997-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) TrustworthyC7base8-bit unsigned integer typebase16-bit unsigned integer typebase32-bit unsigned integer typebase64-bit unsigned integer typebaseReverse order of bytes in .baseReverse order of bytes in .baseReverse order of bytes in . base#Reverse the order of the bits in a . base#Reverse the order of the bits in a . base#Reverse the order of the bits in a . base#Reverse the order of the bits in a .basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase1 1 (c) The University of Glasgow 1994-2002 Portions obtained from hbc (c) Lennart Augusstsonsee libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy _+qbase=Trigonometric and hyperbolic functions and related functions.'The Haskell Report defines no laws for q . However, ( ), ( ) and  are customarily expected to define an exponential field and have the following properties: exp (a + b) =  exp a * exp bexp (fromInteger 0) =  fromInteger 1{baseEfficient, machine-independent access to the components of a floating-point number.basea constant function, returning the radix of the representation (often 2)base8a constant function, returning the number of digits of  in the significandbasea constant function, returning the lowest and highest values the exponent may assumebase The function  applied to a real floating-point number returns the significand expressed as an + and an appropriately scaled exponent (an ). If  x yields (m,n), then x is equal in value to m*b^^n, where b7 is the floating-point radix, and furthermore, either m and n are both zero or else  b^(d-1) <=   m < b^d, where d is the value of  x. In particular,  0 = (0,0).. If the type contains a negative zero, also  (-0.0) = (0,0).  The result of  x is unspecified if either of  x or  x is .base performs the inverse of  in the sense that for finite x with the exception of -0.0,   ( x) = x.  m n is one of the two closest representable floating-point numbers to m*b^^n (or  Infinity2 if overflow occurs); usually the closer, but if m contains too many bits, the result may be rounded in the wrong direction.base( corresponds to the second component of .  0 = 0 and for finite nonzero x,  x = snd ( x) +  x. If x= is a finite floating-point number, it is equal in value to  x * b ^^  x, where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.baseThe first component of ', scaled to lie in the open interval (-1,1 ), either 0.0 or of absolute value >= 1/b , where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.basemultiplies a floating-point number by an integer power of the radixbase6 if the argument is an IEEE "not-a-number" (NaN) valuebase9 if the argument is an IEEE infinity or negative infinitybase if the argument is too small to be represented in normalized formatbase) if the argument is an IEEE negative zerobase1 if the argument is an IEEE floating point numberbasea version of arctangent taking two real floating-point arguments. For real floating x and y,  y x computes the angle (from the positive x-axis) of the vector from the origin to the point (x,y).  y x returns a value in the range [-pi, pi]. It follows the Common Lisp semantics for the origin when signed zeroes are supported.  y 1, with y in a type that is {", should return the same value as  y. A default definition of  is provided, but implementors can provide a more accurate implementation. base x computes  (1 + x), but provides more precise results for small (absolute) values of x if possible. base x computes  x - 1, but provides more precise results for small (absolute) values of x if possible. base x computes  (1 +  x)1, but provides more precise results if possible. Examples:if x is a large negative number,  (1 +  x)/ will be imprecise for the reasons given in .if  x is close to -1,  (1 +  x)/ will be imprecise for the reasons given in . base x computes  (1 -  x)1, but provides more precise results if possible. Examples:if x is a large negative number,  (1 -  x)/ will be imprecise for the reasons given in .if  x is close to 1,  (1 -  x)/ will be imprecise for the reasons given in .baseShow a signed { value to full precision using standard decimal notation for arguments whose absolute value lies between 0.1 and  9,999,999$, and scientific notation otherwise.base! takes a base and a non-negative { number, and returns a list of digits and an exponent. In particular, if x>=0, and *floatToDigits base x = ([d1,d2,...,dn], e)then  n >= 1 x = 0.d1d2...dn * (base**e) 0 <= di <= base-1base Converts a  value into any type in class {. base w does a bit-for-bit copy from an integral value to a floating-point value. base f does a bit-for-bit copy from a floating-point value to an integral value. base w does a bit-for-bit copy from an integral value to a floating-point value. basecastFloatToWord64 f does a bit-for-bit copy from a floating-point value to an integral value.basebasebasebase!Note that due to the presence of NaN, not all elements of ! have an multiplicative inverse.0/0 * (recip 0/0 :: Double)NaNbasebase!Note that due to the presence of NaN, not all elements of  have an additive inverse.0/0 + (negate 0/0 :: Double)NaN*Also note that due to the presence of -0, 's w, instance doesn't have an additive identity0 + (-0 :: Double)0.0basebase!Note that due to the presence of NaN, not all elements of ! have an multiplicative inverse.0/0 * (recip 0/0 :: Float)NaNbasebase!Note that due to the presence of NaN, not all elements of  have an additive inverse.0/0 + (negate 0/0 :: Float)NaN*Also note that due to the presence of -0, 's w, instance doesn't have an additive identity0 + (-0 :: Float)0.0basebasebasebasebasebasebase(a function that can show unsigned valuesbase'the precedence of the enclosing contextbasethe value to show./q{ ./q{ 8 Trustworthy567ks7baseA priority search queue with Int keys and priorities of type p and values of type v.. It is strict in keys, priorities and values.7baseE k p binds the key k with the priority p.7baseWe store masks as the index of the bit that determines the branching.7baseO(1) True if the queue is empty.7baseO(n), The number of elements stored in the queue.7base O(min(n,W))+ The priority and value of a given key, or  if the key is not bound.7baseO(1)& The element with the lowest priority.7baseO(1) The empty queue.7baseO(1) Build a queue with one element.7base O(min(n,W))> Insert a new key that is *not* present in the priority queue.7baseLink7base O(min(n,W)) Delete a key and its priority and value from the queue. When the key is not a member of the queue, the original queue is returned.7base O(min(n,W)) Delete the binding with the least priority, and return the rest of the queue stripped of that binding. In case the queue is empty, the empty queue is returned again.7base O(min(n,W)) The expression alter f k queue alters the value x at k, or absence thereof. 7 can be used to insert, delete, or update a value in a queue. It also allows you to calculate an additional value b.7baseSmart constructor for a 7, node whose left subtree could have become 7.7baseSmart constructor for a 7- node whose right subtree could have become 7.7baseO(n) Convert a queue to a list of (key, priority, value) tuples. The order of the list is not specified.7base O(min(n,W)) Delete a key and its priority and value from the queue. If the key was present, the associated priority and value are returned in addition to the updated queue.7base O(min(n,W)) Retrieve the binding with the least priority, and the rest of the queue stripped of that binding.7baseReturn a list of elements ordered by key whose priorities are at most pt, and the rest of the queue stripped of these elements. The returned list of elements can be in any order: no guarantees there.7base-Internal function that merges two *disjoint* 7#s that share the same prefix mask.777777777777777777777(C) 2014 Herbert Valerio Riedel, (C) 2011 Edward Kmettsee libraries/base/LICENSElibraries@haskell.org provisionalportable TrustworthylQ]"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional-non-portable (local universal quantification) Trustworthy5}.baseA parser for a type a*, represented as a function that takes a  * and returns a list of possible parses as (a, ) pairs.Note that this kind of backtracking parser is very inefficient; reading a large structure may be quite slow (cf ).baseConsumes and returns the next character. Fails if there is no input left.baseLook-ahead: returns the part of the input that is left, without consuming it.base Always fails.baseSymmetric choice.baseLocal, exclusive, left-biased choice: If left parser locally produces any result at all, then right parser is not used.baseTransforms a parser into one that does the same, but in addition returns the exact characters read. IMPORTANT NOTE:  gives a runtime error if its first argument is built using any occurrences of readS_to_P.baseConsumes and returns the next character, if it satisfies the specified predicate.base+Parses and returns the specified character.base'Succeeds iff we are at the end of inputbase(Parses and returns the specified string.baseParses the first zero or more characters satisfying the predicate. Always succeeds, exactly once having consumed all the characters Hence NOT the same as (many (satisfy p))baseParses the first one or more characters satisfying the predicate. Fails if none, else succeeds exactly once having consumed all the characters Hence NOT the same as (many1 (satisfy p))base+Combines all parsers in the specified list.baseSkips all whitespace.base count n p parses n occurrences of p/ in sequence. A list of results is returned.basebetween open close p parses open, followed by p and finally close. Only the value of p is returned.base option x p will either parse p or return x without consuming any input.base optional p optionally parses p and always returns ().base4Parses zero or more occurrences of the given parser.base3Parses one or more occurrences of the given parser.baseLike , but discards the result.baseLike , but discards the result.base sepBy p sep$ parses zero or more occurrences of p, separated by sep*. Returns a list of values returned by p.base sepBy1 p sep# parses one or more occurrences of p, separated by sep*. Returns a list of values returned by p.base endBy p sep$ parses zero or more occurrences of p, separated and ended by sep.base endBy p sep# parses one or more occurrences of p, separated and ended by sep.base chainr p op x$ parses zero or more occurrences of p, separated by op#. Returns a value produced by a right9 associative application of all functions returned by op!. If there are no occurrences of p, x is returned.base chainl p op x$ parses zero or more occurrences of p, separated by op#. Returns a value produced by a left9 associative application of all functions returned by op!. If there are no occurrences of p, x is returned.baseLike (, but parses one or more occurrences of p.baseLike (, but parses one or more occurrences of p.basemanyTill p end$ parses zero or more occurrences of p, until end3 succeeds. Returns a list of values returned by p.baseConverts a parser into a Haskell ReadS-style function. This is the main way in which you can "run" a " parser: the expanded type is 1 readP_to_S :: ReadP a -> String -> [(a,String)] baseConverts a Haskell ReadS-style function into a parser. Warning: This introduces local backtracking in the resulting parser, and therefore a possible inefficiency.base basebasebasebasebasebase basebasebasebasebase##55^"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional0non-portable (uses Text.ParserCombinators.ReadP) Trustworthy]baseLift a precedence-insensitive  to a .base(Increases the precedence context by one.base&Resets the precedence context to zero.base (prec n p) checks whether the precedence context is less than or equal to n, and if not, failsif so, parses p in context n.baseConsumes and returns the next character. Fails if there is no input left.baseLook-ahead: returns the part of the input that is left, without consuming it.baseSymmetric choice.baseLocal, exclusive, left-biased choice: If left parser locally produces any result at all, then right parser is not used.base Always fails.base+Combines all parsers in the specified list.basebase basebasebasebase_"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional0non-portable (uses Text.ParserCombinators.ReadP) TrustworthybasebaseCharacter literalbase(String literal, with escapes interpretedbase%Punctuation or reserved symbol, e.g. (, ::baseHaskell identifier, e.g. foo, BazbaseHaskell symbol, e.g. >>, :%base7baseHaskell lexemes.7 b is ? () if b is , and   if b is .basebasebasebasebasebase?Haskell lexer: returns the lexed string, rather than the lexeme7baseThe special2 character class as defined in the Haskell Report.basebasebasebase`((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy27ybase Parsing of  s, producing values.Derived instances of y= make the following assumptions, which derived instances of & obey:If the constructor is defined to be an infix operator, then the derived y instance will parse only infix applications of the constructor (not the prefix form).Associativity is not used to reduce the occurrence of parentheses, although precedence may be.?If the constructor is defined using record syntax, the derived y will parse only the record-syntax form, and furthermore, the fields must be given in the same order as the original declaration. The derived y instance allows arbitrary Haskell whitespace between tokens of the input string. Extra parentheses are also allowed.#For example, given the declarations 8infixr 5 :^: data Tree a = Leaf a | Tree a :^: Tree athe derived instance of y! in Haskell 2010 is equivalent to instance (Read a) => Read (Tree a) where readsPrec d r = readParen (d > app_prec) (\r -> [(Leaf m,t) | ("Leaf",s) <- lex r, (m,t) <- readsPrec (app_prec+1) s]) r ++ readParen (d > up_prec) (\r -> [(u:^:v,w) | (u,s) <- readsPrec (up_prec+1) r, (":^:",t) <- lex s, (v,w) <- readsPrec (up_prec+1) t]) r where app_prec = 10 up_prec = 5!Note that right-associativity of :^: is unused.,The derived instance in GHC is equivalent to instance (Read a) => Read (Tree a) where readPrec = parens $ (prec app_prec $ do Ident "Leaf" <- lexP m <- step readPrec return (Leaf m)) +++ (prec up_prec $ do u <- step readPrec Symbol ":^:" <- lexP v <- step readPrec return (u :^: v)) where app_prec = 10 up_prec = 5 readListPrec = readListPrecDefault Why do both  and + exist, and why does GHC opt to implement  in derived y instances instead of ? The reason is that  is based on the  type, and although  is mentioned in the Haskell 2010 Report, it is not a very efficient parser data structure.7, on the other hand, is based on a much more efficient  datatype (a.k.a "new-style parsers"), but its definition relies on the use of the  RankNTypes language extension. Therefore,  (and its cousin, ) are marked as GHC-only. Nevertheless, it is recommended to use  instead of > whenever possible for the efficiency improvements it brings.As mentioned above, derived y" instances in GHC will implement  instead of ". The default implementations of  (and its cousin, ) will simply use ' under the hood. If you are writing a y: instance by hand, it is recommended to write it like so:  instance y T where  = ...  =  baseattempts to parse a value from the front of the string, returning a list of (parsed value, remaining string) pairs. If there is no successful parse, the returned list is empty.Derived instances of y and & satisfy the following:(x,"") is an element of ( d (& d x "")). That is,  parses the string produced by &, and delivers the value that & started with.base The method  is provided to allow the programmer to give a specialised way of parsing lists of values. For example, this is used by the predefined y instance of the  type, where values of type   should be are expected to use double quotes, rather than square brackets.baseProposed replacement for $ using new-style parsers (GHC only).baseProposed replacement for  using new-style parsers (GHC only). The default definition uses . Instances that define  should also define  as .base  p parses what p* parses, but surrounded with parentheses.  p parses what p5 parses, but optionally surrounded with parentheses.base*A possible replacement definition for the  method (GHC only). This is only needed for GHC, and even then only for y instances where  isn't defined as .base*A possible replacement definition for the  method, defined using  (GHC only).baseThe  function reads a single lexeme from the input, discarding initial white space, and returning the characters that constitute the lexeme. If the input string contains only white space,  returns a single successful `lexeme' consisting of the empty string. (Thus  "" = [("","")].) If there is no legal lexeme at the beginning of the input string,  fails (i.e. returns []).This lexer is not completely faithful to the Haskell lexical syntax in the following respects:(Qualified names are not handled properlyOctal and hexadecimal numerics are not recognized as a single token!Comments are not treated properlybaseRead a string representation of a character, using Haskell source-language escape conventions. For example: -lexLitChar "\\nHello" = [("\\n", "Hello")]baseRead a string representation of a character, using Haskell source-language escape conventions, and convert it to the character that it encodes. For example: ,readLitChar "\\nHello" = [('\n', "Hello")]base+Reads a non-empty string of decimal digits.baseParse a single lexemebase (paren p) parses "(P0)" where p' parses "P0" in precedence context zerobase (parens p)0 parses "P", "(P0)", "((P0))", etc, where p parses "P" in the current precedence context and parses "P0" in precedence context zerobase(list p)# parses a list of things parsed by p), using the usual square-bracket syntax.baseParse the specified lexeme and continue as specified. Esp useful for nullary constructors; e.g. )choose [("A", return A), ("B", return B)] We match both Ident and Symbol because the constructor might be an operator eg (:~:)basey( parser for a record field, of the form fieldName=value. The  fieldName must be an alphanumeric identifier; for symbols (operator-style) field names, e.g. (#), use 8). The second argument is a parser for the field value.basey( parser for a record field, of the form fieldName#=value'. That is, an alphanumeric identifier  fieldName followed by the symbol #7. The second argument is a parser for the field value. Note that + does not suffice for this purpose due to  .https://gitlab.haskell.org/ghc/ghc/issues/5041#5041.basey/ parser for a symbol record field, of the form  (###)=value (where ### is the field name). The field name must be a symbol (operator-style), e.g. (#).. For regular (alphanumeric) field names, use 7. The second argument is a parser for the field value.basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase basebasebasethe operator precedence of the enclosing context (a number from 0 to 11(). Function application has precedence 10.yy#"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy=base Reads an unsigned s value in an arbitrary base.base*Read an unsigned number in octal notation.readOct "0644" [(420,"")]base,Read an unsigned number in decimal notation.readDec "0644" [(644,"")]baseRead an unsigned number in hexadecimal notation. Both upper or lower case letters are allowed.readHex "deadbeef"[(3735928559,"")]base Reads an unsigned |2 value, expressed in decimal scientific notation.baseReads a signed z- value, given a reader for an unsigned value.baseShow  non-negative s numbers in base 10.baseShow a signed {6 value using scientific (exponential) notation (e.g. 2.45e2, 1.5e-3). In the call  digs val, if digs is ,, the value is shown to full precision; if digs is  d, then at most d* digits after the decimal point are shown.baseShow a signed {. value using standard decimal notation (e.g. 245000, 0.0015). In the call  digs val, if digs is ,, the value is shown to full precision; if digs is  d, then at most d* digits after the decimal point are shown.baseShow a signed { value using standard decimal notation for arguments whose absolute value lies between 0.1 and  9,999,999$, and scientific notation otherwise. In the call  digs val, if digs is ,, the value is shown to full precision; if digs is  d, then at most d* digits after the decimal point are shown.baseShow a signed {. value using standard decimal notation (e.g. 245000, 0.0015).This behaves as , except that a decimal point is always guaranteed, even if not needed.baseShow a signed { value using standard decimal notation for arguments whose absolute value lies between 0.1 and  9,999,999$, and scientific notation otherwise.This behaves as , except that a decimal point is always guaranteed, even if not needed.baseShow a floating-point value in the hexadecimal format, similar to the %a specifier in C's printf. showHFloat (212.21 :: Double) """0x1.a86b851eb851fp7"showHFloat (-12.76 :: Float) """-0x1.9851ecp3"showHFloat (-0 :: Double) "" "-0x0p+0"baseShows a  non-negative s number using the base specified by the first argument, and the character representation specified by the second.baseShow  non-negative s numbers in base 16.baseShow  non-negative s numbers in base 8.basethe basebase4a predicate distinguishing valid digits in this basebase4a function converting a valid digit character to an ,q,qa!(c) The FFI Task Force, 2000-2002see libraries/base/LICENSEffi@haskell.orginternalnon-portable (GHC Extensions)Unsafe5baseA value of type  a represents a pointer to an object, or an array of objects, which may be marshalled to or from Haskell values of type a. The type a% will often be an instance of class k which provides the marshalling operations. However this is not essential, and you can provide your own operations to access the pointer. For example you might write small foreign functions to get or set the fields of a C struct.baseA value of type  a is a pointer to a function callable from foreign code. The type a will normally be a  foreign type4, a function type with zero or more arguments wherethe argument types are marshallable foreign types , i.e. , , , , , 1, 1, 1, 1, 6, 6, 6, 6,  a,  a,  a( or a renaming of any of these using newtype.the return type is either a marshallable foreign type or has the form  t where t# is a marshallable foreign type or ().A value of type  a may be a pointer to a foreign function, either returned by another foreign function or imported with a a static address import like foreign import ccall "stdlib.h &free" p_free :: FunPtr (Ptr a -> IO ())3or a pointer to a Haskell function created using a wrapper stub declared to produce a # of the correct type. For example: type Compare = Int -> Int -> Bool foreign import ccall "wrapper" mkCompare :: Compare -> IO (FunPtr Compare)Calls to wrapper stubs like  mkCompare2 allocate storage, which should be released with 7 when no longer required. To convert > values to corresponding Haskell functions, one can define a dynamic) stub for the specific foreign type, e.g. type IntFunction = CInt -> IO () foreign import ccall "dynamic" mkFun :: FunPtr IntFunction -> IntFunctionbase The constant # contains a distinguished value of 6 that is not associated with a valid memory location.baseThe 3 function casts a pointer from one type to another.base8Advances the given address by the given offset in bytes.base9Given an arbitrary address and an alignment constraint,  yields the next higher address that fulfills the alignment constraint. An alignment constraint x+ is fulfilled by any address divisible by x . This operation is idempotent.baseComputes the offset required to get from the second to the first argument. We have %p2 == p1 `plusPtr` (p2 `minusPtr` p1)base The constant $ contains a distinguished value of 6 that is not associated with a valid memory location.baseCasts a  to a  of a different type.baseCasts a  to a .Note: this is valid only on architectures where data and function pointers range over the same set of addresses, and should only be used for bindings to external libraries whose interface already relies on this assumption.baseCasts a  to a .Note: this is valid only on architectures where data and function pointers range over the same set of addresses, and should only be used for bindings to external libraries whose interface already relies on this assumption.basebasebasebase  b'(c) The University of Glasgow 1997-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe    = Trustworthypbasebasebase>'(c) The University of Glasgow 1997-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy214base8-bit signed integer typebase16-bit signed integer typebase32-bit signed integer typebase64-bit signed integer typebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase* * 1"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy}d((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable TrustworthyɕbaseSee basebasebasebasebasebase6"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafeF  e TrustworthyP baseReturn monotonic time in nanoseconds, since some unspecified starting point baseReturn monotonic time in seconds, since some unspecified starting point54BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimental not portable Trustworthy'(./28>ѵbase*A type family to compute Boolean equality.baseThis class contains types where you can learn the equality of two types from information contained in terms=. Typically, only singleton types should inhabit this class.base$Conditionally prove the equality of a and b. base0Kind heterogeneous propositional equality. Like , a :~~: b5 is inhabited by a terminating value if and only if a is the same type as b.basePropositional equality. If a :~: b8 is inhabited by some terminating value, then the type a is the same as the type b:. To use this equality in practice, pattern-match on the a :~: b to get out the Refl constructor; in the body of the pattern-match, the compiler knows that a ~ b.baseSymmetry of equalitybaseTransitivity of equalitybase,Type-safe cast, using propositional equalitybase?Generalized form of type-safe cast using propositional equalitybase+Apply one equality to another, respectivelybaseExtract equality of the arguments from an equality of applied typesbaseExtract equality of type constructors from an equality of applied typesbase base basebase base base base base basebasebasebasebasebase444f4BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimental not portableNone'(.28>baseThis class contains types where you can learn the equality of two types from information contained in terms=. Typically, only singleton types should inhabit this class.base5Conditionally prove the representational equality of a and b.baseRepresentational equality. If  Coercion a b8 is inhabited by some terminating value, then the type a4 has the same underlying representation as the type b.7To use this equality in practice, pattern-match on the  Coercion a b to get out the  Coercible a b instance, and then use 1 to apply it.base/Type-safe cast, using representational equality baseGeneralized form of type-safe cast using representational equalitybase%Symmetry of representational equalitybase)Transitivity of representational equalitybaseConvert propositional (nominal) equality to representational equalitybasebase basebasebasebasebasebasebase  g(c) Ashley Yakeley 20074BSD-style (see the LICENSE file in the distribution)ashley@semantic.org experimentalportable Trustworthy'(.E base9A class for categories. Instances should satisfy the laws Right identityf   = f Left identity  f = f Associativityf  (g  h) = (f  g)  hbasethe identity morphismbasemorphism compositionbaseRight-to-left compositionbaseLeft-to-right compositionbase basebasebase9 11h4BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportable Trustworthy.baseA concrete, promotable proxy type, for use at the kind level. There are no instances for this because it is intended at the kind level onlybase is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).Historically,  ::  a is a safer alternative to the   :: a idiom.!Proxy :: Proxy (Void, Int -> Int)Proxy*Proxy can even hold types of higher kinds,Proxy :: Proxy EitherProxyProxy :: Proxy FunctorProxy#Proxy :: Proxy complicatedStructureProxybase! is a type-restricted version of  . It is usually used as an infix operator, and its typing forces its first argument (which is usually overloaded) to have the same type as the tag of the second.import Data.Word.:type asProxyTypeOf 123 (Proxy :: Proxy Word8)1asProxyTypeOf 123 (Proxy :: Proxy Word8) :: Word8Note the lower-case proxy in the definition. This allows any type constructor with just one argument to be passed to the function, for example we could also writeimport Data.Word3:type asProxyTypeOf 123 (Just (undefined :: Word8))6asProxyTypeOf 123 (Just (undefined :: Word8)) :: Word8 basebase basebasebasebase basebasebasebasebasebasebasebase8"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy ./2baseThe  type represents values with two possibilities: a value of type  a b is either  a or  b.The  type is sometimes used to represent a value which is either correct or an error; by convention, the 4 constructor is used to hold an error value and the  constructor is used to hold a correct value (mnemonic: "right" also means "correct").Examples The type    - is the type of values which can be either a   or an . The ! constructor can be used only on   s, and the ! constructor can be used only on s:'let s = Left "foo" :: Either String Ints Left "foo"$let n = Right 3 :: Either String IntnRight 3:type ss :: Either String Int:type nn :: Either String IntThe > from our v instance will ignore  values, but will apply the supplied function to values contained in a :'let s = Left "foo" :: Either String Int$let n = Right 3 :: Either String Int fmap (*2) s Left "foo" fmap (*2) nRight 6The t instance for  allows us to chain together multiple actions which may fail, and fail overall if any of the individual steps failed. First we'll write a function that can either parse an  from a  , or fail.(import Data.Char ( digitToInt, isDigit ):{0 let parseEither :: Char -> Either String Int parseEither c, | isDigit c = Right (digitToInt c)* | otherwise = Left "parse error":}&The following should work, since both '1' and '2' can be parsed as s.:{* let parseMultiple :: Either String Int parseMultiple = do x <- parseEither '1' y <- parseEither '2' return (x + y):} parseMultipleRight 3But the following should fail overall, since the first operation where we attempt to parse 'm' as an  will fail::{* let parseMultiple :: Either String Int parseMultiple = do x <- parseEither 'm' y <- parseEither '2' return (x + y):} parseMultipleLeft "parse error"baseCase analysis for the  type. If the value is  a, apply the first function to a ; if it is  b, apply the second function to b.ExamplesWe create two values of type    , one using the # constructor and another using the * constructor. Then we apply "either" the  function (if we have a  .) or the "times-two" function (if we have an ):'let s = Left "foo" :: Either String Int$let n = Right 3 :: Either String Inteither length (*2) s3either length (*2) n6baseExtracts from a list of  all the  elements. All the ! elements are extracted in order.Examples Basic usage:let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ] lefts list["foo","bar","baz"]baseExtracts from a list of  all the  elements. All the ! elements are extracted in order.Examples Basic usage:let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ] rights list[3,7]basePartitions a list of  into two lists. All the  elements are extracted, in order, to the first component of the output. Similarly the ? elements are extracted to the second component of the output.Examples Basic usage:let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]partitionEithers list(["foo","bar","baz"],[3,7])The pair returned by  x should be the same pair as ( x,  x):let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]2partitionEithers list == (lefts list, rights list)TruebaseReturn  if the given value is a -value,  otherwise.Examples Basic usage:isLeft (Left "foo")TrueisLeft (Right 3)False Assuming a 1 value signifies some sort of error, we can use  to write a very simple error-reporting function that does absolutely nothing in the case of success, and outputs "ERROR" if any error occurred.This example shows how  might be used to avoid pattern matching when one does not care about the value contained in the constructor:import Control.Monad ( when )1let report e = when (isLeft e) $ putStrLn "ERROR"report (Right 1)report (Left "parse error")ERRORbaseReturn  if the given value is a -value,  otherwise.Examples Basic usage:isRight (Left "foo")FalseisRight (Right 3)True Assuming a 1 value signifies some sort of error, we can use  to write a very simple reporting function that only outputs "SUCCESS" when a computation has succeeded.This example shows how  might be used to avoid pattern matching when one does not care about the value contained in the constructor:import Control.Monad ( when )4let report e = when (isRight e) $ putStrLn "SUCCESS"report (Left "parse error")report (Right 1)SUCCESS baseReturn the contents of a $-value or a default value otherwise.Examples Basic usage:fromLeft 1 (Left 3)3fromLeft 1 (Right "foo")1 baseReturn the contents of a $-value or a default value otherwise.Examples Basic usage:fromRight 1 (Right 3)3fromRight 1 (Left "foo")1basebase basebasebasebasebasebase  %"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional0non-portable (uses Text.ParserCombinators.ReadP) TrustworthyFbaseequivalent to  with a precedence of 0.baseParse a string using the y> instance. Succeeds if there is exactly one valid result. A  value indicates a parse error.%readEither "123" :: Either String Int Right 123'readEither "hello" :: Either String IntLeft "Prelude.read: no parse"baseParse a string using the y: instance. Succeeds if there is exactly one valid result.readMaybe "123" :: Maybe IntJust 123readMaybe "hello" :: Maybe IntNothingbaseThe  function reads input from a string, which must be completely consumed by the input process.  fails with an   if the parse is unsuccessful, and it is therefore discouraged from being used in real applications. Use  or  for safe alternatives.read "123" :: Int123read "hello" :: Int%*** Exception: Prelude.read: no parse)yy0"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy baseConvert a single digit  to the corresponding 6. This function fails unless its argument satisfies , but recognises both upper- and lower-case hexadecimal digits (that is, '0'..'9', 'a'..'f', 'A'..'F').Examples Characters '0' through '9' are converted properly to 0..9:map digitToInt ['0'..'9'][0,1,2,3,4,5,6,7,8,9]Both upper- and lower-case 'A' through 'F' are converted as well, to 10..15.map digitToInt ['a'..'f'][10,11,12,13,14,15]map digitToInt ['A'..'F'][10,11,12,13,14,15]"Anything else throws an exception:digitToInt 'G'/*** Exception: Char.digitToInt: not a digit 'G'digitToInt 'L'3*** Exception: Char.digitToInt: not a digit '\9829'baseSelects alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function is equivalent to 0.This function returns + if its argument has one of the following s, or  otherwise:"These classes are defined in the  http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character Database, part of the Unicode standard. The same document defines what is and is not a "Letter".Examples Basic usage: isLetter 'a'True isLetter 'A'True isLetter ''True isLetter '0'False isLetter '%'False isLetter 'L'FalseisLetter '\31'False Ensure that  and  are equivalent.let chars = [(chr 0)..] let letters = map isLetter charslet alphas = map isAlpha charsletters == alphasTruebaseSelects Unicode mark characters, for example accents and the like, which combine with preceding characters.This function returns + if its argument has one of the following s, or  otherwise:"These classes are defined in the  http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character Database, part of the Unicode standard. The same document defines what is and is not a "Mark".Examples Basic usage: isMark 'a'False isMark '0'FalseCombining marks such as accent characters usually need to follow another character before they become printable:map isMark "o" [False,True]#Puns are not necessarily supported: isMark 'N'FalsebaseSelects Unicode numeric characters, including digits from various scripts, Roman numerals, et cetera.This function returns + if its argument has one of the following s, or  otherwise:"These classes are defined in the  http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character Database, part of the Unicode standard. The same document defines what is and is not a "Number".Examples Basic usage: isNumber 'a'False isNumber '%'False isNumber '3'TrueASCII '0' through '9' are all numbers:and $ map isNumber ['0'..'9']True-Unicode Roman numerals are "numbers" as well: isNumber 'B'Truebase/Selects Unicode space and separator characters.This function returns + if its argument has one of the following s, or  otherwise:"These classes are defined in the  http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character Database, part of the Unicode standard. The same document defines what is and is not a "Separator".Examples Basic usage:isSeparator 'a'FalseisSeparator '6'FalseisSeparator ' 'TrueWarning: newlines and tab characters are not considered separators.isSeparator '\n'FalseisSeparator '\t'False1But some more exotic characters are (like HTML's  ):isSeparator '\160'True? ? &"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafe baseShow a list (using square brackets and commas), given a function for showing elements. } }!Unsafe '(./hbaseHighly, terribly dangerous coercion from one representation type to another. Misuse of this function can invite the garbage collector to trounce upon your data and then laugh in your face. You don't want this function. Really.ibaseCoerce a value from one type to another, bypassing the type-checker.)There are several legitimate ways to use i: To coerce e.g. Int to HValue, put it in a list of HValue), and then later coerce it back to Int before using it.To produce e.g. (a+b) :~: (b+a) from unsafeCoerce Refl. Here the two sides really are the same type -- so nothing unsafe is happening -- but GHC is not clever enough to see it.In  Data.Typeable we have  eqTypeRep :: forall k1 k2 (a :: k1) (b :: k2). TypeRep a -> TypeRep b -> Maybe (a :~~: b) eqTypeRep a b | sameTypeRep a b = Just (unsafeCoerce HRefl) | otherwise = Nothing Here again, the unsafeCoerce HRefl is safe, because the two types really are the same -- but the proof of that relies on the complex, trusted implementation of Typeable. The "reflection trick", which takes advantanage of the fact that in class C a where { op :: ty }, we can safely coerce between C a and ty (which have different kinds!) because it's really just a newtype. Note: there is no guarantee, at all< that this behavior will be supported into perpetuity.baseThis type is treated magically within GHC. Any pattern match of the form .case unsafeEqualityProof of UnsafeRefl -> body gets transformed just into body. This is ill-typed, but the transformation takes place after type-checking is complete. It is used to implement i". You probably don't want to use  in an expression, but you might conceivably want to pattern-match on it. Use g to create one of these.ghiigh, Trustworthy-./>?baseThis class gives the integer associated with a type-level natural. There are instances of the class for every concrete literal: 0, 1, 2, etc.base Addition of type-level naturals.base&Multiplication of type-level naturals.base&Exponentiation of type-level naturals.baseComparison of type-level naturals, as a function. NOTE: The functionality for this function should be subsumed by , so this might go away in the future. Please let us know, if you encounter discrepancies between the two. base#Subtraction of type-level naturals.base1Comparison of type-level naturals, as a function. base+Division (round down) of natural numbers. Div x 0+ is undefined (i.e., it cannot be reduced). baseModulus of natural numbers. Mod x 0+ is undefined (i.e., it cannot be reduced). base-Log base 2 (round down) of natural numbers. Log 0+ is undefined (i.e., it cannot be reduced).base3Comparison of type-level naturals, as a constraint. base8This type represents unknown type-level natural numbers. base base base6Convert an integer into an unknown type-level natural.baseWe either get evidence that this function was instantiated with the same type-level numbers, or .basebasebasebase67846774- Trustworthy-./>?#baseThis class gives the string associated with a type-level symbol. There are instances of the class for every concrete literal: "hello", etc.base0Comparison of type-level symbols, as a function. baseThe type-level equivalent of .The polymorphic kind of this type allows it to be used in several settings. For instance, it can be used as a constraint, e.g. to provide a better error message for a non-existent instance, 1-- in a context instance TypeError (Text "Cannot } functions." :$$: Text "Perhaps there is a missing argument?") => Show (a -> b) where showsPrec = error "unreachable" It can also be placed on the right-hand side of a type-level function to provide an error for an invalid case, type family ByteSize x where ByteSize Word16 = 2 ByteSize Word8 = 1 ByteSize a = TypeError (Text "The type " :<>: ShowType a :<>: Text " is not exportable.")  base$Concatenation of type-level symbols.baseShow the text as is.base4Put two pieces of error message next to each other.base8Stack two pieces of error message on top of each other.basePretty print the type. ShowType :: k -> ErrorMessagebase%A description of a custom type error.base0This type represents unknown type-level symbols.basebasebasebasebasebase6Convert an integer into an unknown type-level natural.base3Convert a string into an unknown type-level symbol.baseWe either get evidence that this function was instantiated with the same type-level symbols, or .basebasebasebase""65i((c) The University of Glasgow, 1992-2004see libraries/base/LICENSEffi@haskell.orginternalnon-portable (GHC Extensions)Unsafe,qbase=Create a stable pointer referring to the given Haskell value.baseA stable pointer is a reference to a Haskell expression that is guaranteed not to be affected by garbage collection, i.e., it will neither be deallocated nor will the value of the stable pointer itself change during garbage collection (ordinary references may be relocated during garbage collection). Consequently, stable pointers can be passed to foreign code, which can treat it as an opaque reference to a Haskell value.A value of type  StablePtr a5 is a stable pointer to a Haskell expression of type a.baseDissolve the association between the stable pointer and the Haskell value. Afterwards, if the stable pointer is passed to  or , the behaviour is undefined. However, the stable pointer may still be passed to  , but the 7 () value returned by 8, in this case, is undefined (in particular, it may be 7). Nevertheless, the call to  is guaranteed not to diverge.baseObtain the Haskell value referenced by a stable pointer, i.e., the same value that was passed to the corresponding call to . If the argument to  has already been freed using , the behaviour of  is undefined.baseCoerce a stable pointer to an address. No guarantees are made about the resulting value, except that the original stable pointer can be recovered by . In particular, the address may not refer to an accessible memory location and any attempt to pass it to the member functions of the class k leads to undefined behaviour.baseThe inverse of , i.e., we have the identity 0sp == castPtrToStablePtr (castStablePtrToPtr sp)for any stable pointer sp on which ( has not been executed yet. Moreover, > may only be applied to pointers that have been produced by .basej!(c) The FFI task force, 2000-2002see libraries/base/LICENSEffi@haskell.orginternalnon-portable (GHC Extensions) Trustworthy-'  k(c) The FFI task force 2001see libraries/base/LICENSEffi@haskell.org provisionalportable Trustworthy<6baseThe member functions of this class facilitate writing values of primitive types to raw memory (which may have been allocated with the above mentioned routines) and reading values from blocks of raw memory. The class, furthermore, includes support for computing the storage requirements and alignment restrictions of storable types.3Memory addresses are represented as values of type  a , for some a which is an instance of class . The type argument to  helps provide some valuable type safety in FFI code (you can't mix pointers of different types without an explicit cast), while helping the Haskell type system figure out which marshalling method is needed for a given pointer.All marshalling between Haskell and a foreign language ultimately boils down to translating Haskell data structures into the binary representation of a corresponding data structure of the foreign language and vice versa. To code this marshalling in Haskell, it is necessary to manipulate primitive data types stored in unstructured memory blocks. The class  facilitates this manipulation on all types for which it is instantiated, which are the standard basic types of Haskell, the fixed size Int types (, , , ), the fixed size Word types (, , , ), , all types from Foreign.C.Types , as well as .baseComputes the storage requirements (in bytes) of the argument. The value of the argument is not used.baseComputes the alignment constraint of the argument. An alignment constraint x+ is fulfilled by any address divisible by x). The value of the argument is not used.baseRead a value from a memory area regarded as an array of values of the same kind. The first argument specifies the start address of the array and the second the index into the array (the first element of the array has index 0!). The following equality holds, peekElemOff addr idx = IOExts.fixIO $ \result -> peek (addr `plusPtr` (idx * sizeOf result))Note that this is only a specification, not necessarily the concrete implementation of the function.baseWrite a value to a memory area regarded as an array of values of the same kind. The following equality holds: pokeElemOff addr idx x = poke (addr `plusPtr` (idx * sizeOf x)) xbaseRead a value from a memory location given by a base address and offset. The following equality holds: 0peekByteOff addr off = peek (addr `plusPtr` off)baseWrite a value to a memory location given by a base address and offset. The following equality holds: 4pokeByteOff addr off x = poke (addr `plusPtr` off) xbase,Read a value from the given memory location.Note that the peek and poke functions might require properly aligned addresses to function correctly. This is architecture dependent; thus, portable code should ensure that when peeking or poking values of some type a!, the alignment constraint for a, as given by the function  is fulfilled.baseWrite the given value to the given memory location. Alignment restrictions might apply; see .basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase base  7(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy2<@mbaseA signed integral type that can be losslessly converted to and from Ptr2. This type is also compatible with the C99 type intptr_t6, and can be marshalled to and from that type safely.baseAn unsigned integral type that can be losslessly converted to and from Ptr1. This type is also compatible with the C99 type  uintptr_t6, and can be marshalled to and from that type safely.base.Release the storage associated with the given , which must have been obtained from a wrapper stub. This should be called whenever the return value from a foreign import wrapper function is no longer required; otherwise, the storage it uses will leak.basecasts a Ptr to a WordPtrbasecasts a WordPtr to a Ptrbasecasts a Ptr to an IntPtrbase casts an IntPtr to a Ptrl(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy2<Obase Haskell type representing the C jmp_buf type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C fpos_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C FILE type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C  suseconds_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C  useconds_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C time_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C clock_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C  sig_atomic_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C wchar_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C size_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C  ptrdiff_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C double type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C float type. (The concrete types of Foreign.C.Types#platform are platform-specific.) base Haskell type representing the C bool type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C unsigned long long type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C  long long type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C  unsigned long type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C long type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C  unsigned int type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C int type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C unsigned short type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C short type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C  unsigned char type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C  signed char type. (The concrete types of Foreign.C.Types#platform are platform-specific.)base Haskell type representing the C char type. (The concrete types of Foreign.C.Types#platform are platform-specific.)77"(c) The University of Glasgow 2005/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable TrustworthyV3baseThe  type allows you to reverse sort order conveniently. A value of type  a contains a value of type a (represented as  a). If a has an x instance associated with it then comparing two values thus wrapped will give you the opposite of their normal sort order. This is particularly useful when sorting in generalised list comprehensions, as in: then sortWith by  xbasebase %comparing p x y = compare (p x) (p y)2Useful combinator for use in conjunction with the xxxBy family of functions from  Data.List, for example:  ... sortBy (comparing fst) ... base base basebasebaseThis instance would be equivalent to the derived instances of the  newtype if the  field were removedbaseThis instance would be equivalent to the derived instances of the  newtype if the  field were removedbase base base basebasebasebasebasebasebasebasebasebasebasebasebasex: x: +(c) Universiteit Utrecht 2010-2011, University of Oxford 2012-2014see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy'(./258>?~vbaseRepresentable types of kind *+. This class is derivable in GHC with the  DeriveGeneric flag on.A * instance must satisfy the following laws:  .  D   .  D  baseRepresentable types of kind * -> * (or kind k -> *, when  PolyKinds8 is enabled). This class is derivable in GHC with the  DeriveGeneric flag on.A * instance must satisfy the following laws:  .  D   .  D  base,Class for datatypes that represent datatypesbase4Class for datatypes that represent data constructorsbase*Class for datatypes that represent recordsbase-Void: used for datatypes without constructorsbase-Unit: used for constructors without argumentsbase-Used for marking occurrences of the parameterbaseRecursive calls of kind * -> * (or kind k -> *, when  PolyKinds is enabled)base7Constants, additional parameters and recursion of kind *base*Meta-information (constructor names, etc.)base(Sums: encode choice between constructorsbase3Products: encode multiple arguments to constructorsbaseComposition of functorsbaseTag for K1: recursion (of kind Type)baseTag for M1: datatypebaseTag for M1: constructorbaseTag for M1: record selectorbase-Type synonym for encoding recursion (of kind Type)base8Type synonym for encoding meta-information for datatypesbase;Type synonym for encoding meta-information for constructorsbase?Type synonym for encoding meta-information for record selectorsbaseGeneric representation typebaseGeneric representation type baseConstants of unlifted kinds baseType synonym for   baseType synonym for   baseType synonym for   baseType synonym for   baseType synonym for   baseType synonym for  7baseThe 7 class is essentially a kind class. It classifies all kinds for which singletons are defined. The class supports converting between a singleton type and the base (unrefined) type which it is built from.7baseGet a base type from a proxy for the promoted kind. For example, DemoteRep Bool will be the type Bool.7base-Convert a singleton to its unrefined version.7baseA 7: constraint is essentially an implicitly-passed singleton.7base;Produce the singleton explicitly. You will likely need the ScopedTypeVariables0 extension to use this method the way you want.7base'The singleton kind-indexed data family. base;Datatype to represent metadata associated with a datatype (MetaData), constructor (MetaCons), or field selector (MetaSel).In MetaData n m p nt, n is the datatype's name, m4 is the module in which the datatype is defined, p9 is the package in which the datatype is defined, and nt is 'True if the datatype is a newtype.In MetaCons n f s, n is the constructor's name, f is its fixity, and s is 'True. if the constructor contains record selectors.In MetaSel mn su ss ds(, if the field uses record syntax, then mn is  the record name. Otherwise, mn is . su and ss are the field's unpackedness and strictness annotations, and ds4 is the strictness that GHC infers for the field.base/Convert from the datatype to its representationbase/Convert from the representation to the datatypebase/Convert from the datatype to its representationbase/Convert from the representation to the datatypebaseThe name of the selector base/The selector's unpackedness annotation (if any) base-The selector's strictness annotation (if any) base:The strictness that the compiler inferred for the selector baseThe strictness that GHC infers for a field during compilation. Whereas there are nine different combinations of  and , the strictness that GHC decides will ultimately be one of lazy, strict, or unpacked. What GHC decides is affected both by what the user writes in the source code and by GHC flags. As an example, consider this data type: 9data E = ExampleConstructor {-# UNPACK #-} !Int !Int Int If compiled without optimization or other language extensions, then the fields of ExampleConstructor will have ,  , and , respectively.If compiled with  -XStrictData' enabled, then the fields will have , , and , respectively.If compiled with -O2$ enabled, then the fields will have , , and , respectively. baseThe strictness of a field as the user wrote it in the source code. For example, in the following data type: *data E = ExampleConstructor Int ~Int !Int The fields of ExampleConstructor have , , and , respectively. baseThe unpackedness of a field as the user wrote it in the source code. For example, in the following data type: data E = ExampleConstructor Int {-# NOUNPACK #-} Int {-# UNPACK #-} Int The fields of ExampleConstructor have , , and , respectively.base8Datatype to represent the associativity of a constructor baseThis variant of  appears at the type level.baseDatatype to represent the fixity of a constructor. An infix | declaration directly corresponds to an application of .baseThe name of the constructorbaseThe fixity of the constructorbase%Marks if this constructor is a recordbase&The name of the datatype (unqualified)baseThe fully-qualified name of the module where the type is declared base9The package name of the module where the type is declaredbase+Marks if the datatype is actually a newtypebase%Get the precedence of a fixity value.7 base Used for marking occurrences of 7 base Used for marking occurrences of 7 base Used for marking occurrences of 7 base Used for marking occurrences of 7 base Used for marking occurrences of 7 base Used for marking occurrences of  base base base base base base base base base base base base base base base base base base base basebase base base base base base base base base base base base base base base base base base base base base base base base basebase base base base base base base basebasebasebasebase base base base base base basebasebasebasebase basebasebasebasebase basebasebasebasebase basebasebasebasebase basebasebasebasebase basebasebasebasebase base base base base base base base base base base base base base base base base base base base base basebasebasebasebasebasebasebasebase base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base base7 base7base7base7base7base7base7base7base7base7base7base7base7base7base7base7 base7base7base7base7base7base7base7base7base7base7base7base7base7base7base7base7 base7 base7 base7base7 base7base7 base7base7 base7base7 base7base7 base7base7 base7base7 base7 base7 base7 base7 base7 base7 base7 base7 base7 base7 base7 base7base7base7 base7 base7 base5676None.8n baseThis is a valid definition of   for an idempotent .When mappend x x = x<, this definition should be preferred, because it works in \mathcal{O}(1) rather than \mathcal{O}(\log n)base Monoid under  .'getAlt (Alt (Just 12) <> Alt (Just 24))Just 12%getAlt $ Alt Nothing <> Alt (Just 24)Just 24baseMonoid under multiplication.-getProduct (Product 3 <> Product 4 <> mempty)12baseMonoid under addition.!getSum (Sum 1 <> Sum 2 <> mempty)3base"Boolean monoid under disjunction ( ).(getAny (Any True <> mempty <> Any False)True7getAny (mconcat (map (\x -> Any (even x)) [2,4,6,7,8]))Truebase"Boolean monoid under conjunction ( ).(getAll (All True <> mempty <> All False)False7getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8]))Falsebase.The monoid of endomorphisms under composition.6let computation = Endo ("Hello, " ++) <> Endo (++ "!")appEndo computation "Haskell""Hello, Haskell!"baseThe dual of a (, obtained by swapping the arguments of Z./getDual (mappend (Dual "Hello") (Dual "World")) "WorldHello"baseThis is a valid definition of   for an idempotent .When  x <> x = x<, this definition should be preferred, because it works in \mathcal{O}(1) rather than \mathcal{O}(\log n).baseThis is a valid definition of   for a .!Unlike the default definition of  , it is defined for 0 and so it should be preferred where possible.7base7base7base7base7 base7base7 base7base7 base8base8 base8base8base8base8base8 base8base8base8base8base8 base8base8 base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base8base888 (c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy.8* base*This data type witnesses the lifting of a  into an  pointwise.base7Maybe monoid returning the rightmost non-Nothing value. a is isomorphic to  ( a), and thus to  (  a)getLast (Last (Just "hello") <> Last Nothing <> Last (Just "world")) Just "world"Use of this type is discouraged. Note the following equivalence: 4Data.Monoid.Last x === Maybe (Data.Semigroup.Last x)In addition to being equivalent in the structural sense, the two also have  instances that behave the same. This type will be marked deprecated in GHC 8.8, and removed in GHC 8.10. Users are advised to use the variant from Data.Semigroup and wrap it in .base6Maybe monoid returning the leftmost non-Nothing value. a is isomorphic to   a , but precedes it historically.getFirst (First (Just "hello") <> First Nothing <> First (Just "world")) Just "hello"Use of this type is discouraged. Note the following equivalence: 6Data.Monoid.First x === Maybe (Data.Semigroup.First x)In addition to being equivalent in the structural sense, the two also have  instances that behave the same. This type will be marked deprecated in GHC 8.8, and removed in GHC 8.10. Users are advised to use the variant from Data.Semigroup and wrap it in .base basebase base base!Note that even if the underlying w and ! instances are lawful, for most s, this instance will not be lawful. If you use this instance with the list ., the following customary laws will not hold:Commutativity:Ap [10,20] + Ap [1,2]Ap {getAp = [11,12,21,22]}Ap [1,2] + Ap [10,20]Ap {getAp = [11,21,12,22]}Additive inverse:Ap [] + negate (Ap [])Ap {getAp = []}fromInteger 0 :: Ap [] IntAp {getAp = [0]}Distributivity:Ap [1,2] * (3 + 4)Ap {getAp = [7,14]}(Ap [1,2] * 3) + (Ap [1,2] * 4)Ap {getAp = [7,11,10,14]} base base base base base base base base base base base base base basebasebasebasebasebasebasebasebasebasebasebasebasebasebase8 base8 base8base8base8base8base#XYZ[#YZ[X"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable TrustworthybaseThe  function drops the largest suffix of a list in which the given predicate holds for all elements. For example:dropWhileEnd isSpace "foo\n""foo"dropWhileEnd isSpace "foo bar" "foo bar" dropWhileEnd isSpace ("foo\n" ++ undefined) == "foo" ++ undefinedbase\mathcal{O}(\min(m,n)). The : function drops the given prefix from a list. It returns 6 if the list did not start with the prefix given, or ' the list after the prefix, if it does.stripPrefix "foo" "foobar" Just "bar"stripPrefix "foo" "foo"Just ""stripPrefix "foo" "barfoo"NothingstripPrefix "foo" "barfoobaz"NothingbaseThe  function returns the index of the first element in the given list which is equal (by 9) to the query element, or  if there is no such element.elemIndex 4 [0..]Just 4baseThe  function extends , by returning the indices of all elements equal to the query element, in ascending order.elemIndices 'o' "Hello World"[4,7]baseThe  function takes a predicate and a list and returns the first element in the list matching the predicate, or  if there is no such element.find (> 4) [1..]Just 5find (< 0) [1..10]NothingbaseThe  function takes a predicate and a list and returns the index of the first element in the list satisfying the predicate, or  if there is no such element. findIndex isSpace "Hello World!"Just 5baseThe  function extends , by returning the indices of all elements satisfying the predicate, in ascending order.+findIndices (`elem` "aeiou") "Hello World!"[1,4,7]base\mathcal{O}(\min(m,n)). The ' function takes two lists and returns . iff the first list is a prefix of the second.#"Hello" `isPrefixOf` "Hello World!"True#"Hello" `isPrefixOf` "Wello Horld!"FalsebaseThe & function takes two lists and returns  iff the first list is a suffix of the second. The second list must be finite.!"ld!" `isSuffixOf` "Hello World!"True#"World" `isSuffixOf` "Hello World!"FalsebaseThe & function takes two lists and returns  iff the first list is contained, wholly and intact, anywhere within the second.,isInfixOf "Haskell" "I really like Haskell."True(isInfixOf "Ial" "I really like Haskell."Falsebase\mathcal{O}(n^2). The  function removes duplicate elements from a list. In particular, it keeps only the first occurrence of each element. (The name + means `essence'.) It is a special case of , which allows the programmer to supply their own equality test.nub [1,2,3,4,3,2,1,2,4,3,5] [1,2,3,4,5]baseThe  function behaves just like , except it uses a user-supplied equality predicate instead of the overloaded 9 function..nubBy (\x y -> mod x 3 == mod y 3) [1,2,4,5,6][1,2,6]base\mathcal{O}(n).  x! removes the first occurrence of x& from its list argument. For example,delete 'a' "banana""bnana"It is a special case of , which allows the programmer to supply their own equality test.base\mathcal{O}(n). The  function behaves like 0, but takes a user-supplied equality predicate.deleteBy (<=) 4 [1..10][1,2,3,5,6,7,8,9,10]baseThe  function is list difference (non-associative). In the result of xs  ys+, the first occurrence of each element of ys( in turn (if any) has been removed from xs. Thus (xs ++ ys) \\ xs == ys."Hello World!" \\ "ell W" "Hoorld!"It is a special case of , which allows the programmer to supply their own equality test.baseThe  function returns the list union of the two lists. For example,"dog" `union` "cow""dogcw"Duplicates, and elements of the first list, are removed from the the second list, but if the first list contains duplicates, so will the result. It is a special case of , which allows the programmer to supply their own equality test.baseThe + function is the non-overloaded version of .baseThe  function takes the list intersection of two lists. For example,[1,2,3,4] `intersect` [2,4,6,8][2,4]:If the first list contains duplicates, so will the result.![1,2,2,3,4] `intersect` [6,4,4,2][2,2,4]It is a special case of , which allows the programmer to supply their own equality test. If the element is found in both the first and the second list, the element from the first list will be used.baseThe + function is the non-overloaded version of .base\mathcal{O}(n). The  function takes an element and a list and `intersperses' that element between the elements of the list. For example,intersperse ',' "abcde" "a,b,c,d,e"base xs xss is equivalent to ( ( xs xss)). It inserts the list xs in between the lists in xss and concatenates the result.,intercalate ", " ["Lorem", "ipsum", "dolor"]"Lorem, ipsum, dolor"baseThe  function transposes the rows and columns of its argument. For example,transpose [[1,2,3],[4,5,6]][[1,4],[2,5],[3,6]]If some of the rows are shorter than the following rows, their elements are skipped:&transpose [[10,11],[20],[],[30,31,32]][[10,20,30],[11,31],[32]]baseThe  function takes a predicate a list and returns the pair of lists of elements which do and do not satisfy the predicate, respectively; i.e., 4partition p xs == (filter p xs, filter (not . p) xs))partition (`elem` "aeiou") "Hello World!"("eoo","Hll Wrld!")baseThe ( function behaves like a combination of * and ; it applies a function to each element of a list, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new list.baseThe ( function behaves like a combination of * and ; it applies a function to each element of a list, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new list.base\mathcal{O}(n). The  function takes an element and a list and inserts the element into the list at the first position where it is less than or equal to the next element. In particular, if the list is sorted before the call, the result will also be sorted. It is a special case of , which allows the programmer to supply their own comparison function.insert 4 [1,2,3,5,6,7][1,2,3,4,5,6,7]base\mathcal{O}(n) . The non-overloaded version of .baseThe  function takes a comparison function and a list and returns the greatest element of the list by the comparison function. The list must be finite and non-empty.4We can use this to find the longest entry of a list:maximumBy (\x y -> compare (length x) (length y)) ["Hello", "World", "!", "Longest", "bar"] "Longest"baseThe  function takes a comparison function and a list and returns the least element of the list by the comparison function. The list must be finite and non-empty.5We can use this to find the shortest entry of a list:minimumBy (\x y -> compare (length x) (length y)) ["Hello", "World", "!", "Longest", "bar"]"!"base\mathcal{O}(n). The ' function is an overloaded version of ). In particular, instead of returning an /, it returns any type which is an instance of w'. It is, however, less efficient than .genericLength [1, 2, 3] :: Int3 genericLength [1, 2, 3] :: Float3.0baseThe & function is an overloaded version of , which accepts any s) value as the number of elements to take.baseThe & function is an overloaded version of , which accepts any s) value as the number of elements to drop.baseThe & function is an overloaded version of , which accepts any s) value as the position at which to split.baseThe & function is an overloaded version of , which accepts any s value as the index.baseThe & function is an overloaded version of , which accepts any s, value as the number of repetitions to make.baseThe  function takes four lists and returns a list of quadruples, analogous to . It is capable of list fusion, but it is restricted to its first list argument and its resulting list.baseThe  function takes five lists and returns a list of five-tuples, analogous to . It is capable of list fusion, but it is restricted to its first list argument and its resulting list.baseThe  function takes six lists and returns a list of six-tuples, analogous to . It is capable of list fusion, but it is restricted to its first list argument and its resulting list.baseThe  function takes seven lists and returns a list of seven-tuples, analogous to . It is capable of list fusion, but it is restricted to its first list argument and its resulting list.baseThe  function takes a function which combines four elements, as well as four lists and returns a list of their point-wise combination, analogous to . It is capable of list fusion, but it is restricted to its first list argument and its resulting list.baseThe  function takes a function which combines five elements, as well as five lists and returns a list of their point-wise combination, analogous to . It is capable of list fusion, but it is restricted to its first list argument and its resulting list.baseThe  function takes a function which combines six elements, as well as six lists and returns a list of their point-wise combination, analogous to . It is capable of list fusion, but it is restricted to its first list argument and its resulting list.baseThe  function takes a function which combines seven elements, as well as seven lists and returns a list of their point-wise combination, analogous to . It is capable of list fusion, but it is restricted to its first list argument and its resulting list.baseThe  function takes a list of quadruples and returns four lists, analogous to .baseThe  function takes a list of five-tuples and returns five lists, analogous to .baseThe  function takes a list of six-tuples and returns six lists, analogous to .baseThe  function takes a list of seven-tuples and returns seven lists, analogous to .baseThe  function takes a predicate and two lists and returns the first list with the first occurrence of each element of the second list removed.baseThe  function takes a list and returns a list of lists such that the concatenation of the result is equal to the argument. Moreover, each sublist in the result contains only equal elements. For example,group "Mississippi"$["M","i","ss","i","ss","i","pp","i"]It is a special case of , which allows the programmer to supply their own equality test.baseThe + function is the non-overloaded version of .baseThe  function returns all initial segments of the argument, shortest first. For example, inits "abc"["","a","ab","abc"] Note that ) has the following strictness property: #inits (xs ++ _|_) = inits xs ++ _|_In particular, inits _|_ = [] : _|_base\mathcal{O}(n). The  function returns all final segments of the argument, longest first. For example, tails "abc"["abc","bc","c",""] Note that ) has the following strictness property: tails _|_ = _|_ : _|_baseThe ? function returns the list of all subsequences of the argument.subsequences "abc"%["","a","b","ab","c","ac","bc","abc"]8baseThe 8 function returns the list of all subsequences of the argument, except for the empty list.nonEmptySubsequences "abc""["a","b","ab","c","ac","bc","abc"]baseThe ? function returns the list of all permutations of the argument.permutations "abc"%["abc","bac","cba","bca","cab","acb"]baseThe  function implements a stable sorting algorithm. It is a special case of , which allows the programmer to supply their own comparison function.Elements are arranged from lowest to highest, keeping duplicates in the order they appeared in the input.sort [1,6,4,3,2,5] [1,2,3,4,5,6]baseThe + function is the non-overloaded version of .sortBy (\(a,_) (b,_) -> compare a b) [(2, "world"), (4, "!"), (1, "Hello")]![(1,"Hello"),(2,"world"),(4,"!")]baseSort a list by comparing the results of a key function applied to each element. sortOn f is equivalent to sortBy (comparing f)8, but has the performance advantage of only evaluating f once for each element in the input list. This is called the decorate-sort-undecorate paradigm, or Schwartzian transform.Elements are arranged from from lowest to highest, keeping duplicates in the order they appeared in the input.1sortOn fst [(2, "world"), (4, "!"), (1, "Hello")]![(1,"Hello"),(2,"world"),(4,"!")]baseProduce singleton list.singleton True[True]baseThe  function is a `dual' to : while % reduces a list to a summary value,  builds a list from a seed value. The function takes the element and returns . if it is done producing the list or returns  (a,b), in which case, a is a prepended to the list and b is used as the next element in a recursive call. For example, *iterate f == unfoldr (\x -> Just (x, f x))In some cases,  can undo a  operation: unfoldr f' (foldr f z xs) == xsif the following holds: ,f' (f x y) = Just (x,y) f' z = NothingA simple use of unfoldr: if b == 0 then Nothing else Just (b, b-1)) 10[10,9,8,7,6,5,4,3,2,1]base breaks a string up into a list of strings at newline characters. The resulting strings do not contain newlines.Note that after splitting the string at newline characters, the last part of the string is considered a line even if it doesn't end with a newline. For example,lines ""[] lines "\n"[""] lines "one"["one"] lines "one\n"["one"]lines "one\n\n" ["one",""]lines "one\ntwo" ["one","two"]lines "one\ntwo\n" ["one","two"]Thus  s3 contains at least as many elements as newlines in s.base is an inverse operation to . It joins lines, after appending a terminating newline to each.unlines ["Hello", "World", "!"]"Hello\nWorld\n!\n"base breaks a string up into a list of words, which were delimited by white space.words "Lorem ipsum\ndolor"["Lorem","ipsum","dolor"]base is an inverse operation to ). It joins words with separating spaces.#unwords ["Lorem", "ipsum", "dolor"]"Lorem ipsum dolor"*5m"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafeԤ**)Ross Paterson 20054BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportable Trustworthy27>base#Data structures that can be folded.For example, given a data type 7data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)a suitable instance would be instance Foldable Tree where foldMap f Empty = mempty foldMap f (Leaf x) = f x foldMap f (Node l k r) = foldMap f l `mappend` f k `mappend` foldMap f rThis is suitable even for abstract types, as the monoid is assumed to satisfy the monoid laws. Alternatively, one could define foldr: instance Foldable Tree where foldr f z Empty = z foldr f z (Leaf x) = f x z foldr f z (Node l k r) = foldr f (f k (foldr f z r)) lFoldable6 instances are expected to satisfy the following laws: /foldr f z t = appEndo (foldMap (Endo . f) t ) z foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z fold = foldMap id *length = getSum . foldMap (Sum . const 1)sum, product, maximum, and minimum* should all be essentially equivalent to foldMap forms, such as sum = getSum . foldMap Sumbut may be less defined.If the type is also a v instance, it should satisfy foldMap f = fold . fmap fwhich implies that $foldMap f . fmap g = foldMap (f . g)base3Combine the elements of a structure using a monoid.Examples Basic usage:!fold [[1, 2, 3], [4, 5], [6], []] [1,2,3,4,5,6]fold [Sum 1, Sum 3, Sum 5]Sum {getSum = 9}$Infinite structures never terminate:fold (repeat Nothing)* Hangs forever *baseMap each element of the structure to a monoid, and combine the results.Examples Basic usage:foldMap Sum [1, 3, 5]Sum {getSum = 9}foldMap Product [1, 3, 5]Product {getProduct = 15}foldMap (replicate 3) [1, 2, 3][1,1,1,2,2,2,3,3,3]$Infinite structures never terminate:foldMap Sum [1..]* Hangs forever * base A variant of # that is strict in the accumulator.base&Right-associative fold of a structure.In the case of lists, , when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left: foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)Note that, since the head of the resulting expression is produced by an application of the operator to the first element of the list, < can produce a terminating expression from an infinite list.For a general 5 structure this should be semantically identical to,  foldr f z =  f z . Examples Basic usage:%foldr (||) False [False, True, False]Truefoldr (||) False []Falsefoldr (\nextChar reversedString -> reversedString ++ [nextChar]) "foo" ['a', 'b', 'c', 'd'] "foodcba"Infinite structures M Applying 2 to infinite structures usually doesn't terminate.:It may still terminate in one of the following conditions:(the folding function is short-circuiting3the folding function is lazy on its second argumentShort-circuiting'(||)' short-circuits on 8 values, so the following terminates because there is a ' value finitely far from the left side:&foldr (||) False (True : repeat False)True$But the following doesn't terminate:)foldr (||) False (repeat False ++ [True])* Hangs forever *Laziness in the second argument Applying  to infinite structures terminates when the folding function is lazy on its second argument:foldr (\nextElement accumulator -> nextElement : fmap (+3) accumulator) [42] (repeat 1)-[1,4,7,10,13,16,19,22,25,28,31,34,37,40,43...take 5 $ foldr (\nextElement accumulator -> nextElement : fmap (+3) accumulator) [42] (repeat 1) [1,4,7,10,13]baseRight-associative fold of a structure, but with strict application of the operator.base%Left-associative fold of a structure.In the case of lists, , when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right: foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xnNote that to produce the outermost application of the operator the entire input list must be traversed. This means that ) will diverge if given an infinite list.Also note that if you want an efficient left-fold, you probably want to use  instead of . The reason for this is that latter does not force the "inner" results (e.g. z `f` x1 in the above example) before applying them to the operator (e.g. to (`f` x2)"). This results in a thunk chain \mathcal{O}(n) elements long, which then must be evaluated from the outside-in.For a general 5 structure this should be semantically identical to,  foldl f z =  f z . Examples Basic usage:6foldl (+) 42 (Node (Leaf 1) 3 (Node Empty 4 (Leaf 2)))52foldl (+) 42 Empty42foldl (\string nextElement -> nextElement : string) "abcd" (Node (Leaf 'd') 'e' (Node Empty 'f' (Leaf 'g'))) "gfedabcd"2Left-folding infinite structures never terminates:let infiniteNode = Node Empty 1 infiniteNode in foldl (+) 42 infiniteNode* Hangs forever *Evaluating the head of the result (when applicable) does not terminate, unlike :let infiniteNode = Node Empty 'd' infiniteNode in take 5 (foldl (\string nextElement -> nextElement : string) "abc" infiniteNode)* Hangs forever *baseLeft-associative fold of a structure but with strict application of the operator.This ensures that each step of the fold is forced to weak head normal form before being applied, avoiding the collection of thunks that would otherwise occur. This is often what you want to strictly reduce a finite list to a single, monolithic result (e.g. ).For a general 5 structure this should be semantically identical to,  foldl' f z =  f z . base A variant of  that has no base case, and thus may only be applied to non-empty structures.M This function is non-total and will raise a runtime exception if the structure happens to be empty.Examples Basic usage:foldr1 (+) [1..4]10 foldr1 (+) []%Exception: Prelude.foldr1: empty listfoldr1 (+) Nothing&*** Exception: foldr1: empty structurefoldr1 (-) [1..4]-2%foldr1 (&&) [True, False, True, True]False&foldr1 (||) [False, False, True, True]Truefoldr1 (+) [1..]* Hangs forever *base A variant of  that has no base case, and thus may only be applied to non-empty structures.M This function is non-total and will raise a runtime exception if the structure happens to be empty.  f =  f . Examples Basic usage:foldl1 (+) [1..4]10 foldl1 (+) [])*** Exception: Prelude.foldl1: empty listfoldl1 (+) Nothing&*** Exception: foldl1: empty structurefoldl1 (-) [1..4]-8%foldl1 (&&) [True, False, True, True]False&foldl1 (||) [False, False, True, True]Truefoldl1 (+) [1..]* Hangs forever *base4List of elements of a structure, from left to right.Examples Basic usage:toList Nothing[]toList (Just 42)[42]toList (Left "foo")[]2toList (Node (Leaf 5) 17 (Node Empty 12 (Leaf 8))) [5,17,12,8] For lists,  is the identity:toList [1, 2, 3][1,2,3]baseTest whether the structure is empty. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.Examples Basic usage:null []Truenull [1]False) terminates even for infinite structures: null [1..]Falsebase4Returns the size/length of a finite structure as an . The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.Examples Basic usage: length []0length ['a', 'b', 'c']3 length [1..]* Hangs forever *base(Does the element occur in the structure?Note:  is often used in infix form.Examples Basic usage: 3 `elem` []False3 `elem` [1,2]False3 `elem` [1,2,3,4,5]TrueFor infinite structures,  terminates if the value exists at a finite distance from the left side of the structure:3 `elem` [1..]True3 `elem` ([4..] ++ [3])* Hangs forever *base-The largest element of a non-empty structure.M This function is non-total and will raise a runtime exception if the structure happens to be empty.Examples Basic usage:maximum [1..10]10 maximum []**** Exception: Prelude.maximum: empty listmaximum Nothing'*** Exception: maximum: empty structurebase+The least element of a non-empty structure.M This function is non-total and will raise a runtime exception if the structure happens to be emptyExamples Basic usage:minimum [1..10]1 minimum []**** Exception: Prelude.minimum: empty listminimum Nothing'*** Exception: minimum: empty structurebaseThe 9 function computes the sum of the numbers of a structure.Examples Basic usage:sum []0sum [42]42 sum [1..10]55sum [4.1, 2.0, 1.7]7.8 sum [1..]* Hangs forever *baseThe > function computes the product of the numbers of a structure.Examples Basic usage: product []1 product [42]42product [1..10]3628800product [4.1, 2.0, 1.7]13.939999999999998 product [1..]* Hangs forever *baseMonadic fold over the elements of a structure, associating to the right, i.e. from right to left.Examples Basic usage:foldrM (\string acc -> print string >> pure (acc + length string)) 42 ["Hello", "world", "!"]"!""world""Hello"53baseMonadic fold over the elements of a structure, associating to the left, i.e. from left to right.Examples Basic usage:foldlM (\acc string -> print string >> pure (acc + length string)) 42 ["Hello", "world", "!"]"Hello""world""!"53baseMap each element of a structure to an action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see *.Examples Basic usage:'traverse_ print ["Hello", "world", "!"]"Hello""world""!"base is  with its arguments flipped. For a version that doesn't ignore the results see *.Examples Basic usage:for_ [1..4] print1234baseMap each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see *.As of base 4.8.0.0,  is just , specialized to t.base is  with its arguments flipped. For a version that doesn't ignore the results see *.As of base 4.8.0.0,  is just , specialized to t.baseEvaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see *.Examples Basic usage:4sequenceA_ [print "Hello", print "world", print "!"]"Hello""world""!"baseEvaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see *.As of base 4.8.0.0,  is just , specialized to t.base1The sum of a collection of actions, generalizing .Examples Basic usage:*asum [Just "Hello", Nothing, Just "World"] Just "Hello"base1The sum of a collection of actions, generalizing . As of base 4.8.0.0,  is just , specialized to  .base>The concatenation of all the elements of a container of lists.Examples Basic usage:concat (Just [1, 2, 3])[1,2,3]concat (Node (Leaf [1, 2, 3]) [4, 5] (Node Empty [6] (Leaf []))) [1,2,3,4,5,6]baseMap a function over all the elements of a container and concatenate the resulting lists.Examples Basic usage:5concatMap (take 3) [[1..], [10..], [100..], [1000..]]+[1,2,3,10,11,12,100,101,102,1000,1001,1002]3concatMap (take 3) (Node (Leaf [1..]) [10..] Empty)[1,2,3,10,11,12]base returns the conjunction of a container of Bools. For the result to be  , the container must be finite; , however, results from a & value finitely far from the left end.Examples Basic usage:and []True and [True]True and [False]Falseand [True, True, False]Falseand (False : repeat True) -- Infinite list [False,True,True,True,True,True,True...Falseand (repeat True)* Hangs forever *base returns the disjunction of a container of Bools. For the result to be  , the container must be finite; , however, results from a & value finitely far from the left end.Examples Basic usage:or []False or [True]True or [False]Falseor [True, True, False]Trueor (True : repeat False) -- Infinite list [True,False,False,False,False,False,False...Trueor (repeat False)* Hangs forever *baseDetermines whether any element of the structure satisfies the predicate.Examples Basic usage: any (> 3) []Falseany (> 3) [1,2]Falseany (> 3) [1,2,3,4,5]Trueany (> 3) [1..]Trueany (> 3) [0, -1..]* Hangs forever *baseDetermines whether all elements of the structure satisfy the predicate.Examples Basic usage: all (> 3) []Trueall (> 3) [1,2]Falseall (> 3) [1,2,3,4,5]Falseall (> 3) [1..]Falseall (> 3) [4..]* Hangs forever *baseThe largest element of a non-empty structure with respect to the given comparison function.Examples Basic usage:maximumBy (compare `on` length) ["Hello", "World", "!", "Longest", "bar"] "Longest"baseThe least element of a non-empty structure with respect to the given comparison function.Examples Basic usage:minimumBy (compare `on` length) ["Hello", "World", "!", "Longest", "bar"]"!"base is the negation of .Examples Basic usage:3 `notElem` []True3 `notElem` [1,2]True3 `notElem` [1,2,3,4,5]FalseFor infinite structures,  terminates if the value exists at a finite distance from the left side of the structure:3 `notElem` [1..]False3 `notElem` ([4..] ++ [3])* Hangs forever *baseThe  function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or  if there is no such element.Examples Basic usage:find (> 42) [0, 5..]Just 456find (> 4) (Node (Leaf 3) 17 (Node Empty 12 (Leaf 8)))Just 17find (> 12) [1..7]Nothing base base basebasebasebasebasebasebasebasebasebase basebasebase base base base base base base base base base base base base base base base&&44n$Conor McBride and Ross Paterson 20054BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportable Trustworthy.8baseThe  functor.basebasebasebaseThis instance would be equivalent to the derived instances of the  newtype if the  field were removedbaseThis instance would be equivalent to the derived instances of the  newtype if the  field were removed base base base base base base base base base base base base base base base base base8 base8 base"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy(-(c) The University of Glasgow, CWI 2001--2011/BSD-style (see the file libraries/base/LICENSE) Trustworthy&'(-./2>&w!VbaseConstruct a representation for a type constructor applied at a monomorphic kind.Note that this is unsafe as it allows you to construct ill-kinded types.8baseConstruct a representation for a type application that is NOT a saturated arrow type. This is not checked!8baseUsed to make ` instance for things of kind Nat8baseUsed to make `# instance for things of kind Symbol8baseFor compiler use.base The class > allows a concrete representation of a type to be calculated.base4A concrete representation of a (monomorphic) type. ( supports reasonably efficient equality.base"A non-indexed type representation.8base(A helper to satisfy the type checker in .8base:Invariant: Saturated arrow types (e.g. things of the form a -> b) are represented with 8 a b, not TrApp (TrApp funTyCon a) b.8base TrFun fpr a b represents a function type a -> b. We use this for the sake of efficiency as functions are quite ubiquitous.basePattern match on a type constructor including its instantiated kind variables. For instance, 8App (Con' proxyTyCon ks) intRep = typeRep @(Proxy @Int) will bring into scope, /proxyTyCon :: TyCon ks == [someTypeRep -Type] :: [SomeTypeRep] intRep == typeRep Int base#Pattern match on a type constructorbaseA type application. For instance, =typeRep @(Maybe Int) === App (typeRep @Maybe) (typeRep @Int) /Note that this will also match a function type, typeRep @(Int# -> Char) === App (App arrow (typeRep @Int#)) (typeRep @Char) where 6arrow :: TypeRep ((->) :: TYPE IntRep -> Type -> Type).baseThe function type constructor. For instance, >typeRep @(Int -> Char) === Fun (typeRep @Int) (typeRep @Char) baseHelper to fully evaluate  for use as  NFData(rnf) implementationbase Observe the  of a type representation8baseConstruct a representation for a type application that may be a saturated arrow type. This is renamed to mkTrApp in Type.Reflection.UnsafebaseUse a  as  evidence.baseObserve the type constructor of a quantified type representation.base5Observe the type constructor of a type representation base Type equalitybaseObserve the kind of a type.8baseIs a type of the form TYPE rep?baseTakes a value of type a5 and returns a concrete representation of that type.baseHelper to fully evaluate  for use as  NFData(rnf) implementation baseHelper to fully evaluate  for use as  NFData(rnf) implementation8baseExquisitely unsafe.baseExquisitely unsafe.8baseAn internal function, to make representations for type literals.8 base8base8base8base package namebase module namebase the name of the type constructorbasenumber of kind variablesbasekind representationbase A unique  objectbase package namebase module namebase the name of the type constructorbasenumber of kind variablesbasekind representationbase A unique  object Used when the strings are dynamically allocated, eg from binary deserialisation8base package namebase module namebase tycon name98V8888888(-(c) The University of Glasgow, CWI 2001--2017/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental2non-portable (requires GADTs and compiler support) Trustworthy'  o-(c) The University of Glasgow, CWI 2001--2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy '(-.-base!A quantified type representation.base6Observe a type representation for the type of a value.baseTakes a value of type a5 and returns a concrete representation of that type.baseShow a type representationbaseThe type-safe cast operationbase*Extract a witness of equality of two typesbase8A flexible variation parameterised in a type constructorbase Cast over k1 -> k2base Cast over k1 -> k2 -> k3base,Applies a type to a function type. Returns: Just u6 if the first argument represents a function of type t -> u8 and the second argument represents a function of type t. Otherwise, returns Nothing.baseBuild a function type.baseSplits a type constructor application. Note that if the type constructor is polymorphic, this will not return the kinds that were used.base3Observe the argument types of a type representationbaseObserve the type constructor of a quantified type representation.baseTakes a value of type a5 and returns a concrete representation of that type.baseForce a  to normal form.$$@((c) The University of Glasgow, 1998-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy#$= baseThe  SomeException type is the root of the exception type hierarchy. When an exception of type e6 is thrown, behind the scenes it is encapsulated in a  SomeException.baseArithmetic exceptions.basebaseAny type that you wish to throw or catch as an exception must be an instance of the  Exception class. The simplest case is a new exception type directly below the root: data MyException = ThisException | ThatException deriving Show instance Exception MyException&The default method definitions in the  Exception class do what we need in this case. You can now throw and catch  ThisException and  ThatException as exceptions: *Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException)) Caught ThisException In more complicated examples, you may wish to define a whole hierarchy of exceptions:  --------------------------------------------------------------------- -- Make the root exception type for all the exceptions in a compiler data SomeCompilerException = forall e . Exception e => SomeCompilerException e instance Show SomeCompilerException where show (SomeCompilerException e) = show e instance Exception SomeCompilerException compilerExceptionToException :: Exception e => e -> SomeException compilerExceptionToException = toException . SomeCompilerException compilerExceptionFromException :: Exception e => SomeException -> Maybe e compilerExceptionFromException x = do SomeCompilerException a <- fromException x cast a --------------------------------------------------------------------- -- Make a subhierarchy for exceptions in the frontend of the compiler data SomeFrontendException = forall e . Exception e => SomeFrontendException e instance Show SomeFrontendException where show (SomeFrontendException e) = show e instance Exception SomeFrontendException where toException = compilerExceptionToException fromException = compilerExceptionFromException frontendExceptionToException :: Exception e => e -> SomeException frontendExceptionToException = toException . SomeFrontendException frontendExceptionFromException :: Exception e => SomeException -> Maybe e frontendExceptionFromException x = do SomeFrontendException a <- fromException x cast a --------------------------------------------------------------------- -- Make an exception type for a particular frontend compiler exception data MismatchedParentheses = MismatchedParentheses deriving Show instance Exception MismatchedParentheses where toException = frontendExceptionToException fromException = frontendExceptionFromExceptionWe can now catch a MismatchedParentheses exception as MismatchedParentheses, SomeFrontendException or SomeCompilerException, but not other types, e.g.  IOException: *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses)) Caught MismatchedParentheses *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException)) Caught MismatchedParentheses *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException)) Caught MismatchedParentheses *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException)) *** Exception: MismatchedParentheses base7Render this exception value in a human-friendly manner.Default implementation: .basebasebasebasebasebase    D((c) The University of Glasgow, 1998-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy #$./?base#This is thrown when the user calls   . The first String is the argument given to   , second String is the location.baseThrow an exception. Exceptions may be thrown from purely functional code, but may only be caught within the  monad. basePretty print a  . basePretty print a .basebasebasebase'        Safe-InferredAbase2Indicates a mode in which a file should be locked. baseException thrown by hLock. on non-Windows platforms that don't support flock.8 base<'(c) The University of Glasgow 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)UnsafeebaseDescribes the behaviour of a thread when an asynchronous exception is received.base7asynchronous exceptions are unmasked (the normal state)basethe state during : asynchronous exceptions are masked, but blocking operations may still be interruptedbasethe state during : asynchronous exceptions are masked, and blocking operations may not be interruptedbase,File and directory names are values of type  , whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.base"Embed a strict state thread in an  action. The : parameter indicates that the internal state used by the . computation is a special one supplied by the = monad, and thus distinct from those used by invocations of .base Convert an  action into an 9 action. The type of the result is constrained to use a = state thread, and therefore the result cannot be passed to .base Convert an  action to an  action. This relies on  and  having the same representation modulo the constraint on the state thread type parameter.base Convert an  action to an  action. This relies on  and  having the same representation modulo the constraint on the state thread type parameter.6For an example demonstrating why this is unsafe, see https://mail.haskell.org/pipermail/haskell-cafe/2009-April/060719.htmlbaseCatch an exception in the  monad.Note that this function is strict in the action. That is, !catchException undefined b == _|_. See exceptions_and_strictness for details.baseThis is the simplest of the exception-catching functions. It takes a single argument, runs it, and if an exception is raised the "handler" is executed, with the value of the exception passed as an argument. Otherwise, the result is returned as normal. For example:  catch (readFile f) (\e -> do let err = show (e :: IOException) hPutStr stderr ("Warning: Couldn't open " ++ f ++ ": " ++ err) return "").Note that we have to give a type signature to e, or the program will not typecheck as the type is ambiguous. While it is possible to catch exceptions of any type, see the section "Catching all exceptions" (in Control.Exception3) for an explanation of the problems with doing so.%For catching exceptions in pure (non-!) expressions, see the function .Note that due to Haskell's unspecified evaluation order, an expression may throw one of several possible exceptions: consider the expression (error "urk") + (1 `div` 0). Does the expression throw ErrorCall "urk", or  DivideByZero?The answer is "it might throw either"; the choice is non-deterministic. If you are catching any type of exception then you might catch either. If you are calling catch with type .IO Int -> (ArithException -> IO Int) -> IO Int$ then the handler may get run with  DivideByZero as an argument, or an ErrorCall "urk" exception may be propagated further up. If you call it again, you might get a the opposite behaviour. This is ok, because  is an  computation.base Catch any  type in the  monad.Note that this function is strict in the action. That is, catchAny undefined b == _|_. See exceptions_and_strictness for details.base A variant of " that can only be used within the  monad. Although / has a type that is an instance of the type of *, the two functions are subtly different: 9throw e `seq` x ===> throw e throwIO e `seq` x ===> x+The first example will cause the exception e8 to be raised, whereas the second one won't. In fact,  will only cause an exception to be raised when it is used within the  monad. The ) variant should be used in preference to # to raise an exception within the = monad because it guarantees ordering with respect to other  operations, whereas  does not. base7Allow asynchronous exceptions to be raised even inside , making the operation interruptible (see the discussion of "Interruptible operations" in ).When called outside  , or inside , this function has no effect.base Returns the  for the current thread.baseLike , but does not pass a restore action to the argument.base9Executes an IO computation with asynchronous exceptions masked. That is, any thread which attempts to raise an exception in the current thread with r will be blocked until asynchronous exceptions are unmasked again.The argument passed to  is a function that takes as its argument another function, which can be used to restore the prevailing masking state within the context of the masked computation. For example, a common way to use . is to protect the acquisition of a resource: mask $ \restore -> do x <- acquire restore (do_something_with x) `onException` release releaseThis code guarantees that acquire is paired with release, by masking asynchronous exceptions for the critical parts. (Rather than write this code yourself, it would be better to use r& which abstracts the general pattern).Note that the restore" action passed to the argument to  does not necessarily unmask asynchronous exceptions, it just restores the masking state to that of the enclosing context. Thus if asynchronous exceptions are already masked,  cannot be used to unmask exceptions again. This is so that if you call a library function with exceptions masked, you can be sure that the library call will not be able to unmask exceptions again. If you are writing library code and need to use asynchronous exceptions, the only way is to create a new thread; see .Asynchronous exceptions may still be received while in the masked state if the masked thread blocks in certain ways; see Control.Exception#interruptible.Threads created by  inherit the 5 from the parent; that is, to start a thread in the  state, use mask_ $ forkIO .... This is particularly useful if you need to establish an exception handler in the forked thread before any asynchronous exceptions are received. To create a new thread in an unmasked state use .baseLike , but does not pass a restore action to the argument.baseLike 8, but the masked computation is not interruptible (see Control.Exception#interruptible). THIS SHOULD BE USED WITH GREAT CARE, because if a thread executing in  blocks for any reason, then the thread (and possibly the program, if this is the main thread) will be unresponsive and unkillable. This function should only be necessary if you need to mask exceptions around an interruptible operation, and you can guarantee that the interruptible operation will only block for a short period of time.base/Evaluate the argument to weak head normal form. is typically used to uncover any exceptions that a lazy value may contain, and possibly handle them. only evaluates to weak head normal form'. If deeper evaluation is needed, the force function from Control.DeepSeq may be handy: evaluate $ force x%There is a subtle difference between  x and ?   x', analogous to the difference between  and . If the lazy value x throws an exception, ?   x will fail to return an - action and will throw an exception instead.  x), on the other hand, always produces an 3 action; that action will throw an exception upon  execution iff x throws an exception upon  evaluation.The practical implication of this difference is that due to the imprecise exceptions semantics, &(return $! error "foo") >> error "bar"may throw either "foo" or "bar", depending on the optimizations performed by the compiler. On the other hand, %evaluate (error "foo") >> error "bar"is guaranteed to throw "foo".The rule of thumb is to use  to force or handle exceptions in lazy values. If, on the other hand, you are forcing a lazy value for efficiency reasons only and do not care about exceptions, you may use ?   x.basebasebaseThe computation to runbase+Handler to invoke if an exception is raisedbase-computation to run first ("acquire resource")base,computation to run last ("release resource")basecomputation to run in-betweenbasecomputation to run firstbase?computation to run afterward (even if an exception was raised)# #   t"(c) The University of Glasgow 2008see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafej baseA mutable variable in the  monadbase Build a new baseRead the value of an baseWrite a new value into an base A version of s0 that forces the (pair) result of the function.base3Atomically apply a function to the contents of an  and return the old and new values. The result of the function is not forced. As this can lead to a memory leak, it is usually better to use .base3Atomically apply a function to the contents of an  and return the old and new values. The result of the function is forced.base&Atomically replace the contents of an , returning the old contents.baseStrict version of s,. This forces both the value stored in the < and the value returned. The new value is installed in the ) before the returned value is forced. So .atomicModifyIORef' ref (x -> (x+1, undefined))will increment the 4 and then throw an exception in the calling thread.basePointer equality.  v((c) The University of Glasgow, 1992-2003see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)Unsafe28base+A box around Weak#, private to this module.baseA finalizer is represented as a pointer to a foreign function that, at finalisation time, gets as an argument a plain pointer variant of the foreign pointer that the finalizer is associated with.Note that the foreign function must use the ccall calling convention.baseControls finalization of a &, that is, what should happen if the  becomes unreachable. Visually, these data constructors are appropriate in these scenarios:  Memory backing pointer is GC-Managed Unmanaged Finalizer functions are: +------------+-----------------+ Allowed | MallocPtr | PlainForeignPtr | +------------+-----------------+ Prohibited | PlainPtr | FinalPtr | +------------+-----------------+baseThe pointer refers to unmanaged memory that was allocated by a foreign function (typically using malloc2). The finalizer frequently calls the C function free or some variant of it.baseThe pointer refers to unmanaged memory that should not be freed when the : becomes unreachable. Functions that add finalizers to a  throw exceptions when the  is backed by !Most commonly, this is used with Addr#$ literals. See Note [Why FinalPtr].base)The pointer refers to a byte array. The  field means that the $ is reachable (by GC) whenever the  is reachable. When the  becomes unreachable, the runtime's normal GC recovers the memory backing it. Here, the finalizer function intended to be used to free()6 any ancilliary *unmanaged* memory pointed to by the  . See the zlib$ library for an example of this use. Invariant: The  in the parent & is an interior pointer into this .Invariant: The  is pinned, so the > does not get invalidated by the GC moving the byte array. Invariant: A  must not be associated with more than one set of finalizers. For example, this is sound: incrGood :: ForeignPtr Word8 -> ForeignPtr Word8 incrGood (ForeignPtr p (MallocPtr m f)) = ForeignPtr (plusPtr p 1) (MallocPtr m f)But this is unsound: incrBad :: ForeignPtr Word8 -> IO (ForeignPtr Word8) incrBad (ForeignPtr p (MallocPtr m _)) = do f <- newIORef NoFinalizers pure (ForeignPtr p (MallocPtr m f))baseThe pointer refers to a byte array. Finalization is not supported. This optimizes  MallocPtr" by avoiding the allocation of a MutVar#: when it is known that no one will add finalizers to the  ForeignPtr%. Functions that add finalizers to a  throw exceptions when the  is backed by  . The invariants that apply to  apply to  as well.baseFunctions called when a  is finalized. Note that C finalizers and Haskell finalizers cannot be mixed.baseNo finalizer. If there is no intent to add a finalizer at any point in the future, consider  or 0 instead since these perform fewer allocations.baseFinalizers are all C functions.base%Finalizers are all Haskell functions.base The type  represents references to objects that are maintained in a foreign language, i.e., that are not part of the data structures usually managed by the Haskell storage manager. The essential difference between )s and vanilla memory references of type Ptr a, is that the former may be associated with  finalizers. A finalizer is a routine that is invoked when the Haskell storage manager detects that - within the Haskell heap and stack - there are no more references left that are pointing to the . Typically, the finalizer will, then, invoke routines in the foreign language that free the resources bound by the foreign object.The % is parameterised in the same way as . The type argument of * should normally be an instance of class .baseTurns a plain memory reference into a foreign object by associating a finalizer - given by the monadic operation - with the reference. The storage manager will start the finalizer, in a separate thread, some time after the last reference to the  ForeignPtr is dropped. There is no guarantee of promptness, and in fact there is no guarantee that the finalizer will eventually run at all.Note that references from a finalizer do not necessarily prevent another object from being finalized. If A's finalizer refers to B (perhaps using , then the only guarantee is that B's finalizer will never be started before A's. If both A and B are unreachable, then both finalizers will start together. See  for more on finalizer ordering.base"Allocate some memory and return a = to it. The memory will be released automatically when the  is discarded. is equivalent to 4 do { p <- malloc; newForeignPtr finalizerFree p }although it may be implemented differently internally: you may not assume that the memory returned by  has been allocated with . GHC notes:  has a heavily optimised implementation in GHC. It uses pinned memory in the garbage collected heap, so the ; does not require a finalizer to free the memory. Use of  and associated functions is strongly recommended in preference to x with a finalizer.baseThis function is similar to , except that the size of the memory required is given explicitly as a number of bytes.baseThis function is similar to , except that the size and alignment of the memory required is given explicitly as numbers of bytes.base"Allocate some memory and return a = to it. The memory will be released automatically when the  is discarded. GHC notes:  has a heavily optimised implementation in GHC. It uses pinned memory in the garbage collected heap, as for mallocForeignPtr. Unlike mallocForeignPtr, a ForeignPtr created with mallocPlainForeignPtr carries no finalizers. It is not possible to add a finalizer to a ForeignPtr created with mallocPlainForeignPtr. This is useful for ForeignPtrs that will live only inside Haskell (such as those created for packed strings). Attempts to add a finalizer to a ForeignPtr created this way, or to finalize such a pointer, will throw an exception.baseThis function is similar to , except that the internally an optimised ForeignPtr representation with no finalizer is used. Attempts to add a finalizer will cause an exception to be thrown.baseThis function is similar to , except that the internally an optimised ForeignPtr representation with no finalizer is used. Attempts to add a finalizer will cause an exception to be thrown.baseThis function adds a finalizer to the given foreign object. The finalizer will run before all other finalizers for the same object which have already been registered.baseLike  but the finalizer is passed an additional environment parameter.base,This function adds a finalizer to the given  ForeignPtr. The finalizer will run before all other finalizers for the same object which have already been registered.This is a variant of addForeignPtrFinalizer', where the finalizer is an arbitrary IO action. When it is invoked, the finalizer will run in a new thread.NB. Be very careful with these finalizers. One common trap is that if a finalizer references another finalized value, it does not prevent that value from being finalized. In particular, s are finalized objects, so a finalizer should not refer to a  (including , , or ).baseTurns a plain memory reference into a foreign pointer that may be associated with finalizers by using .baseThis function ensures that the foreign object in question is alive at the given place in the sequence of IO actions. In particular x does a $ after it executes the user action.Note that this function should not be used to express dependencies between finalizers on )s. For example, if the finalizer for a  F1 calls  on a second  F25, then the only guarantee is that the finalizer for F2+ is never started before the finalizer for F17. They might be started together if for example both F1 and F2 are otherwise unreachable, and in that case the scheduler might end up running the finalizer for F2 first.In general, it is not recommended to use finalizers on separate objects with ordering constraints between them. To express the ordering robustly requires explicit synchronisation using MVars between the finalizers, but even then the runtime sometimes runs multiple finalizers sequentially in a single thread (for performance reasons), so synchronisation between finalizers could result in artificial deadlock. Another alternative is to use explicit reference counting.baseThis function extracts the pointer component of a foreign pointer. This is a potentially dangerous operations, as if the argument to  is the last usage occurrence of the given foreign pointer, then its finalizer(s) will be run, which potentially invalidates the plain pointer just obtained. Hence,  must be used wherever it has to be guaranteed that the pointer lives on - i.e., has another usage occurrence.To avoid subtle coding errors, hand written marshalling code should preferably use x rather than combinations of  and . However, the latter routines are occasionally preferred in tool generated marshalling code.baseThis function casts a . parameterised by one type into another type. base8Advances the given address by the given offset in bytes.The new  shares the finalizer of the original, equivalent from a finalization standpoint to just creating another reference to the original. That is, the finalizer will not be called before the new  is unreachable, nor will it be called an additional time due to this call, and the finalizer will be called with the same address that it would have had this call not happened, *not* the new address.baseCauses the finalizers associated with a foreign pointer to be run immediately. The foreign pointer must not be used again after this function is called.basebasebase"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableUnsafe'baseTurns a plain memory reference into a foreign pointer, and associates a finalizer with the reference. The finalizer will be executed after the last reference to the foreign object is dropped. There is no guarantee of promptness, however the finalizer will be executed before the program exits.baseThis is a way to look at the pointer living inside a foreign object. This function takes a function which is applied to that pointer. The resulting  action is then executed. The foreign object is kept alive at least during the whole action, even if it is not used directly inside. Note that it is not safe to return the pointer from the action and use it after the action completes. All uses of the pointer should be inside the ? bracket. The reason for this unsafeness is the same as for  below: the finalizer may run earlier than expected, because the compiler can only track usage of the  object, not a  object made from it.This function is normally used for marshalling data to or from the object pointed to by the !, using the operations from the  class.baseThis variant of  adds a finalizer that expects an environment in addition to the finalized pointer. The environment that will be passed to the finalizer is fixed by the second argument to .baseThis function is similar to , but yields a memory area that has a finalizer attached that releases the memory area. As with , it is not guaranteed that the block of memory was allocated by .baseThis function is similar to , but yields a memory area that has a finalizer attached that releases the memory area. As with , it is not guaranteed that the block of memory was allocated by .w"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableUnsafeu"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthyx"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy`y"(c) The University of Glasgow 2008see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) TrustworthybaseA mutable array of bytes that can be passed to foreign functions.The buffer is represented by a record, where the record contains the raw buffer and the start/end points of the filled portion. The buffer contents itself is mutable, but the rest of the record is immutable. This is a slightly odd mix, but it turns out to be quite practical: by making all the buffer metadata immutable, we can have operations on buffer metadata outside of the IO monad.8The "live" elements of the buffer are those between the  and  offsets. In an empty buffer,  is equal to , but they might not be zero: for example, the buffer might correspond to a memory-mapped file and in which case  will point to the next location to be written, which is not necessarily the beginning of the file. base2slides the contents of the buffer to the beginning base( (  z((c) The University of Glasgow, 2008-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy base baseStopped because the input contains insufficient available elements, or all of the input sequence has been successfully translated. base>Stopped because the output contains insufficient free elements baseStopped because there are sufficient free elements in the output to output at least one encoded ASCII character, but the input contains an invalid or unrepresentable sequence baseA   is a specification of a conversion scheme between sequences of bytes and sequences of Unicode characters.For example, UTF-8 is an encoding of Unicode characters into a sequence of bytes. The   for UTF-8 is . basea string that can be passed to  to create an equivalent  . baseCreates a means of decoding bytes into characters: the result must not be shared between several byte sequences or simultaneously across threads baseCreates a means of encode characters into bytes: the result must not be shared between several character sequences or simultaneously across threads baseThe encode, function translates elements of the buffer from to the buffer to. It should translate as many elements as possible given the sizes of the buffers, including translating zero elements if there is either not enough room in to, or from1 does not contain a complete multibyte sequence.If multiple CodingProgress returns are possible, OutputUnderflow must be preferred to InvalidSequence. This allows GHC's IO library to assume that if we observe InvalidSequence there is at least a single element available in the output buffer.The fact that as many elements as possible are translated is used by the IO library in order to report translation errors at the point they actually occur, rather than when the buffer is translated. baseThe recover function is used to continue decoding in the presence of invalid or unrepresentable sequences. This includes both those detected by encode returning InvalidSequence and those that occur because the input byte sequence appears to be truncated.Progress will usually be made by skipping the first element of the from buffer. This function should only be called if you are certain that you wish to do this skipping and if the to buffer has at least one element of free space. Because this function deals with decoding failure, it assumes that the from buffer has at least one element.recover6 may raise an exception rather than skipping anything.#Currently, some implementations of recover may mutate the input buffer. In particular, this feature is used to implement transliteration. baseResources associated with the encoding may now be released. The encode1 function may not be called again after calling close. base&Return the current state of the codec.Many codecs are not stateful, and in these case the state can be represented as '()'. Other codecs maintain a state. For example, UTF-16 recognises a BOM (byte-order-mark) character at the beginning of the input, and remembers thereafter whether to use big-endian or little-endian mode. In this case, the state of the codec would include two pieces of information: whether we are at the beginning of the stream (the BOM only occurs at the beginning), and if not, whether to use the big or little-endian encoding. base base base  s"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy baseMake a  pointer to an 8, using the second argument as a finalizer to run when  is garbage-collected baseMutate the contents of an .Be warned that   does not apply the function strictly. This means if the program calls   many times, but seldom uses the value, thunks will pile up in memory resulting in a space leak. This is a common mistake made when using an IORef as a counter. For example, the following will likely produce a stack overflow: ref <- newIORef 0 replicateM_ 1000000 $ modifyIORef ref (+1) readIORef ref >>= printTo avoid this problem, use   instead. baseStrict version of  base'Atomically modifies the contents of an ."This function is useful for using  in a safe way in a multithreaded program. If you only have one  , then using  7 to access and modify it will prevent race conditions.$Extending the atomicity to multiple s is problematic, so it is recommended that if you need to do anything more complicated then using J instead is a good idea.  does not apply the function strictly. This is important to know even if all you are doing is replacing the value. For example, this will leak memory: ref <- newIORef '1' forever $ atomicModifyIORef ref (\_ -> ('2', ()))Use  or   to avoid this problem. base Variant of 1 with the "barrier to reordering" property that   has.     Trustworthy#$8baseinsertWith f k v table inserts k into table with value v. If k already appears in table with value v0, the value is updated to f v0 v and Just v0 is returned.8base.Used to undo the effect of a prior insertWith.8baseRemove the given key from the table and return its associated value.8888888 Trustworthy8baseCopy part of the source array into the destination array. The destination array is resized if not large enough.8baseCopy part of the source array into the destination array. The destination array is resized if not large enough.8baseComputes the next-highest power of two for a particular integer, n. If n$ is already a power of two, returns n. If n is zero, returns zero, even though zero is not a power of two.8888888888888888888{"(c) The University of Glasgow 2008see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe baseAn  . is a mutable, boxed, non-strict array in the + monad. The type arguments are as follows:i8: the index type of the array (should be an instance of ~)e : the element type of the array. base Build a new  baseRead a value from an  baseWrite a new value into an  baseRead a value from an  baseWrite a new value into an  base  }((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable TrustworthyП$ base%A mode that determines the effect of   hdl mode i. basethe position of hdl is set to i. basethe position of hdl is set to offset i from the current position. basethe position of hdl is set to offset i from the end of the file. base-Type of a device that can be used to back a  (see also /). The standard libraries provide creation of 9s via Posix file operations with file descriptors (see  ) with FD being the underlying   instance.&Users may provide custom instances of  4 which are expected to conform the following rules: baseThe standard libraries do not have direct support for this device type, but a user implementation is expected to provide a list of file names in the directory, in any order, separated by '\0' characters, excluding the "." and ".." names. See also . Seek operations are not supported on directories (other than to the zero position). baseA duplex communications channel (results in creation of a duplex ?). The standard libraries use this device type when creating s for open sockets. base>A file that may be read or written, and also may be seekable. baseA "raw" (disk) device which supports block binary read and write operations and may be seekable only to positions of certain granularity (block- aligned). base+I/O operations required for implementing a . baseready dev write msecs returns % if the device has data to read (if write is ") or space to write new data (if write is ). msecs. specifies how long to wait, in milliseconds. basecloses the device. Further operations on the device should produce exceptions. basereturns ( if the device is a terminal or console. basereturns  if the device supports   operations. base+seek to the specified position in the data. base(return the current position in the data. basereturn the size of the data. basechange the size of the data. basefor terminal devices, changes whether characters are echoed on the device. base#returns the current echoing status. basesome devices (e.g. terminals) support a "raw" mode where characters entered are immediately made available to the program. If available, this operations enables raw mode. base returns the   corresponding to this device. baseduplicates the device, if possible. The new device is expected to share a file pointer with the original device (like Unix dup). basedup2 source target replaces the target device with the source device. The target device is closed first, if necessary, and then it is made into a duplicate of the first device (like Unix dup2). base;A low-level I/O provider where the data is bytes in memory. baseRead up to the specified number of bytes, returning the number of bytes actually read. This function should only block if there is no data available. If there is not enough data available, then the function should just return the available data. A return value of zero indicates that the end of the data stream (e.g. end of file) has been reached. baseRead up to the specified number of bytes, returning the number of bytes actually read, or , if the end of the stream has been reached. base$Write the specified number of bytes. baseWrite up to the specified number of bytes without blocking. Returns the actual number of bytes written. base base base base base base base  ~"(c) The University of Glasgow 2008see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy׌ baseThe purpose of   is to provide a common interface for I/O devices that can read and write data through a buffer. Devices that implement   include ordinary files, memory-mapped files, and bytestrings. The underlying device implementing a  must provide  . baseallocate a new buffer. The size of the buffer is at the discretion of the device; e.g. for a memory-mapped file the buffer will probably cover the entire file. basereads bytes into the buffer, blocking if there are no bytes available. Returns the number of bytes read (zero indicates end-of-file), and the new buffer. basereads bytes into the buffer without blocking. Returns the number of bytes read (Nothing indicates end-of-file), and the new buffer. basePrepares an empty write buffer. This lets the device decide how to set up a write buffer: the buffer may need to point to a specific location in memory, for example. This is typically used by the client when switching from reading to writing on a buffered read/write device.There is no corresponding operation for read buffers, because before reading the client will always call  . baseFlush all the data from the supplied write buffer out to the device. The returned buffer should be empty, and ready for writing. baseFlush data from the supplied write buffer out to the device without blocking. Returns the number of bytes written and the remaining buffer. ((c) The University of Glasgow, 1994-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy\ baseSpecifies the translation, if any, of newline characters between internal Strings and the external file or stream. Haskell Strings are assumed to represent newlines with the '\n'9 character; the newline mode specifies how to translate '\n'( on output, and what to translate into '\n' on input. base'the representation of newlines on input base(the representation of newlines on output base?The representation of a newline in the external file or stream. base '\n' base '\r\n' baseThree kinds of buffering are supported: line-buffering, block-buffering or no-buffering. These modes have the following effects. For output, items are written out, or flushed9, from the internal buffer according to the buffer mode:line-buffering: the entire output buffer is flushed whenever a newline is output, the buffer overflows, a $ is issued, or the handle is closed.block-buffering: the entire buffer is written out whenever it overflows, a $ is issued, or the handle is closed. no-buffering: output is written immediately, and never stored in the buffer.An implementation is free to flush the buffer more frequently, but not less frequently, than specified above. The output buffer is emptied as soon as it has been written out.Similarly, input occurs according to the buffer mode for the handle:line-buffering: when the buffer for the handle is not empty, the next item is obtained from the buffer; otherwise, when the buffer is empty, characters up to and including the next newline character are read into the buffer. No characters are available until the newline character is available or the buffer is full.block-buffering: when the buffer for the handle becomes empty, the next block of data is read into the buffer. no-buffering4: the next input item is read and returned. The  operation implies that even a no-buffered handle may require a one-character buffer.The default buffering mode when a handle is opened is implementation-dependent and may depend on the file system object which is attached to that handle. For most implementations, physical files will normally be block-buffered and terminals will normally be line-buffered. base"buffering is disabled if possible. base-line-buffering should be enabled if possible. baseblock-buffering should be enabled if possible. The size of the buffer is n items if the argument is  n+ and is otherwise implementation-dependent.!baseHaskell defines operations to read and write characters from and to files, represented by values of type Handle!. Each value of this type is a handle2: a record used by the Haskell run-time system to manage I/O with file system objects. A handle has at least the following properties:+whether it manages input or output or both;whether it is open, closed or  semi-closed;whether the object is seekable;whether buffering is disabled, or enabled on a line or block basis;$a buffer (whose length may be zero).Most handles will also have a current I/O position indicating where the next input or output operation will occur. A handle is readable if it manages only input or both input and output; likewise, it is writable if it manages only output or both input and output. A handle is open when first allocated. Once it is closed it can no longer be used for either input or output, though an implementation cannot re-use its storage while references remain to it. Handles are in the } and p classes. The string produced by showing a handle is system dependent; it should include enough information to identify the handle for debugging. A handle is equal according to 9 only to itself; no attempt is made to compare the internal state of different handles for equality.!base>= writeFile might yield a different file. universalNewlineMode = NewlineMode { inputNL = CRLF, outputNL = nativeNewline }!base>Use the native newline representation on both input and output nativeNewlineMode = NewlineMode { inputNL = nativeNewline outputNL = nativeNewline }!base!Do no newline translation at all. noNewlineTranslation = NewlineMode { inputNL = LF, outputNL = LF }!base!base!base!base!base!base!base!base!base!base!base!base!base!base!base7 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!! !!!!None8baseNo-op implementation.8baseNo-op implementation.88 #(c) The University of Glasgow, 2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy88base,The Haskell 2010 type for exceptions in the ( monad. Any I/O operation may raise an  instead of returning a result. For a more general type of exception, including also those that arise in pure code, see r.(In Haskell 2010, this is an opaque type.baseExceptions that occur in the IO monad. An  IOException records a more specific error type, a descriptive string and maybe the handle that was used when the error was flagged.base Construct an 0 value with a string describing the error. The fail method of the  instance of the t class raises a , thus: >instance Monad IO where ... fail s = ioError (userError s)!base;An abstract type that contains a value for each variant of .!base1Defines the exit codes that a program can return.!base!indicates successful termination;!baseindicates program failure with an exit code. The exact interpretation of the code is operating-system dependent. In particular, some values may be prohibited (e.g. 0 on a POSIX-compliant system).! baseConvert a Boolean in numeric representation to a Haskell value"base=Allocate storage and marshal a storable value wrapped into a the  is used to represent "base Converts a withXXX9 combinator into one marshalling a value wrapped into a , using  to represent ."base/Convert a peek combinator into a one returning  if applied to a "base Replicates a withXXX combinator over a list of objects, yielding a list of marshalled objects"baseCopies the given number of bytes from the second area (source) into the first (destination); the copied areas may not overlap"baseCopies the given number of bytes from the second area (source) into the first (destination); the copied areas may overlap"base>Fill a given number of bytes in memory area with a byte value."base DestinationbaseSourcebase Size in bytes"base DestinationbaseSourcebase Size in bytes """"""""""" """""""""""(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy("baseAllocate storage for the given number of elements of a storable type (like , but for multiple elements)."baseLike ", but add an extra position to hold a special termination element."baseLike ":, but allocated memory is filled with bytes of value zero."baseLike ";, but allocated memory is filled with bytes of value zero."baseTemporarily allocate space for the given number of elements (like , but for multiple elements)."baseLike ", but add an extra position to hold a special termination element."baseAdjust the size of an array"baseAdjust the size of an array including an extra position for the end marker."baseConvert an array of given length into a Haskell list. The implementation is tail-recursive and so uses constant stack space."baseConvert an array terminated by the given end marker into a Haskell list"base/Write the list elements consecutive into memory"baseWrite the list elements consecutive into memory and terminate them with the given marker element"baseWrite a list of storable elements into a newly allocated, consecutive sequence of storable values (like , but for multiple elements)."baseWrite a list of storable elements into a newly allocated, consecutive sequence of storable values, where the end is fixed by the given end marker"base=Temporarily store a list of storable values in memory (like , but for multiple elements)."baseLike ", but the action gets the number of values as an additional parameter"baseLike "1, but a terminator indicates where the array ends"baseLike "1, but a terminator indicates where the array ends"baseCopy the given number of elements from the second array (source) into the first array (destination); the copied areas may not overlap"baseCopy the given number of elements from the second array (source) into the first array (destination); the copied areas may overlap"baseReturn the number of elements in an array, excluding the terminator"base?Advance a pointer into an array by the given number of elements""""""""""""""""""""""""""""""""""""""""""""((c) The University of Glasgow, 2008-2011see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy2E"base8Marshal a NUL terminated C string into a Haskell string."base>Marshal a C string with explicit length into a Haskell string.#base8Marshal a Haskell string into a NUL terminated C string.the Haskell string may not contain any NUL charactersnew storage is allocated for the C string and must be explicitly freed using " or ".#baseMarshal a Haskell string into a C string (ie, character array) with explicit length information.new storage is allocated for the C string and must be explicitly freed using " or ".#baseMarshal a Haskell string into a NUL terminated C string using temporary storage.the Haskell string may not contain any NUL charactersthe memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.#baseMarshal a Haskell string into a C string (ie, character array) in temporary storage, with explicit length information.the memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.#baseMarshal a list of Haskell strings into an array of NUL terminated C strings using temporary storage.the Haskell strings may not contain any NUL charactersthe memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.#base?Determines whether a character can be accurately encoded in a .Pretty much anyone who uses this function is in a state of sin because whether or not a character is encodable will, in general, depend on the context in which it occurs.8baseEncoding of CStringbaseString in Haskell terms9baseEncoding of CString to createbaseNull-terminate?baseString to encodebase/Worker that can safely use the allocated memory9baseEncoding of CString to createbaseNull-terminate?baseString to encode""######""######(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable TrustworthyF#baseMarshal a C string with explicit length into a Haskell string.#base8Marshal a Haskell string into a NUL terminated C string.the Haskell string may not contain any NUL charactersnew storage is allocated for the C string and must be explicitly freed using  or .#baseMarshal a Haskell string into a C string (ie, character array) with explicit length information.new storage is allocated for the C string and must be explicitly freed using  or .#baseMarshal a Haskell string into a NUL terminated C string using temporary storage.the Haskell string may not contain any NUL charactersthe memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.#baseMarshal a Haskell string into a C string (ie, character array) in temporary storage, with explicit length information.the memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.#baseConvert a C byte, representing a Latin-1 character, to the corresponding Haskell character.#baseConvert a Haskell character to a C character. This function is only safe on the first 256 characters.#base Convert a C  unsigned char, representing a Latin-1 character, to the corresponding Haskell character.#base#Convert a Haskell character to a C  unsigned char:. This function is only safe on the first 256 characters.#base Convert a C  signed char, representing a Latin-1 character, to the corresponding Haskell character.#base#Convert a Haskell character to a C  signed char:. This function is only safe on the first 256 characters.#base8Marshal a NUL terminated C string into a Haskell string.#base>Marshal a C string with explicit length into a Haskell string.#base8Marshal a Haskell string into a NUL terminated C string.the Haskell string may not contain any NUL charactersnew storage is allocated for the C string and must be explicitly freed using  or .#baseMarshal a Haskell string into a C string (ie, character array) with explicit length information.new storage is allocated for the C string and must be explicitly freed using  or .#baseMarshal a Haskell string into a NUL terminated C string using temporary storage.the Haskell string may not contain any NUL charactersthe memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.#baseMarshal a Haskell string into a C string (ie, character array) in temporary storage, with explicit length information.the memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.#base=Marshal a NUL terminated C wide string into a Haskell string.#baseMarshal a C wide string with explicit length into a Haskell string.#base=Marshal a Haskell string into a NUL terminated C wide string.the Haskell string may not contain any NUL charactersnew storage is allocated for the C wide string and must be explicitly freed using  or .#baseMarshal a Haskell string into a C wide string (ie, wide character array) with explicit length information.new storage is allocated for the C wide string and must be explicitly freed using  or .#baseMarshal a Haskell string into a NUL terminated C wide string using temporary storage.the Haskell string may not contain any NUL charactersthe memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.#baseMarshal a Haskell string into a C wide string (i.e. wide character array) in temporary storage, with explicit length information.the memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.##########################################################(c) The FFI task force 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableUnsafeK#baseSometimes an external entity is a pure function, except that it passes arguments and/or results via pointers. The function unsafeLocalState< permits the packaging of such entities as pure functions. :The only IO operations allowed in the IO action passed to unsafeLocalState are (a) local allocation (alloca,  allocaBytes and derived operations such as  withArray and  withCString), and (b) pointer operations (Foreign.Storable and  Foreign.Ptr) on the pointers to local storage, and (c) foreign functions whose only observable effect is to read and/or write the locally allocated memory. Passing an IO operation that does not obey these rules results in undefined behaviour.It is expected that this operation will be replaced in a future revision of Haskell.##"(c) The University of Glasgow 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisional#non-portable (requires concurrency) TrustworthyQZ#baseTurns a plain memory reference into a foreign object by associating a finalizer - given by the monadic operation - with the reference. The storage manager will start the finalizer, in a separate thread, some time after the last reference to the  is dropped. There is no guarantee of promptness, and in fact there is no guarantee that the finalizer will eventually run at all.Note that references from a finalizer do not necessarily prevent another object from being finalized. If A's finalizer refers to B (perhaps using x, then the only guarantee is that B's finalizer will never be started before A's. If both A and B are unreachable, then both finalizers will start together. See x for more on finalizer ordering.#base,This function adds a finalizer to the given . The finalizer will run before all other finalizers for the same object which have already been registered.This is a variant of x', where the finalizer is an arbitrary  action. When it is invoked, the finalizer will run in a new thread.NB. Be very careful with these finalizers. One common trap is that if a finalizer references another finalized value, it does not prevent that value from being finalized. In particular, s are finalized objects, so a finalizer should not refer to a  (including , , or ).####(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy`#baseHaskell representation for errno values. The implementation is deliberately exposed, to allow users to add their own definitions of # values.#base$baseYield  if the given #6 value is valid on the system. This implies that the p instance of # is also system dependent as it is only defined for valid values of #.$baseGet the current value of errno in the current thread.On GHC, the runtime will ensure that any Haskell thread will only see "its own" errno, by saving and restoring the value when Haskell threads are scheduled across OS threads.$baseReset the current thread's errno value to #.$base Throw an ' corresponding to the current value of $.$base Throw an ' corresponding to the current value of $ if the result value of the " action meets the given predicate.$baseas $!, but discards the result of the  action after error handling.$baseas $, but retry the ' action when it yields the error code # - this amounts to the standard retry loop for interrupted POSIX system calls.$baseas $;, but additionally if the operation yields the error code # or $5, an alternative action is executed before retrying.$baseas $, but discards the result.$baseas $, but discards the result.$base Throw an ' corresponding to the current value of $ if the  action returns a result of -1.$baseas $, but discards the result.$base Throw an ' corresponding to the current value of $ if the  action returns a result of -13, but retries in case of an interrupted operation.$baseas $, but discards the result.$baseas $-, but checks for operations that would block.$baseas $, but discards the result.$base Throw an ' corresponding to the current value of $ if the  action returns .$base Throw an ' corresponding to the current value of $ if the  action returns 1, but retry in case of an interrupted operation.$baseas $-, but checks for operations that would block.$baseas $9, but exceptions include the given path when appropriate.$baseas $<, but exceptions include the given path when appropriate.$baseas $<, but exceptions include the given path when appropriate.$baseas $<, but exceptions include the given path when appropriate.$baseas $<, but exceptions include the given path when appropriate.$baseas $<, but exceptions include the given path when appropriate.$base Construct an  based on the given # value. The optional information can be used to improve the accuracy of error messages.$base$base)textual description of the error location$base/predicate to apply to the result value of the  operationbase#textual description of the locationbasethe  operation to be executed$base/predicate to apply to the result value of the  operationbase#textual description of the locationbasethe  operation to be executedbaseaction to execute before retrying if an immediate retry would block$base%the location where the error occurredbasethe error numberbase)optional handle associated with the errorbase+optional filename associated with the error##########################################################################################$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$##########################################################################################$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafeb#######################################################################################################################$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(c) Sven Panne 2002-2004/BSD-style (see the file libraries/base/LICENSE)sven.panne@aedion.de provisionalportable Trustworthyj$baseA memory pool.$baseAllocate a fresh memory pool.$baseDeallocate a memory pool and everything which has been allocated in the pool itself.$baseExecute an action with a fresh memory pool, which gets automatically deallocated (including its contents) after the action has finished.$baseAllocate space for storable type in the given pool. The size of the area allocated is determined by the  method from the instance of  for the appropriate type.$base:Allocate the given number of bytes of storage in the pool.$baseAdjust the storage area for an element in the pool to the given size of the required type.$baseAdjust the storage area for an element in the pool to the given size.$baseAllocate storage for the given number of elements of a storable type in the pool.$baseAllocate storage for the given number of elements of a storable type in the pool, but leave room for an extra element to signal the end of the array.$base.Adjust the size of an array in the given pool.$baseAdjust the size of an array with an end marker in the given pool.$baseAllocate storage for a value in the given pool and marshal the value into this storage.$baseAllocate consecutive storage for a list of values in the given pool and marshal these values into it.$baseAllocate consecutive storage for a list of values in the given pool and marshal these values into it, terminating the end with the given marker.$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(c) The FFI task force 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafek""""""""""""""""""""""""""""""""""""""""""""""""""$$$$$$$$$$$$$$$(c) The FFI task force 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafel""""""""""""""""""""""""""""""""""""""""""""""""""$$$$$$$$$$$$$$$(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafem""""""""""""""""""""""""""""""""""""""""""""""""""$$$$$$$$$$$$$$$(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafeo""""""""""""""""""""""""""""""""""""""""""""""""""$$$$$$$$$$$$$$$"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalnon-portable (requires POSIX) Trustworthy2<rP $base$base$ base$ base$ base$ base$ base$ base$ base$ base=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$Unsafez_9baseEvent notification backend.9basePoll backend for new events. The provided callback is called once per file descriptor with new events.9baseRegister, modify, or unregister interest in the given events on the given file descriptor.9baseRegister interest in new events on a given file descriptor, set to be deactivated after the first event.9base4A type alias for timeouts, specified in nanoseconds.9baseA pair of an event and lifetimeHere we encode the event in the bottom three bits and the lifetime in the fourth bit.'base&The lifetime of an event registration.'base3the registration will be active for only one event'base,the registration will trigger multiple times'base An I/O event.'baseData is available to be read.'base/The file descriptor is ready to accept a write.9base*Another thread closed the file descriptor.9baseThe longer of two lifetimes.9baseReturns ) if the modification succeeded. Returns  if this backend does not support event notifications on this type of file.9baseReturns ) if the modification succeeded. Returns  if this backend does not support event notifications on this type of file.9base Throw an ( corresponding to the current value of $ if the result value of the  action is -1 and $ is not #". If the result value is -1 and $ returns #9 0 is returned. Otherwise the result value is returned.9base9 base9base9basemappend# takes the longer of two lifetimes.9 base9base9 base9base9base9base9base9base9base99999''''''99999999999 Trustworthy #$z99((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (requires POSIX) Trustworthy {c'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Trustworthy 9baseCreate a new epoll backend.9baseChange the set of events we are interested in for a given file descriptor.9baseSelect a set of file descriptors which are ready for I/O operations and call f for all ready file descriptors, passing the events that are ready.9baseCreate a new epoll context, returning a file descriptor associated with the context. The fd may be used for subsequent calls to this epoll context.The size parameter to epoll_create is a hint about the expected number of handles.The file descriptor returned from epoll_create() should be destroyed via a call to close() after polling is finished9base9base9base9base9base9base9basestatebasetimeout in millisecondsbase I/O callback99"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy'(Wbase3Converts an arbitrary value into an object of type '..The type of the object must be an instance of , which ensures that only monomorphically-typed objects may be converted to '(. To convert a polymorphic object into '6, give it a monomorphic type signature. For example:  toDyn (id :: Int -> Int)'baseA value of type '2 is an object encapsulated together with its type.A ' may only represent a monomorphic value; an attempt to create a value of type ' from a polymorphically-typed expression will result in an ambiguity error (see W).}ing a value of type ' returns a pretty-printed representation of the object's type; useful for debugging.(base Converts a ' object back into an ordinary Haskell value of the correct type. See also (.(base Converts a ' object back into an ordinary Haskell value of the correct type. See also (.(base(base(basethe dynamically-typed objectbasea default valuebasereturns: the value of the first argument, if it has the correct type, otherwise the value of the second argument.(basethe dynamically-typed objectbase returns:  a=, if the dynamically-typed object has the correct type (and a is its value), or  otherwise. W'(((((( '(W(((((((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)Unsafe 2H(baseShared memory locations that support atomic memory transactions.(base.A monad supporting atomic memory transactions.(baseThe current status of a thread(base+the thread is currently runnable or running(basethe thread has finished(base&the thread is blocked on some resource(base)the thread received an uncaught exception(base blocked on (base6blocked on a computation in progress by another thread(base blocked in ((base blocked in ( in an STM transaction(basecurrently in a foreign call(base)blocked on some other resource. Without  -threaded , I/O and  show up as (, with  -threaded they show up as (.(baseA (8 is an abstract type representing a handle to a thread. ( is an instance of p, x and } , where the x6 instance implements an arbitrary total ordering over (s. The }/ instance lets you convert an arbitrary-valued ( to string form; showing a ( value is occasionally useful when debugging or diagnosing the behaviour of a concurrent program.Note: in GHC, if you have a (, you essentially have a pointer to the thread itself. This means the thread itself can't be garbage collected until you drop the (>. This misfeature will hopefully be corrected at a later date.(baseEvery thread has an allocation counter that tracks how much memory has been allocated by the thread. The counter is initialized to zero, and ( sets the current value. The allocation counter counts *down*, so in the absence of a call to ( its value is the negation of the number of bytes of memory allocated by the thread.7There are two things that you can do with this counter:0Use it as a simple profiling mechanism, with (.!Use it as a resource limit. See (.8Allocation accounting is accurate only to about 4Kbytes.(baseReturn the current value of the allocation counter for the current thread.(baseEnables the allocation counter to be treated as a limit for the current thread. When the allocation limit is enabled, if the allocation counter counts down below zero, the thread will be sent the ! asynchronous exception. When this happens, the counter is reinitialised (by default to 100K, but tunable with the +RTS -xq option) so that it can handle the exception and perform any necessary clean up. If it exhausts this additional allowance, another ! exception is sent, and so forth. Like other asynchronous exceptions, the !3 exception is deferred while the thread is inside  or an exception handler in .,Note that memory allocation is unrelated to  live memory, also known as heap residency. A thread can allocate a large amount of memory and retain anything between none and all of it. It is better to think of the allocation limit as a limit on CPU time , rather than a limit on memory.Compared to using timeouts, allocation limits don't count time spent blocked or in foreign calls.(base;Disable allocation limit processing for the current thread.(base Creates a new thread to run the ; computation passed as the first argument, and returns the ( of the newly created thread.&The new thread will be a lightweight, unbound thread. Foreign calls made by this thread are not guaranteed to be made by any particular OS thread; if you need foreign calls to be made by a particular OS thread, then use  instead.The new thread inherits the masked state of the parent (see r).The newly created thread has an exception handler that discards the exceptions !, !, and !, and passes all other exceptions to the uncaught exception handler.(baseLike (, but the child thread is passed a function that can be used to unmask asynchronous exceptions. This function is typically used in the following way  ... mask_ $ forkIOWithUnmask $ \unmask -> catch (unmask ...) handlerso that the exception handler in the child thread is established with asynchronous exceptions masked, meanwhile the main body of the child thread is executed in the unmasked state.Note that the unmask function passed to the child thread should only be used in that thread; the behaviour is undefined if it is invoked in a different thread.(baseLike (, but lets you specify on which capability the thread should run. Unlike a ( thread, a thread created by (; will stay on the same capability for its entire lifetime (( threads can migrate between capabilities according to the scheduling policy). ( is useful for overriding the scheduling policy when you know in advance how best to distribute the threads.The  argument specifies a capability number (see (). Typically capabilities correspond to physical processors, but the exact behaviour is implementation-dependent. The value passed to ( is interpreted modulo the total number of capabilities as returned by (.9GHC note: the number of capabilities is specified by the +RTS -N option when the program is started. Capabilities can be fixed to actual processor cores with +RTS -qa if the underlying operating system supports that, although in practice this is usually unnecessary (and may actually degrade performance in some cases - experimentation is recommended).(baseLike (<, but the child thread is pinned to the given CPU, as with (.(basethe value passed to the +RTS -N flag. This is the number of Haskell threads that can run truly simultaneously at any given time, and is typically set to the number of physical processor cores on the machine.&Strictly speaking it is better to use (<, because the number of capabilities might vary at runtime.(baseReturns the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. To change this value, use (.(baseSet the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. The number passed to ( is interpreted modulo this value. The initial value is given by the +RTS -N runtime flag.This is also the number of threads that will participate in parallel garbage collection. It is strongly recommended that the number of capabilities is not set larger than the number of physical processor cores, and it may often be beneficial to leave one or more cores free to avoid contention with other processes in the machine.(base/Returns the number of CPUs that the machine has(base>Returns the number of sparks currently in the local spark pool(base( raises the !* exception in the given thread (GHC only). )killThread tid = throwTo tid ThreadKilled(base(? raises an arbitrary exception in the target thread (GHC only).Exception delivery synchronizes between the source and target thread: ( does not return until the exception has been raised in the target thread. The calling thread can thus be certain that the target thread has received the exception. Exception delivery is also atomic with respect to other exceptions. Atomicity is a useful property to have when dealing with race conditions: e.g. if there are two threads that can kill each other, it is guaranteed that only one of the threads will get to kill the other.Whatever work the target thread was doing when the exception was raised is not lost: the computation is suspended until required by another thread.If the target thread is currently making a foreign call, then the exception will not be raised (and hence ( will not return) until the call has completed. This is the case regardless of whether the call is inside a = or not. However, in GHC a foreign call can be annotated as  interruptible, in which case a ( will cause the RTS to attempt to cause the call to return; see the GHC documentation for more details.!Important note: the behaviour of ( differs from that described in the paper "Asynchronous exceptions in Haskell" ( =http://research.microsoft.com/~simonpj/Papers/asynch-exns.htm). In the paper, ( is non-blocking; but the library implementation adopts a more synchronous design in which ( does not return until the exception is received by the target thread. The trade-off is discussed in Section 9 of the paper. Like any blocking operation, ( is therefore interruptible (see Section 5.3 of the paper). Unlike other interruptible operations, however, ( is always3 interruptible, even if it does not actually block.There is no guarantee that the exception will be delivered promptly, although the runtime will endeavour to ensure that arbitrary delays don't occur. In GHC, an exception can only be raised when a thread reaches a  safe point, where a safe point is where memory allocation occurs. Some loops do not perform any memory allocation inside the loop and therefore cannot be interrupted by a (.If the target of (: is the calling thread, then the behaviour is the same as r, except that the exception is thrown as an asynchronous exception. This means that if there is an enclosing pure computation, which would be the case if the current IO operation is inside  or , that computation is not permanently replaced by the exception, but is suspended as if it had received an asynchronous exception. Note that if ( is called with the current thread as the target, the exception will be thrown even if the thread is currently inside  or .(base Returns the (" of the calling thread (GHC only).(baseThe ( action allows (forces, in a co-operative multitasking implementation) a context-switch to any other currently runnable threads (if any), and is occasionally useful when implementing concurrency abstractions.(base( stores a string as identifier for this thread if you built a RTS with debugging support. This identifier will be used in the debugging output to make distinction of different threads easier (otherwise you only have the thread state object's address in the heap).Other applications like the graphical Concurrent Haskell Debugger ( +http://www.informatik.uni-kiel.de/~fhu/chd/) may choose to overload ( for their purposes as well.(base0Internal function used by the RTS to run sparks.(baseReturns the number of the capability on which the thread is currently running, and a boolean indicating whether the thread is locked to that capability or not. A thread is locked to a capability if it was created with forkOn.(baseMake a weak pointer to a (. It can be important to do this if you want to hold a reference to a (1 while still allowing the thread to receive the BlockedIndefinitely family of exceptions (e.g. !). Holding a normal () reference will prevent the delivery of BlockedIndefinitely exceptions because the reference could be used as the target of (. at any time, which would unblock the thread. Holding a  Weak ThreadId, on the other hand, will not prevent the thread from receiving BlockedIndefinitely? exceptions. It is still possible to throw an exception to a  Weak ThreadId, but the caller must use  deRefWeak5 first to determine whether the thread still exists.(base7Make a StablePtr that can be passed to the C function hs_try_putmvar(). The RTS wants a  to the underlying , but a  can only refer to lifted types, so we have to cheat by coercing.(baseUnsafely performs IO in the STM monad. Beware: this is a highly dangerous thing to do.The STM implementation will often run transactions multiple times, so you need to be prepared for this if your IO has any side effects.The STM implementation will abort transactions that are known to be invalid and need to be restarted. This may happen in the middle of (, so make sure you don't acquire any resources that need releasing (exception handlers are ignored when aborting the transaction). That includes doing any IO using Handles, for example. Getting this wrong will probably lead to random deadlocks.The transaction may have seen an inconsistent view of memory when the IO runs. Invariants that you expect to be true throughout your program may not be true inside a transaction, due to the way transactions are implemented. Normally this wouldn't be visible to the programmer, but using ( can expose it.(base+Perform a series of STM actions atomically.Using ( inside an  or  subverts some of guarantees that STM provides. It makes it possible to run a transaction inside of another transaction, depending on when the thunk is evaluated. If a nested transaction is attempted, an exception is thrown by the runtime. It is possible to safely use ( inside  or , but the typechecker does not rule out programs that may attempt nested transactions, meaning that the programmer must take special care to prevent these.However, there are functions for creating transactional variables that can always be safely called in . See: (, , , , , and .Using  inside of (3 is also dangerous but for different reasons. See ( for more on this.(baseRetry execution of the current memory transaction because it has seen values in (3s which mean that it should not continue (e.g. the (s represent a shared buffer that is now empty). The implementation may block the thread until one of the (5s that it has read from has been updated. (GHC only)(base/Compose two alternative STM actions (GHC only).If the first action completes without retrying then it forms the result of the (. Otherwise, if the first action retries, then the second action is tried in its place. If both actions retry then the ( as a whole retries.(base A variant of " that can only be used within the ( monad.Throwing an exception in STM aborts the transaction and propagates the exception. If the exception is caught via (, only the changes enclosed by the catch are rolled back; changes made outside of ( persist.-If the exception is not caught inside of the (, it is re-thrown by (, and the entire ( is rolled back. Although (/ has a type that is an instance of the type of *, the two functions are subtly different: ;throw e `seq` x ===> throw e throwSTM e `seq` x ===> x+The first example will cause the exception e8 to be raised, whereas the second one won't. In fact, ( will only cause an exception to be raised when it is used within the ( monad. The () variant should be used in preference to # to raise an exception within the (= monad because it guarantees ordering with respect to other ( operations, whereas  does not.(base&Exception handling within STM actions.( m f! catches any exception thrown by m using (, using the function f to handle the exception. If an exception is thrown, any changes made by m( are rolled back, but changes prior to m persist.(base Create a new ( holding a value supplied(baseIO version of (*. This is useful for creating top-level (s using L, because using ( inside L isn't possible.(base%Return the current value stored in a (. This is equivalent to # readTVarIO = atomically . readTVarbut works much faster, because it doesn't perform a complete transaction, it just reads the current value of the (.(base%Return the current value stored in a (.(base Write the supplied value into a (.(base Provide an % action with the current value of an . The < will be empty for the duration that the action is running.(baseModify the value of an .(base(base(base(base(base(base(base(base(base(base(base(base(base(base(base(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((0(0"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental"non-portable (extended exceptions) Trustworthy2޾#(base)Thrown when the program attempts to call  atomically , from the stm" package, inside another call to  atomically.(baseThrown when the runtime system detects that the computation is guaranteed not to terminate. Note that there is no guarantee that the runtime system will notice whether any given computation is guaranteed to terminate or not.( baseAn expression that didn't typecheck during compile time was called. This is only possible with -fdefer-type-errors. The String, gives details about the failed type check.(baseA class method without a definition (neither a default definition, nor a definition in the appropriate instance) was called. The String- gives information about which method it was.(baseA record update was performed on a constructor without the appropriate field. This can only happen with a datatype with multiple constructors, where some fields are in one constructor but not another. The String gives information about the source location of the record update.(base,An uninitialised record field was used. The String gives information about the source location where the record was constructed.(baseA record selector was applied to a constructor without the appropriate field. This can only happen with a datatype with multiple constructors, where some fields are in one constructor but not another. The String gives information about the source location of the record selector.(baseA pattern match failed. The String= gives information about the source location of the pattern.(base The function ( is like ., but it takes an extra argument which is an exception predicate, a function which selects which type of exceptions we're interested in. catchJust (\e -> if isDoesNotExistErrorType (ioeGetErrorType e) then Just () else Nothing) (readFile f) (\_ -> do hPutStrLn stderr ("No such file: " ++ show f) return "")Any other exceptions which are not matched by the predicate are re-raised, and may be caught by an enclosing , (, etc.(base A version of  with the arguments swapped around; useful in situations where the code for the handler is shorter. For example:  do handle (\NonTermination -> exitWith (ExitFailure 1)) $ ...(base A version of () with the arguments swapped around (see ().(baseThis function maps one exception into another as proposed in the paper "A semantics for imprecise exceptions".(base Similar to , but returns an  result which is ( a) if no exception of type e was raised, or ( ex) if an exception of type e was raised and its value is ex. If any other type of exception is raised then it will be propagated up to the next enclosing exception handler. 0 try a = catch (Right `liftM` a) (return . Left)(base A variant of ( that takes an exception predicate to select which exceptions are caught (c.f. (). If the exception does not match the predicate, it is re-thrown.(baseLike (, but only performs the final action if there was an exception raised by the computation.(baseWhen you want to acquire a resource, do some work with it, and then release the resource, it is a good idea to use ( , because ( will install the necessary exception handler to release the resource in the event that an exception is raised during the computation. If an exception is raised, then (= will re-raise the exception (after performing the release).#A common example is opening a file: bracket (openFile "filename" ReadMode) (hClose) (\fileHandle -> do { ... })The arguments to (< are in this order so that we can partially apply it, e.g.: 8withFile name mode = bracket (openFile name mode) hClose(baseA specialised variant of (+ with just a computation to run afterward.(base A variant of ( where the return value from the first computation is not required.(baseLike (, but only performs the final action if there was an exception raised by the in-between computation.(base(base(base(base(base(base(base(base(base(base( base( base)base)base)base)base(basePredicate to select exceptionsbaseComputation to runbaseHandler(base-computation to run first ("acquire resource")base,computation to run last ("release resource")basecomputation to run in-between(basecomputation to run firstbase?computation to run afterward (even if an exception was raised)(base-computation to run first ("acquire resource")base,computation to run last ("release resource")basecomputation to run in-between  !!!!!!!!!!!!!!!!!!!!!!!!!!!(((((((((((((((((((((((((((((( !!!!!!!!!!!!!!((((!!!!!!!!!!!!((((((((((((!(((((((((((( ((q"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy )baseThe construct ) comp exposes IO errors which occur within a computation, and which are not fully handled.Non-I/O exceptions are not caught by this variant; to catch all exceptions, use r from Control.Exception.)base Construct an  of the given type where the second argument describes the error location and the third and fourth argument contain the file handle and file path of the file involved in the error if applicable.)baseAn error indicating that an ? operation failed because one of its arguments already exists.)baseAn error indicating that an ? operation failed because one of its arguments does not exist.)baseAn error indicating that an  operation failed because one of its arguments is a single-use resource, which is already being used (for example, opening the same file twice for writing might give this error).)baseAn error indicating that an . operation failed because the device is full.)baseAn error indicating that an < operation failed because the end of file has been reached.)baseAn error indicating that an  operation failed because the operation was not possible. Any computation which returns an  result may fail with ). In some cases, an implementation will not be able to distinguish between the possible error causes. In this case it should fail with ).)baseAn error indicating that an  operation failed because the user does not have sufficient operating system privilege to perform that operation.)base3A programmer-defined error value constructed using .)baseAn error indicating that the operation failed because the resource vanished. See ).)baseI/O error where the operation failed because one of its arguments already exists.)baseI/O error where the operation failed because one of its arguments does not exist.)baseI/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.)baseI/O error where the operation failed because the device is full.)baseI/O error where the operation failed because the end of file has been reached.)base.I/O error where the operation is not possible.)baseI/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.)base%I/O error that is programmer-defined.)baseI/O error where the operation failed because the resource vanished. This happens when, for example, attempting to write to a closed socket or attempting to write to a named pipe that was deleted.)baseI/O error where the operation failed because one of its arguments already exists.)baseI/O error where the operation failed because one of its arguments does not exist.)baseI/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.)baseI/O error where the operation failed because the device is full.)baseI/O error where the operation failed because the end of file has been reached.)base.I/O error where the operation is not possible.)baseI/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.)base%I/O error that is programmer-defined.)baseI/O error where the operation failed because the resource vanished. See ).)base Catch any > that occurs in the computation and throw a modified version.)baseAdds a location description and maybe a file path and file handle to an . If any of the file handle or file path is not given the corresponding value in the  remains unaltered.)baseThe )3 function establishes a handler that receives any # raised in the action protected by ). An  is caught by the most recent handler established by one of the exception handling functions. These handlers are not selective: all s are caught. Exception propagation must be explicitly provided in a handler by re-raising any unwanted exceptions. For example, in f = catchIOError g (\e -> if IO.isEOFError e then return [] else ioError e) the function f returns []% when an end-of-file exception (cf. ) ) occurs in g; otherwise, the exception is propagated to the next outer handler.When an exception propagates outside the main program, the Haskell system prints the associated  value and exits the program.Non-I/O exceptions are not caught by this variant; to catch all exceptions, use r from Control.Exception..!!)))))))))))))))))))))))))))))))))))))))))).)))))))))))))))))))))!))))))))))))))))))!)))"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental:non-portable (requires universal quantification for runST)Unsafe)baseAllow the result of an 9 computation to be used (lazily) inside the computation. Note that if f is strict, ) f = _|_. )r"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental"non-portable (extended exceptions) Trustworthys)baseYou need this when using ).)baseSometimes you want to catch two different sorts of exception. You could do something like f = expr `catch` \ (ex :: ArithException) -> handleArith ex `catch` \ (ex :: IOException) -> handleIO exHowever, there are a couple of problems with this approach. The first is that having two exception handlers is inefficient. However, the more serious issue is that the second exception handler will catch exceptions in the first, e.g. in the example above, if  handleArith throws an  IOException1 then the second exception handler will catch it.Instead, we provide a function ), which would be used thus: f = expr `catches` [Handler (\ (ex :: ArithException) -> handleArith ex), Handler (\ (ex :: IOException) -> handleIO ex)])baseWhen invoked inside , this function allows a masked asynchronous exception to be raised, if one exists. It is equivalent to performing an interruptible operation (see #interruptible), but does not involve any actual blocking.When called outside  , or inside , this function has no effect.)base !!!!!!!!!!!!!!!!!!!!!!!!!(((((((((((((((((((((((((((()))) !!!!!!!!!!!!!!((((!!!!!!!!!!((((((((((((!()))(((((()(((((L"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableUnsafe)baseA slightly faster version of  that may not be safe to use with multiple threads. The unsafety arises when used like this: = unsafeFixIO $ \r -> do forkIO (print r) return (...).In this case, the child thread will receive a NonTermination0 exception instead of waiting for the value of r to be computed.))((c) The University of Glasgow, 2008-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy)baseConstruct an iconv-based  " for the given character set and ".As iconv is missing in some minimal environments (e.g. #10298), this checks to ensure that iconv is working properly before returning the encoding, returning  if not.))))))|((c) The University of Glasgow, 2008-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable TrustworthyA base*The Unicode encoding of the current locale baseThe Unicode encoding of the current locale, but allowing arbitrary undecodable bytes to be round-tripped through it.This   is used to decode and encode command line arguments and environment variables on non-Windows platforms.On Windows, this encoding *should not* be used if possible because the use of code pages is deprecated: Strings should be retrieved via the "wide" W-family of UTF-16 APIs instead baseThe Unicode encoding of the current locale, but where undecodable bytes are replaced with their closest visual match. Used for the  marshalling functions in Foreign.C.String)baseThe Latin1 (ISO8859-1) encoding. This encoding maps bytes directly to the first 256 Unicode code points, and is thus not a complete Unicode encoding. An attempt to write a character greater than '\255' to a  using the )# encoding will result in an error.)baseThe UTF-8 Unicode encoding)baseThe UTF-8 Unicode encoding, with a byte-order-mark (BOM; the byte sequence 0xEF 0xBB 0xBF). This encoding behaves like ), except that on input, the BOM sequence is ignored at the beginning of the stream, and on output, the BOM sequence is prepended.The byte-order-mark is strictly unnecessary in UTF-8, but is sometimes used to identify the encoding of a file.)baseThe UTF-16 Unicode encoding (a byte-order-mark should be used to indicate endianness).)base+The UTF-16 Unicode encoding (little-endian))base(The UTF-16 Unicode encoding (big-endian))baseThe UTF-32 Unicode encoding (a byte-order-mark should be used to indicate endianness).)base+The UTF-32 Unicode encoding (little-endian))base(The UTF-32 Unicode encoding (big-endian))base)base)base)base9base9base)baseInternal encoding of argv)baseAn encoding in which Unicode code points are translated to bytes by taking the code point modulo 256. When decoding, bytes are translated directly into the equivalent code point.This encoding never fails in either direction. However, encoding discards information, so encode followed by decode is not the identity.)base2Look up the named Unicode encoding. May fail withq if the encoding is unknownThe set of known encodings is system-dependent, but includes at least: UTF-8UTF-16, UTF-16BE, UTF-16LEUTF-32, UTF-32BE, UTF-32LEThere is additional notation (borrowed from GNU iconv) for specifying how illegal characters are handled: a suffix of //IGNORE, e.g.  UTF-8//IGNORE, will cause all illegal sequences on input to be ignored, and on output will drop all code points that have no representation in the target encoding. a suffix of  //TRANSLIT will choose a replacement character for illegal sequences or code points. a suffix of  //ROUNDTRIP will use a PEP383-style escape mechanism to represent any invalid bytes in the input as Unicode codepoints (specifically, as lone surrogates, which are normally invalid in UTF-32). Upon output, these special codepoints are detected and turned back into the corresponding original byte.In theory, this mechanism allows arbitrary data to be roundtripped via a   with no loss of data. In practice, there are two limitations to be aware of: This only stands a chance of working for an encoding which is an ASCII superset, as for security reasons we refuse to escape any bytes smaller than 128. Many encodings of interest are ASCII supersets (in particular, you can assume that the locale encoding is an ASCII superset) but many (such as UTF-16) are not.If the underlying encoding is not itself roundtrippable, this mechanism can fail. Roundtrippable encodings are those which have an injective mapping into Unicode. Almost all encodings meet this criteria, but some do not. Notably, Shift-JIS (CP932) and Big5 contain several different encodings of the same Unicode codepoint.On Windows, you can access supported code pages with the prefix CP; for example, "CP1250".' ))))))))))))))))))' )))))))))))) ))))))G"(c) The University of Glasgow 2011see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy base Returns a [String] representing the current call stack. This can be useful for debugging.The implementation uses the call-stack simulation maintained by the profiler, so it only works if the program was compiled with -prof7 and contains suitable SCC annotations (e.g. by using  -fprof-auto). Otherwise, the list returned is likely to be empty or uninformative.)base.A cost-centre from GHC's cost-center profiler.)base4A cost-centre stack from GHC's cost-center profiler.)baseReturns the current ) (value is nullPtr if the current program was not compiled with profiling support). Takes a dummy argument which can be used to avoid the call to  getCurrentCCS being floated out by the simplifier, which would result in an uninformative stack (CAF).)baseGet the )! associated with the given value.)baseRun a computation with an empty cost-center stack. For example, this is used by the interpreter to run an interpreted computation without the call stack showing that it was invoked from GHC.)baseGet the ) at the head of a ).)baseGet the tail of a ).)baseGet the label of a ).)baseGet the module of a ).)baseGet the source span of a ).)base Format a ) as a list of lines.)base*Get the stack trace attached to an object. ))))))))))))) )))))))))))))"(c) The University of Glasgow 2011see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy)baseLike the function  , but appends a stack trace to the error message if one is available.) base&Pop the most recent call-site off the .This function, like ], has no effect on a frozen .) baseReturn the current .$Does *not* include the call-site of ).) base;Perform some computation without adding new entries to the .$\]  )))))))))))))))))$) ) )\ )])  ))))))))))))((c) The University of Glasgow, 1994-2001see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy#$9base Just like  , but interleaves calls to   with calls to  . in order to make as much progress as possible)basesyncs the file with the buffer, including moving the file pointer backwards in the case of a read buffer. This can fail on a non-seekable read Handle.)base4flushes the Char buffer only. Works on all Handles.)base makes a new !)baselike ), except that a ! is created with two independent buffers, one for reading and one for writing. Used for full-duplex streams, such as network sockets.)base.the underlying IO device, which must support  ,   and basea string describing the !:, e.g. the file path for a file. Used in error messages.()))))))))))))))))))))))))))))))))))))***()))))))))))))))))))))))*)**))))))))))))) Trustworthy!*base Computation * is the "raw" version of  , similar to argv in other languages. It returns a list of the program's command line arguments, starting with the program name, and including those normally eaten by the RTS (+RTS ... -RTS).**J"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (concurrency) Trustworthy'*baseTake a value from an , put a new value into the  and return the value taken. This function is atomic only if there are no other producers for this .*base* is an exception-safe wrapper for operating on the contents of an . This operation is exception-safe: it will replace the original contents of the " if an exception is raised (see Control.Exception). However, it is only atomic if there are no other producers for this .*baseLike * , but the IO action in the second argument is executed with asynchronous exceptions masked.*base;An exception-safe wrapper for modifying the contents of an  . Like *, *- will replace the original contents of the  if an exception is raised during the operation. This function is only atomic if there are no other producers for this .*baseA slight variation on *' that allows a value to be returned (b+) in addition to the modified value of the .*baseLike * , but the IO action in the second argument is executed with asynchronous exceptions masked.*baseLike * , but the IO action in the second argument is executed with asynchronous exceptions masked.*baseMake a  pointer to an 8, using the second argument as a finalizer to run when  is garbage-collected****************** Trustworthy(9base9base9base9base9base9base9base9base99 Trustworthy) **********Unsafe+9base/*baseThe event manager state.9baseAn edit to apply to a 9.9base5A priority search queue, with timeouts as priorities.*base#Callback invoked on timeout events.*baseA timeout registration cookie.9baseCreate a new event manager.9base8Asynchronously shuts down the event manager, if running.9baseStart handling events. This function loops until told to stop, using 9.Note%: This loop can only be run once per *>, as it closes all of its control resources when it finishes.9baseWake up the event manager.*baseRegister a timeout in the given number of microseconds. The returned * can be used to later unregister or update the timeout. The timeout is automatically unregistered after the given time has passed.*baseUnregister an active timeout.*baseUpdate an active timeout to fire in the given number of microseconds.9base9base9base*9**999999999*** Trustworthy#$>9*baseThe event manager state.*baseCallback invoked on I/O events.*base&A file descriptor registration cookie.*baseCreate a new event manager.9base Create a new * with the given polling backend.9base8Asynchronously shuts down the event manager, if running.9baseAsynchronously tell the thread executing the event manager loop to exit.9baseStart handling events. This function loops until told to stop, using 9.Note%: This loop can only be run once per *>, as it closes all of its control resources when it finishes.9baseTo make a step, we first do a non-blocking poll, in case there are already events ready to handle. This improves performance because we can make an unsafe foreign C call, thereby avoiding forcing the current Task to release the Capability and forcing a context switch. If the poll fails to find events, we yield, putting the poll loop thread at end of the Haskell run queue. When it comes back around, we do one more non-blocking poll, in case we get lucky and have ready events. If that also returns no events, then we do a blocking poll.9baseRegister interest in the given events, without waking the event manager thread. The  return value indicates whether the event manager ought to be woken.Note that the event manager is generally implemented in terms of the platform's select or epoll system call, which tend to vary in what sort of fds are permitted. For instance, waiting on regular files is not allowed on many platforms.*baseregisterFd mgr cb fd evs lt" registers interest in the events evs on the file descriptor fd for lifetime lt. cb is called for each event that occurs. Returns a cookie that can be handed to *.9baseWake up the event manager.*baseDrop a previous file descriptor registration, without waking the event manager thread. The return value indicates whether the event manager ought to be woken.*base-Drop a previous file descriptor registration.*base+Close a file descriptor in a race-safe way.9baseClose a file descriptor in a race-safe way. It assumes the caller will update the callback tables and that the caller holds the callback table lock for the fd. It must hold this lock because this command executes a backend command on the fd.9base>Call the callbacks corresponding to the given file descriptor.9base9base9base9base''''''*9***999*9999999*9***9 TrustworthyD 9baseSuspends the current thread for a given number of microseconds (GHC only).There is no guarantee that the thread will be rescheduled promptly when the delay has expired, but the thread will never continue to run earlier than specified.9baseSet the value of returned TVar to True after a given number of microseconds. The caveats associated with threadDelay also apply.9baseBlock the current thread until data is available to read from the given file descriptor.This will throw an  if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with 9, use 9.9baseBlock the current thread until the given file descriptor can accept data to write.This will throw an  if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with 9, use 9.9base2Close a file descriptor in a concurrency-safe way.9Any threads that are blocked on the file descriptor via 9 or 93 will be unblocked by having IO exceptions thrown.9baseAllows a thread to use an STM action to wait for a file descriptor to be readable. The STM action will retry until the file descriptor has data ready. The second element of the return value pair is an IO action that can be used to deregister interest in the file descriptor.The STM action will throw an  if the file descriptor was closed while the STM action is being executed. To safely close a file descriptor that has been used with 9, use 9.9baseAllows a thread to use an STM action to wait until a file descriptor can accept a write. The STM action will retry while the file until the given file descriptor can accept a write. The second element of the return value pair is an IO action that can be used to deregister interest in the file descriptor.The STM action will throw an  if the file descriptor was closed while the STM action is being executed. To safely close a file descriptor that has been used with 9, use 9.*baseRetrieve the system event manager for the capability on which the calling thread is running.This function always returns  the current thread's event manager when using the threaded RTS and  otherwise.9baseThe ioManagerLock protects the 9 value: Only one thread at a time can start or shutdown event managers.9baseAction that performs the close.baseFile descriptor to close. 99999999**99((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) TrustworthyL*baseBlock the current thread until data is available to read on the given file descriptor (GHC only).This will throw an  if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with *, use *.*baseBlock the current thread until data can be written to the given file descriptor (GHC only).This will throw an  if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with *, use *.*baseReturns an STM action that can be used to wait for data to read from a file descriptor. The second returned value is an IO action that can be used to deregister interest in the file descriptor.*baseReturns an STM action that can be used to wait until data can be written to a file descriptor. The second returned value is an IO action that can be used to deregister interest in the file descriptor.*baseClose a file descriptor in a concurrency-safe way (GHC only). If you are using * or * to perform blocking I/O, you must use this function to close file descriptors, or blocked threads may not be woken.9Any threads that are blocked on the file descriptor via * or *3 will be unblocked by having IO exceptions thrown.*baseSuspends the current thread for a given number of microseconds (GHC only).There is no guarantee that the thread will be rescheduled promptly when the delay has expired, but the thread will never continue to run earlier than specified.*baseSwitch the value of returned ( from initial value  to  after a given number of microseconds. The caveats associated with * also apply.*base.Low-level action that performs the real close.baseFile descriptor to close. ********* *********((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable TrustworthyO*baseOpen a file and make an *4 for it. Truncates the file to zero size when the  is .*baseMake a * from an existing file descriptor. Fails if the FD refers to a directory. If the FD refers to a file, * locks the file according to the Haskell 2010 single writer/multiple reader locking semantics (this is why we need the  argument too).*base*base*base*base*base file to openbasemode in which to open the filebase#open the file in non-blocking mode?*baseis a socket (on Windows)baseis in non-blocking mode on Unix****************************((c) The University of Glasgow, 1992-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy#$h *base Computation * hdl t+ waits until input is available on handle hdl. It returns " as soon as input is available on hdl, or ! if no input is available within t milliseconds. Note that * waits until one or more full  characters are available, which means that it needs to do decoding, and hence may fail with a decoding error.If t is less than zero, then  hWaitForInput waits indefinitely.This operation may fail with:)% if the end of file has been reached.a decoding error, if the input begins with an invalid byte sequence in this Handle's encoding.'NOTE for GHC users: unless you use the  -threaded flag, hWaitForInput hdl t where t >= 0 will block all other Haskell threads for the duration of the call. It behaves like a safe foreign call in this respect.*base Computation * hdl8 reads a character from the file or channel managed by hdl*, blocking until a character is available.This operation may fail with:)% if the end of file has been reached.*base Computation * hdl3 reads a line from the file or channel managed by hdl.This operation may fail with:)8 if the end of file is encountered when reading the first character of the line.If * encounters end-of-file at any other point while reading in a line, it is treated as a line terminator and the (partial) line is returned.*base Computation * hdl returns the list of characters corresponding to the unread portion of the channel or file managed by hdl+, which is put into an intermediate state,  semi-closed. In this state, hdl1 is effectively closed, but items are read from hdl: on demand and accumulated in a special list returned by * hdl.Any operation that fails because a handle is closed, also fails if a handle is semi-closed. The only exception is '. A semi-closed handle becomes closed:if  is applied to it; allocates and returns a new, open handle to manage the file file. It manages input if mode is  , output if mode is  or (, and both input and output if mode is .If the file does not exist and it is opened for output, it should be created as a new file. If mode is  and the file already exists, then it should be truncated to zero length. Some operating systems delete empty files, so there is no guarantee that the file will exist following an * with mode  unless it is subsequently written to successfully. The handle is positioned at the end of the file if mode is , and otherwise at the beginning (in which case its internal position is 0). The initial buffer mode is implementation-dependent.This operation may fail with:q8 if the file is already open and cannot be reopened;q if the file does not exist or (on POSIX systems) is a FIFO without a reader and  was requested; orq< if the user does not have permission to open the file.Note: if you will be working with files containing binary data, you'll want to be using *.*baseLike *, but opens the file in ordinary blocking mode. This can be useful for opening a FIFO for writing: if we open in non-blocking mode then the open will fail if there are no readers, whereas a blocking open will block until a reader appear.Note: when blocking happens, an OS thread becomes tied up with the processing, so the program must have at least another OS thread if it wants to unblock itself. By corollary, a non-threaded runtime will need a process-external trigger in order to become unblocked.*baseLike *, but open the file in binary mode. On Windows, reading a file in text mode (which is the default) will translate CRLF to LF, and writing will translate LF to CRLF. This is usually what you want with text files. With binary files this is undesirable; also, as usual under Microsoft operating systems, text mode treats control-Z as EOF. Binary mode turns off all special treatment of end-of-line and end-of-file characters. (See also .)*base&Old API kept to avoid breaking clients*baseTurn an existing file descriptor into a Handle. This is used by various external libraries to make Handles.Makes a binary Handle. This is for historical reasons; it should probably be a text Handle with the default encoding and newline translation instead.*baseTurn an existing Handle into a file descriptor. This function throws an IOError if the Handle does not reference a file descriptor. !********* *!********None u 99999:::::pNone y* baseIf a ! references a file descriptor, attempt to lock contents of the underlying file in appropriate mode. If the file is already locked in incompatible mode, this function blocks until the lock is established. The lock is automatically released upon closing a !.Things to be aware of:1) This function may block inside a C call. If it does, in order to be able to interrupt it with asynchronous exceptions and/or for other threads to continue working, you MUST use threaded version of the runtime system.2) The implementation uses  LockFileEx on Windows and flock8 otherwise, hence all of their caveats also apply here./3) On non-Windows platforms that don't support flock& (e.g. Solaris) this function throws FileLockingNotImplemented. We deliberately choose to not provide fcntl based locking instead because of its broken semantics.* baseNon-blocking version of *.* baseRelease a lock taken with * or *.******None z;:::((c) The University of Glasgow, 1994-2009see libraries/base/LICENSElibraries@haskell.org provisional non-portable Trustworthy#$!base The action ! hdl1 causes any items buffered for output in handle hdl0 to be sent immediately to the operating system.This operation may fail with:q if the device is full;q if a system resource limit would be exceeded. It is unspecified whether the characters in the buffer are discarded or retained under these circumstances.*base Computation * hdl makes handle hdl/ closed. Before the computation finishes, if hdl+ is writable its buffer is flushed as for !. Performing * on a handle that has already been closed has no effect; doing so is not an error. All other operations on a closed handle will fail. If *; fails for any reason, any further operations (apart from *&) on the handle will still fail as if hdl had been successfully closed.*base For a handle hdl% which attached to a physical file, * hdl. returns the size of that file in 8-bit bytes.*base* hdl size) truncates the physical file with handle hdl to size bytes.*baseFor a readable handle hdl, * hdl returns ' if no further input can be taken from hdl or for a physical file, if the current I/O position is equal to the length of the file. Otherwise, it returns .NOTE: * may block, because it has to attempt to read from the stream to determine whether there is any more data to be read.*baseThe computation * is identical to * , except that it works only on *.*base Computation * returns the next character from the handle without removing it from the input buffer, blocking until a character is available.This operation may fail with:q% if the end of file has been reached.*base Computation * hdl mode( sets the mode of buffering for handle hdl on subsequent reads and writes.#If the buffer mode is changed from   or   to  , thenif hdl+ is writable, the buffer is flushed as for !;if hdl: is not writable, the contents of the buffer is discarded.This operation may fail with:q if the handle has already been used for reading or writing and the implementation does not allow the buffering mode to be changed.*base The action * hdl encoding+ changes the text encoding for the handle hdl to encoding. The default encoding when a ! is created is 6, namely the default encoding for the current locale. To create a ! with no encoding at all, use *8. To stop further encoding or decoding on an existing !, use *.* may need to flush buffered data in order to change the encoding.*baseReturn the current   for the specified !, or  if the ! is in binary mode.Note that the   remembers nothing about the state of the encoder/decoder in use on this !>. For example, if the encoding in use is UTF-16, then using * and * to save and restore the encoding may result in an extra byte-order-mark being written to the file.*base The action * hdl flushes all buffered data in hdl, including any buffered read data. Buffered read data is flushed by seeking the file position back to the point before the bufferred data was read, and hence only works if hdl is seekable (see *).This operation may fail with:q if the device is full;q if a system resource limit would be exceeded. It is unspecified whether the characters in the buffer are discarded or retained under these circumstances;q if hdl1 has buffered read data, and is not seekable.*base Computation * hdl& returns the current I/O position of hdl! as a value of the abstract type *.*base If a call to * hdl returns a position p, then computation * p sets the position of hdl5 to the position it held at the time of the call to *.This operation may fail with:q2 if a system resource limit would be exceeded.*base Computation *  hdl mode i sets the position of handle hdl depending on mode. The offset i" is given in terms of 8-bit bytes.If hdl is block- or line-buffered, then seeking to a position which is not in the current buffer will first cause any items in the output buffer to be written to the device, and then cause the input buffer to be discarded. Some handles may not be seekable (see *), or only support a subset of the possible positioning operations (for instance, it may only be possible to seek to the end of a tape, or to a positive offset from the beginning or current position). It is not possible to set a negative I/O position, or for a physical file, an I/O position beyond the current end-of-file.This operation may fail with:q if the Handle is not seekable, or does not support the requested seek mode.q2 if a system resource limit would be exceeded.*base Computation * hdl- returns the current position of the handle hdl, as the number of bytes from the beginning of the file. The value returned may be subsequently passed to *2 to reposition the handle to the current position.This operation may fail with:q if the Handle is not seekable.*base Computation * hdl) returns the current buffering mode for hdl.*base;Set the echoing status of a handle connected to a terminal.*base;Get the echoing status of a handle connected to a terminal.*base&Is the handle connected to a terminal?*baseSelect binary mode () or text mode () on a open handle. (See also *.)$This has the same effect as calling * with ), together with * with !.*baseSet the   on the specified !'. All buffered data is flushed first.*baseReturns a duplicate of the original handle, with its own buffer. The two Handles will share a file pointer, however. The original handle's buffer is flushed, including discarding any input data, before the handle is duplicated.*baseMakes the second handle a duplicate of the first handle. The second handle will be closed first, if it is not already.?This can be used to retarget the standard Handles, for example: >do h <- openFile "mystdout" WriteMode hDuplicateTo h stdout*base* is in the  monad, and gives more comprehensive output than the (pure) instance of } for !.*base*base !!!!!!)))********************************************! ))*********!****)******* ************ !!!!************"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy QbaseThe  function outputs a value of any printable type to the standard output device. Printable types are those that are instances of class }; 2 converts values to strings for output using the  operation and adds a newline.For example, a program to print the first 20 integers and their powers of 2 could be written as: (main = print ([(n, 2^n) | n <- [0..19]])*base:Write a character to the standard output device (same as * !).*base7Write a string to the standard output device (same as * !).*base The same as *, but adds a newline character.*base:Read a character from the standard input device (same as * *).*base5Read a line from the standard input device (same as * *).*baseThe * operation returns all user input as a single string, which is read lazily as it is needed (same as * *).+baseThe + operation returns all user input as a single string, which is fully read before being returned (same as * *).+baseThe +# function takes a function of type String->String as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.+baseThe + function reads a file and returns the contents of the file as a string. The file is read lazily, on demand, as with *.+baseThe + function reads a file and returns the contents of the file as a string. The file is fully read before being returned, as with +.+baseThe computation + file str function writes the string str, to the file file.+baseThe computation + file str function appends the string str, to the file file. Note that + and + write a literal string to a file. To write a value of any printable type, as with  , use the 1 function to convert the value to a string first. >main = appendFile "squares" (show [(x,x*x) | x <- [0,0.1..2]])+baseThe + function combines * and +.+baseThe + function is similar to . except that it signals parse failure to the * monad instead of terminating the program.+base*The Unicode encoding of the current localeThis is the initial locale encoding: if it has been subsequently changed by )) this value will not reflect that change.+base Computation + hdl indicates whether at least one item is available for input from handle hdl.This operation may fail with:q% if the end of file has been reached.+base Computation + hdl t% writes the string representation of t given by the , function to the file or channel managed by hdl and appends a newline.This operation may fail with:q if the device is full; orq8 if another system resource limit would be exceeded.+base+ name mode act opens a file using *5 and passes the resulting handle to the computation act+. The handle will be closed on exit from +, whether by normal termination or by raising an exception. If closing the handle raises an exception, then this exception will be raised by +& rather than any exception raised by act.+base+ name mode act opens a file using *5 and passes the resulting handle to the computation act+. The handle will be closed on exit from +<, whether by normal termination or by raising an exception.+baseThe implementation of  for . If the function passed to +9 inspects its argument, the resulting action will throw !.+baseThe function creates a temporary file in ReadWrite mode. The created file isn't deleted automatically, so you need to delete it manually.The file is created with permissions such that only the current user can read/write it.With some exceptions (see below), the file will be created securely in the sense that an attacker should not be able to cause openTempFile to overwrite another file on the filesystem using your credentials, by putting symbolic links (on Unix) in the place where the temporary file is to be created. On Unix the O_CREAT and O_EXCL7 flags are used to prevent this attack, but note that O_EXCL is sometimes not supported on NFS filesystems, so if you rely on this behaviour it is best to use local filesystems only.+baseLike +), but opens the file in binary mode. See * for more comments.+baseLike +', but uses the default file permissions+baseLike +', but uses the default file permissions+base%Directory in which to create the filebaseFile name template. If the template is "foo.ext" then the created file will be "fooXXX.ext" where XXX is some random number. Note that this should not contain any path separator characters. !!!!!!!)))))))))))*************************************************+++++++++++++++++++!*!*+**++++**** **!**** ***********+********++******++++*******++++** )))))))))+))* ! !!!c Trustworthy+baseComputes the hash of a given file. This function loops over the handle, running in constant memory.++++++(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy@base+The fixed point of a monadic computation. @ f executes the action f only once, with the eventual output fed back as the input. Hence f! should not be strict, for then @ f would diverge.baseMonads having fixed points with a 'knot-tying' semantics. Instances of # should satisfy the following laws: Purity@ ( . h) =  ( h)Left shrinking (or Tightening)@+ (\x -> a >>= \y -> f x y) = a >>= \y -> @ (\x -> f x y)Sliding@ ( h . f) =  h (@ (f . h)), for strict h.Nesting@ (\x -> @ (\y -> f x y)) = @ (\x -> f x x)7This class is used in the translation of the recursive do% notation supported by GHC and Hugs.+ base+ base+ base+ base+ base+ base+base+base+base+base+base+base+base+base+base+base+ base+base+base@@(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology 2001 BSD-style (see the file LICENSE)ross@soi.city.ac.uk experimentalportable Trustworthy35678e+base0Identity functor and monad. (a non-strict monad)+base+base+base+base+base+baseThis instance would be equivalent to the derived instances of the + newtype if the + field were removed+baseThis instance would be equivalent to the derived instances of the + newtype if the + field were removed+ base+ base+ base+base+ base+ base+ base+ base+ base+ base+ base+ base+base+ base+ base+ base+ base:base:base++++++(c) Ross Paterson 20024BSD-style (see the LICENSE file in the distribution)libraries@haskell.org provisionalportable Trustworthy258I.BbaseLift a function to an arrow.DbaseSend the first component of the input through the argument arrow, and copy the rest unchanged to the output.FbaseFanin: Split the input between the two argument arrows and merge their outputs.The default definition may be overridden with a more efficient version if desired.+baseThe G operator expresses computations in which an output value is fed back as input, although the computation occurs only once. It underlies the rec/ value recursion construct in arrow notation. G# should satisfy the following laws:  extensionG (B f) = B (\ b ->  ( (\ (c,d) -> f (b,d))))left tighteningG (D h >>> f) = h >>> G fright tighteningG (f >>> D h) = G f >>> hslidingG (f >>> B ( *** k)) = G (B ( *** k) >>> f) vanishingG (G f) = G (B unassoc >>> f >>> B assoc) superposing+ (G f) = G (B assoc >>> + f >>> B unassoc)where 9assoc ((a,b),c) = (a,(b,c)) unassoc (a,(b,c)) = ((a,b),c)+baseThe + class is equivalent to t: any monad gives rise to a + arrow, and any instance of + defines a monad.+baseSome arrows allow application of arrow inputs to other inputs. Instances should satisfy the following laws: D (B (\x -> B (\y -> (x,y)))) >>> E =  D (B (g >>>)) >>> E = + g >>> E D (B (>>> h)) >>> E = E >>> h*Such arrows are equivalent to monads (see +).+base?Choice, for arrows that support it. This class underlies the if and case constructs in arrow notation.,Instances should satisfy the following laws: + (B f) = B (+ f) + (f >>> g) = + f >>> + g f >>> B  = B  >>> + f + f >>> B ( +++ g) = B ( +++ g) >>> + f + (+ f) >>> B assocsum = B assocsum >>> + fwhere assocsum (Left (Left x)) = Left x assocsum (Left (Right y)) = Right (Left y) assocsum (Right z) = Right (Right z)The other combinators have sensible default definitions, which may be overridden for efficiency.+baseFeed marked inputs through the argument arrow, passing the rest through unchanged to the output.+baseA mirror image of +.The default definition may be overridden with a more efficient version if desired.+baseSplit the input between the two argument arrows, retagging and merging their outputs. Note that this is in general not a functor.The default definition may be overridden with a more efficient version if desired.+baseA monoid on arrows.+base'An associative operation with identity +.+baseKleisli arrows of a monad.+baseThe basic arrow class.,Instances should satisfy the following laws: B id =  B (f >>> g) = B f >>> B g D (B f) = B (D f) D (f >>> g) = D f >>> D g D f >>> B  = B  >>> f D f >>> B ( *** g) = B ( *** g) >>> D f D (D f) >>> B assoc = B assoc >>> D fwhere assoc ((a,b),c) = (a,(b,c))The other combinators have sensible default definitions, which may be overridden for efficiency.+baseA mirror image of D.The default definition may be overridden with a more efficient version if desired.+baseSplit 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.+baseFanout: send the input to both argument arrows and combine their output.The default definition may be overridden with a more efficient version if desired.+base,The identity arrow, which plays the role of ? in arrow notation.+base$Precomposition with a pure function.+base%Postcomposition with a pure function.+base finalLeft "it failed"%runExcept $ optional canFail *> finalRight 42+base,base,base,base,base,base, base,base f <$> ZipList xs1 <*> ... <*> ZipList xsN = ZipList (zipWithN f xs1 ... xsN)where zipWithN refers to the zipWith% function of the appropriate arity (zipWith, zipWith3, zipWith4, ...). For example: (\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..] = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..]) = ZipList {getZipList = ["a5","b6b6","c7c7c7"]},base,base,base,base,base, base,base:base:base:base:base:base:base lkm ++++++++++lkm +++++++++ +*$Conor McBride and Ross Paterson 20054BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportable Trustworthy 2567>,baseFunctors representing data structures that can be traversed from left to right.A definition of ,! must satisfy the following laws:  Naturalityt . , f = , (t . f)) for every applicative transformation tIdentity, + = + Composition, ( . > g . f) =  . > (, g) . , fA definition of ,! must satisfy the following laws:  Naturalityt . , = , . > t) for every applicative transformation tIdentity, . > + = + Composition, . >  =  . > , . , where an applicative transformation is a function 1t :: (Applicative f, Applicative g) => f a -> g apreserving the  operations, i.e. t (l x) = l x t (f k x) = t f k t x and the identity functor + and composition functors  are from Data.Functor.Identity and Data.Functor.Compose.3A result of the naturality law is a purity law for , , l = l(The naturality law is implied by parametricity and thus so is the purity law [1, p15].)Instances are similar to v, e.g. given a data type 7data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)a suitable instance would be instance Traversable Tree where traverse f Empty = pure Empty traverse f (Leaf x) = Leaf <$> f x traverse f (Node l k r) = Node <$> traverse f l <*> f k <*> traverse f r:This is suitable even for abstract types, as the laws for k imply a form of associativity.6The superclass instances should satisfy the following:In the v instance, > should be equivalent to traversal with the identity applicative functor (,).In the  instance, ) should be equivalent to traversal with a constant applicative functor (,).References: [1] The Essence of the Iterator Pattern, Jeremy Gibbons and Bruno C. d. S. Oliveira,baseMap each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see ).,baseEvaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see ).,baseMap each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see ).,baseEvaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see ).,base, is , with its arguments flipped. For a version that ignores the results see ).,base, is , with its arguments flipped. For a version that ignores the results see ).,baseThe ,( function behaves like a combination of > and ); it applies a function to each element of a structure, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new structure.,baseThe ,( function behaves like a combination of > and ); it applies a function to each element of a structure, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new structure.,base)This function may be used as a value for > in a v instance, provided that , is defined. (Using , with a  instance defined only by ,$ will result in infinite recursion.) , f D + . , (+ . f) ,base)This function may be used as a value for ) in a  instance. , f D  . , ( . f) , base, base, base, base,base,base,base,base,base,base,base,base,base,base, base,base,base, base, base, base, base, base, base, base, base, base, base, base, base, base, base, base, base ,,,,,,,,,, ,,,,,,,,,,"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable TrustworthyS,baseThe ,& function takes two lists and returns  if all the elements of the first list occur, in order, in the second. The elements do not have to occur consecutively., x y is equivalent to  x ( y).Examples5isSubsequenceOf "GHC" "The Glorious Haskell Compiler"True)isSubsequenceOf ['a','d'..'z'] ['a'..'z']True!isSubsequenceOf [1..10] [10,9..0]False*,,,*,,, "(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableUnsafe &baseThe & function outputs the trace message given as its first argument, before returning the second argument as its result.'For example, this returns the value of f x but first outputs the message.let x = 123; f = show-trace ("calling f with x = " ++ show x) (f x)"calling f with x = 123123"The & function should only be used for debugging, or for monitoring execution. The function is not referentially transparent: its type indicates that it is a pure function but it has the side effect of outputting the trace message.,baseThe , function outputs the trace message from the IO monad. This sequences the output with respect to other IO actions.,base,baseLike &2 but returns the message instead of a third value.traceId "hello""hellohello",baseLike & , but uses $ on the argument to convert it to a  .This makes it convenient for printing the values of interesting variables or expressions inside a function. For example here we print the value of the variables x and y:0let f x y = traceShow (x,y) (x + y) in f (1+2) 5(3,5)8,baseLike ,6 but returns the shown value instead of a third value.'traceShowId (1+2+3, "hello" ++ "world")(6,"helloworld")(6,"helloworld"),baseLike &$ but returning unit in an arbitrary 3 context. Allows for convenient use in do-notation.Note that the application of , is not an action in the  context, as , is in the  type. While the fresh bindings in the following example will force the ,* expressions to be reduced every time the do-block is executed, traceM "not crashed" would only be reduced once, and the message would only be printed once. If your monad is in ,  . , may be a better option.:{ do x <- Just 3 traceM ("x: " ++ show x) y <- pure 12 traceM ("y: " ++ show y) pure (x*2 + y):}x: 3y: 12Just 18,baseLike , , but uses $ on the argument to convert it to a  .:{ do x <- Just 3 traceShowM x y <- pure 12 traceShowM y pure (x*2 + y):}312Just 18,baselike &<, but additionally prints a call stack if one is available.In the current GHC implementation, the call stack is only available if the program was compiled with -prof ; otherwise , behaves exactly like &,. Entries in the call stack correspond to SCC+ annotations, so it is a good idea to use  -fprof-auto or -fprof-auto-calls& to add SCC annotations automatically.,baseThe , function behaves like & with the difference that the message is emitted to the eventlog, if eventlog profiling is available and enabled at runtime.:It is suitable for use in pure code. In an IO context use , instead.Note that when using GHC's SMP runtime, it is possible (but rare) to get duplicate events emitted if two CPUs simultaneously evaluate the same thunk that uses ,.,baseThe , function emits a message to the eventlog, if eventlog profiling is available and enabled at runtime. Compared to ,, ,7 sequences the event with respect to other IO actions.,baseThe , function emits a marker to the eventlog, if eventlog profiling is available and enabled at runtime. The String is the name of the marker. The name is just used in the profiling tools to help you keep clear which marker is which.This function is suitable for use in pure code. In an IO context use , instead.Note that when using GHC's SMP runtime, it is possible (but rare) to get duplicate events emitted if two CPUs simultaneously evaluate the same thunk that uses ,.,baseThe , function emits a marker to the eventlog, if eventlog profiling is available and enabled at runtime. Compared to ,, ,7 sequences the event with respect to other IO actions. &,,,,,,,,,,,, &,,,,,,,,,,,,"(c) The University of Glasgow 2007/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy2>pbaseClass for string-like datastructures; used by the overloaded string extension (-XOverloadedStrings in GHC).,base (a ~ Char) context was introduced in 4.9.0.0, base, baseH  HO"(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental6non-portable (local universal quantification in ReadP)Safe8p baseA - represents the version of a software entity.An instance of p is provided, which implements exact equality modulo reordering of the tags in the , field.An instance of x= is also provided, which gives lexicographic ordering on the , fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.). This is expected to be sufficient for many uses, but note that you may need to use a more specific ordering for your versioning scheme. For example, some versioning schemes may include pre-releases which have tags "pre1", "pre2", and so on, and these would need to be taken into account when determining ordering. In some cases, date ordering may be more appropriate, so the application would have to look for date tags in the , field and compare those. The bottom line is, don't always assume that   and other x* operations are the right thing for every .Similarly, concrete representations of versions may differ. One possible concrete representation is provided (see , and ,), but depending on the application a different concrete representation may be more appropriate.baseConstruct tag-less ,baseThe numeric branch for this version. This reflects the fact that most software versions are tree-structured; there is a main trunk which is tagged with versions at various points (1,2,3...), and the first branch off the trunk after version 3 is 3.1, the second branch off the trunk after version 3 is 3.2, and so on. The tree can be branched arbitrarily, just by adding more digits.%We represent the branch as a list of , so version 3.2.1 becomes [3,2,1]. Lexicographic ordering (i.e. the default instance of x for [Int]*) gives the natural ordering of branches.,baseA version can be tagged with an arbitrary list of strings. The interpretation of the list of tags is entirely dependent on the entity that this version applies to.,base2Provides one possible concrete representation for . For a version with ,  = [1,2,3] and , = ["tag1","tag2"], the output will be 1.2.3-tag1-tag2.,base0A parser for versions in the format produced by ,.,base,base,base,base: base,,,,,,,,,,"(c) The University of Glasgow 2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe 3> +baseThe + function uses the user supplied function which projects an element out of every list element in order to first sort the input list and then to form groups by equality on these projected elementsQbaseThe Q class and its methods are intended to be used in conjunction with the OverloadedLists extension.RbaseThe R# function constructs the structure l from the given list of Item lSbaseThe S function takes the input list's length as a hint. Its behaviour should be equivalent to R5. The hint can be used to construct the structure l more efficiently compared to R. If the given hint does not equal to the input list's length the behaviour of S is not specified.TbaseThe T function extracts a list of Item l from the structure l.. It should satisfy fromList . toList = id.,baseThe ,= type function returns the type of items of the structure l.,base, ensures that all the elements of the list are identical and then returns that unique element,baseThe , function sorts a list of elements using the user supplied function to project something out of each element,baseAn implementation of the old atomicModifyMutVar# primop in terms of the new  primop, for backwards compatibility. The type of this function is a bit bogus. It's best to think of it as having type atomicModifyMutVar# :: MutVar# s a -> (a -> (a, b)) -> State# s -> ( State s, b #) but there may be code that uses this with other two-field record types.,base>> safeDiv 4 0 Nothing >>> safeDiv 4 2 Just 2 A definition of safeDiv using guards, but not N: safeDiv :: Int -> Int -> Maybe Int safeDiv x y | y /= 0 = Just (x `div` y) | otherwise = Nothing A definition of safeDiv using N and t do -notation: safeDiv :: Int -> Int -> Maybe Int safeDiv x y = do guard (y /= 0) return (x `div` y) ,base This generalizes the list-based  function.,base,Left-to-right composition of Kleisli arrows.'(bs , cs) a' can be understood as the do expression do b <- bs a cs b ,base-Right-to-left composition of Kleisli arrows. (,), with the arguments flipped.6Note how this operator resembles function composition ( ): (.) :: (b -> c) -> (a -> b) -> a -> c (<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c,baseRepeat an action indefinitely.Using  ApplicativeDo: ', as#' can be understood as the pseudo-do expression do as as .. with as repeating.ExamplesA common use of ,, is to process input from network sockets, s, and channels (e.g. J and )./For example, here is how we might implement an  +https://en.wikipedia.org/wiki/Echo_Protocol echo server , using , both to listen for client connections on a network socket and to echo client input on client connection handles: 2echoServer :: Socket -> IO () echoServer socket = ," $ do client <- accept socket  (echo client) (\_ -> hClose client) where echo :: Handle -> IO () echo client = ,. $ hGetLine client >>= hPutStrLn client ,baseThe , function maps its first argument over a list, returning the result as a pair of lists. This function is mainly used with complicated data structures or a state monad.,baseThe , function generalizes # to arbitrary applicative functors.,base, is the extension of , which ignores the final result.,baseThe , function is analogous to )?, except that its result is encapsulated in a monad. Note that , works from left-to-right over the list arguments. This could be an issue where (=)/ and the `folded function' are not commutative. foldM f a1 [x1, x2, ..., xm] == do a2 <- f a1 x1 a3 <- f a2 x2 ... f am xmIf right-to-left evaluation is required, the input list should be reversed.Note: , is the same as ,baseLike ,, but discards the result.,base, n act performs the action n times, gathering the results.Using  ApplicativeDo: ', 5 as' can be understood as the do expression do a1 <- as a2 <- as a3 <- as a4 <- as a5 <- as pure [a1,a2,a3,a4,a5]  Note the  Applicative constraint.,baseLike ,, but discards the result.,baseThe reverse of  .,baseStrict version of .,baseDirect   equivalent of .ExamplesThe  function is just , specialized to the list monad:  = ( , :: (a -> Bool) -> [a] -> [a] ) An example using , with the  monad: >>> mfilter odd (Just 1) Just 1 >>> mfilter odd (Just 2) Nothing ,Njt<=?v> A,, ,,,,,,,,,,,,,,,,v> t<=?A ,,, ,,,j,,,,,,,,,N , ,,1,1,4"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy4*,JKno5678p9 qr4sLt<=?v> w 3 ; 2x : yzM{|}Alkm ,,,,XYZ[ !******++++++  p9 x : o5678nw 3 ; 2zMsLr4q|{JKXYZ[v> lkm t<=?A ,,,, ,  *}y******++++++!-(c) The University of Glasgow, CWI 2001--2015/BSD-style (see the file libraries/base/LICENSE) Safe-Inferred./9,base2Construct a representation for a type application.V,,V"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafe:,base+(c) Lennart Augustsson and Bart Massey 20135BSD-style (see the file LICENSE in this distribution)Bart Massey  provisionalportableSafe'(^);,baseType of a function that will parse modifier characters from the format string.,baseThis is the type of a field formatter reified over its argument.,baseThe "format parser" walks over argument-type-specific modifier characters to find the primary format character. This is the type of its result.,baseAny modifiers found.,basePrimary format character.,baseRest of the format string.,base$Description of field formatting for - . See UNIX  printf(3)2 for a description of how field formatting works.,baseTotal width of the field.,base Secondary field width specifier.-base)Kind of filling or padding to be done.-base8Whether to insist on a plus sign for positive numbers.-base'Indicates an "alternate format". See  printf(3)0 for the details, which vary by argument spec.-base6Characters that appeared immediately to the left of -1 in the format and were accepted by the type's -. Normally the empty string.-baseThe format character - was invoked with. - should fail unless this character matches the type. It is normal to handle many different format characters for a single type.-baseHow to handle the sign of a numeric field. These are mutually exclusive, with - taking precedence.-baseWhether to left-adjust or zero-pad a field. These are mutually exclusive, with - taking precedence.-baseThis class, with only the one instance, is used as a workaround for the fact that  , as a concrete type, is not allowable as a typeclass instance. -) is exported for backward-compatibility.-base-base-base Typeclass of --formattable values. The - method takes a value and a field format descriptor and either fails due to a bad descriptor or produces a  as the result. The default - expects no modifiers: this is the normal case. Minimal instance: -.-base-base-baseThe -1 class provides the variable argument magic for -. Its implementation is intentionally not visible from this module.-baseThe -1 class provides the variable argument magic for -. Its implementation is intentionally not visible from this module. If you attempt to pass an argument of a type which is not an instance of this class to - or -=, then the compiler will report it as a missing instance of -.-baseFormat a variable number of arguments with the C-style formatting string.$printf "%s, %d, %.4f" "hello" 123 pihello, 123, 3.1416The return value is either   or ( a) (which should be ( ())., but Haskell's type system makes this hard).7The format string consists of ordinary characters and conversion specifications7, which specify how to format one of the arguments to - in the output string. A format specification is introduced by the % character; this character can be self-escaped into the format string using %%&. A format specification ends with a format character that provides the primary information about how to format the value. The rest of the conversion specification is optional. In order, one may have flag characters, a width specifier, a precision specifier, and type-specific modifier characters. Unlike C  printf(3), the formatting of this - is driven by the argument type; formatting is type specific. The types formatted by - "out of the box" are:s types, including  { types-6 is also extensible to support other types: see below.6A conversion specification begins with the character %2, followed by zero or more of the following flags: - left adjust (default is right adjust) + always use a sign (+ or -) for signed conversions space leading space for positive numbers in signed conversions 0 pad with zeros rather than spaces # use an \"alternate form\": see belowWhen both flags are given, - overrides 0 and +3 overrides space. A negative width specifier in a * conversion is treated as positive but implies the left adjust flag.The "alternate form" for unsigned radix conversions is as in C  printf(3): %o prefix with a leading 0 if needed %x prefix with a leading 0x if nonzero %X prefix with a leading 0X if nonzero %b prefix with a leading 0b if nonzero %[eEfFgG] ensure that the number contains a decimal point3Any flags are followed optionally by a field width: >num field width * as num, but taken from argument listThe field width is a minimum, not a maximum: it will be expanded as needed to avoid mutilating a value.6Any field width is followed optionally by a precision: .num precision . same as .0 .* as num, but taken from argument listNegative precision is taken as 0. The meaning of the precision depends on the conversion type. Integral minimum number of digits to show RealFloat number of digits after the decimal point String maximum number of charactersThe precision for Integral types is accomplished by zero-padding. If both precision and zero-pad are given for an Integral field, the zero-pad is ignored.Any precision is followed optionally for Integral types by a width modifier; the only use of this modifier being to set the implicit size of the operand for conversion of a negative operand to unsigned: ?hh Int8 h Int16 l Int32 ll Int64 L Int64/The specification ends with a format character: c character Integral d decimal Integral o octal Integral x hexadecimal Integral X hexadecimal Integral b binary Integral u unsigned decimal Integral f floating point RealFloat F floating point RealFloat g general format float RealFloat G general format float RealFloat e exponent format float RealFloat E exponent format float RealFloat s string String v default format any typeThe "%v" specifier is provided for all built-in types, and should be provided for user-defined type formatters as well. It picks a "best" representation for the given type. For the built-in types the "%v" specifier is converted as follows: c Char u other unsigned Integral d other signed Integral g RealFloat s StringMismatch between the argument types and the format string, as well as any other syntactic or semantic errors in the format string, will cause an exception to be thrown at runtime.Note that the formatting for {4 types is currently a bit different from that of C  printf(3), conforming instead to ,  and  (and their alternate versions  and ). This is hard to fix: the fixed versions would format in a backward-incompatible way. In any case the Haskell behavior is generally more sensible than the C behavior. A brief summary of some key differences:Haskell - never uses the default "6-digit" precision used by C printf.Haskell - treats the "precision" specifier as indicating the number of digits after the decimal point.Haskell - prints the exponent of e-format numbers without a gratuitous plus sign, and with the minimum possible number of digits.Haskell -: will place a zero after a decimal point when possible.-base Similar to -+, except that output is via the specified !$. The return type is restricted to ( a).-baseSubstitute a 'v' format character with the given default format character in the ,. A convenience for user-implemented types, which should support "%v".-baseFormatter for  values.-baseFormatter for   values.-baseFormatter for  values.-baseFormatter for  values.-baseFormatter for { values.-base Raises an  6 with a printf-specific prefix on the message string.-baseCalls -8 to indicate an unknown format letter for a given type.-baseCalls -1 to indicate that the format string ended early.-baseCalls - to indicate that there is a missing argument in the argument list.-baseCalls - to indicate that there is a type error or similar in the given argument.-base-base-base-base-base-base-base-base-base-base-base-base-base-base-base-base-base-base-base-base-base-base+,,,,,,,,,,,--------------------------------+-----,,,,,------------,,,,,,---------------["(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental non-portable Trustworthyb-baseA specialised version of 3, where the key and the value are the same object: 2mkWeakPtr key finalizer = mkWeak key key finalizer-baseA specialised version of - , where the  object returned is simply thrown away (however the finalizer will be remembered by the garbage collector, and will still be run when the key becomes unreachable).Note: adding a finalizer to a x using -+ won't work; use the specialised version x$ instead. For discussion see the  type. .-baseA specialised version of  where the value is actually a pair of the key and value passed to -: =mkWeakPair key val finalizer = mkWeak key (key,val) finalizer:The advantage of this is that the key can be retrieved by  in addition to the value.------"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthyd0-base/Triggers an immediate minor garbage collection.-base/Triggers an immediate major garbage collection.-base/Triggers an immediate major garbage collection.((((------(((("(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafef5-baseThe version of -> with which the program was compiled or is being interpreted.-base5The operating system on which the program is running.-base9The machine architecture on which the program is running.-baseThe Haskell implementation with which the program was compiled or is being interpreted.--------"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthyl-base Computation - code throws ! code3. Normally this terminates the program, returning code to the program's caller.%On program termination, the standard !s ! and */ are flushed automatically; any other buffered !s need to be flushed manually, otherwise the buffered data will be discarded.A program that fails in any other way is treated as if it had called -:. A program that terminates successfully without calling -, explicitly is treated as if it had called - !.As an ! is not an , -% bypasses the error handling in the % monad and cannot be intercepted by  from the Prelude. However it is a r,, and can be caught using the functions of Control.Exception4. This means that cleanup computations added with r (from Control.Exception ) are also executed properly on -.Note: in GHC, - should be called from the main program thread in order to exit the process. When called from another thread, - will throw an  ExitException as normal, but the exception will not cause the process itself to exit.-baseThe computation - is equivalent to - (! exitfail) , where exitfail is implementation-dependent.-baseThe computation - is equivalent to - !*, It terminates the program successfully.-baseWrite given error message to * and terminate with -.!!!----!!!----"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafeor:base Reads the FilePath1 pointed to by the symbolic link and returns it.See readlink(2)-base8Returns the absolute pathname of the current executable.Note that for scripts and interactive sessions, this is the path to the interpreter (e.g. ghci.)Since base 4.11.0.0, - resolves symlinks on Windows. If an executable is launched through a symlink, -7 returns the absolute path of the original executable.-"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafex -base Computation - returns a list of the program's command line arguments (not including the program name).-base Computation -3 returns the name of the program as it was invoked.However, this is hard-to-impossible to implement on some non-Unix OSes, so instead, for maximum portability, we just return the leafname of the program as invoked. Even then there are some differences between platforms: on Windows, for example, a program invoked as foo is probably really FOO.EXE, and that is what - will return.-base Computation - var0 returns the value of the environment variable var. For the inverse, the - function can be used.This computation may fail with:q0 if the environment variable does not exist.-base-Return the value of the environment variable var, or Nothing if there is no such value.'For POSIX users, this is equivalent to .-basesetEnv name value, sets the specified environment variable to value.Early versions of this function operated under the mistaken belief that setting an environment variable to the  empty string on Windows removes that environment variable from the environment. For the sake of compatibility, it adopted that behavior on POSIX. In particular setEnv name "" has the same effect as - name If you'd like to be able to set environment variables to blank strings, use .Throws r if name1 is the empty string or contains an equals sign.-base unsetEnv name removes the specified environment variable from the environment of the current process.Throws r if name1 is the empty string or contains an equals sign.-base- args act - while executing action act, have - return args.-base- name act - while executing action act, have - return name.-base-0 retrieves the entire environment as a list of  (key,value) pairs.,If an environment entry does not contain an '=' character, the key is the whole entry and the value is the empty string. ---------- ----------(c) Habib Alamin 2017/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafe | -base Similar to .-base,Get an environment value or a default value.-baseLike , but allows blank environment values and mimics the function signature of  from the unix package.-baseLike , but allows for the removal of blank environment variables. May throw an exception if the underlying platform doesn't support unsetting of environment variables.-base!variable name base!fallback value base!variable value or fallback value -basevariable name basevariable value baseoverwrite ---------- ----------(c) Sven Panne 2002-2005/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafes-baseDescribes whether an option takes an argument or not, and if so how the argument is injected into a value of type a.-baseno argument expected-baseoption requires argument-baseoptional argument-baseEach - describes a single option.The arguments to - are:list of short option characters*list of long option strings (without "--")argument descriptorexplanation of option for user-base-What to do with options following non-options-base+no option processing after first non-option-base*freely intersperse options and non-options-basewrap non-options into options-baseReturn a string describing the usage of a command, derived from the header (first argument) and the options described by the second argument.-baseProcess the command-line, and return the list of values that matched (and those that didn't). The arguments are:The order requirements (see -)The option descriptions (see -):The actual command line arguments (presumably got from ).- returns a triple consisting of the option arguments, a list of non-options, and a list of error messages.-baseThis is almost the same as -, but returns a quadruple consisting of the option arguments, a list of non-options, a list of unrecognized options, and a list of error messages.-base-base-base ------------- ------------- Safe-Inferred::: Safe-Inferred:: Safe-Inferred ":base&Perform the given action to fill in a struct timespec;, returning the result of the action and the value of the timespec in picoseconds.::"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy -baseThe - constant is the smallest measurable difference in CPU time that the implementation can record, and is given as an integral number of picoseconds.-base Computation - returns the number of picoseconds CPU time used by the current program. The precision of this result is implementation-dependent.----(C) 2014 I/O Tweagsee libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)NonebaseA reference to a value of type a.-base;Miscellaneous information available for debugging purposes.-base>Package key of the package where the static pointer is defined-base6Name of the module where the static pointer is defined-base>Source location of the definition of the static pointer as a (Line, Column) pair.-base2A class for things buildable from static pointers.-base A key for (s that can be serialized and used with -.-baseDereferences a static pointer.-baseThe -' that can be used to look up the given .-base Looks up a  by its -.If the  is not found returns Nothing.This function is unsafe because the program behavior is undefined if the type of the returned ! does not match the expected one.-base- of the given .-baseA list of all known keys.- base-base-----^-----------------^(C) 2016 I/O Tweagsee libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)None:"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental non-portable Trustworthy2-baseAn abstract name for an object, that supports equality and hashing.)Stable names have the following property:If sn1 :: StableName and sn2 :: StableName and  sn1 == sn2 then sn1 and sn2 were created by calls to makeStableName on the same object.The reverse is not necessarily true: if two stable names are not equal, then the objects they name may still be equal. Note in particular that - may return a different - after an object is evaluated.-Stable Names are similar to Stable Pointers (Foreign.StablePtr&), but differ in the following ways: There is no freeStableName operation, unlike Foreign.StablePtrs. Stable names are reclaimed by the runtime system when they are no longer needed. There is no deRefStableName operation. You can't get back from a stable name to the original Haskell object. The reason for this is that the existence of a stable name for an object does not guarantee the existence of the object itself; it can still be garbage collected.-baseMakes a - for an arbitrary object. The object passed as the first argument is not evaluated by -.-base Convert a - to an . The . returned is not necessarily unique; several -s may map to the same  (in practice however, the chances of this are small, so the result of - makes a good hash key).-base Equality on -> that does not require that the types of the arguments match.-base----------"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental non-portableSafe~-------- BSD-style (see the file LICENSE)libraries@haskell.orginternalportable Safe-InferredA-baseLike -:, but can also read arguments supplied via response files. For example, consider a program foo: main :: IO () main = do args <- getArgsWithResponseFiles putStrLn (show args) And a response file args.txt: --one 1 --'two' 2 --"three" 3 Then the result of invoking foo with args.txt is: 9> ./foo @args.txt ["--one","1","--two","2","--three","3"]-baseGiven a string of concatenated strings, separate each by removing a layer of quoting and/or escaping of certain characters.These characters are: any whitespace, single quote, double quote, and the backslash character. The backslash character always escapes (i.e., passes through without further consideration) the character which follows. Characters can also be escaped in blocks by quoting (i.e., surrounding the blocks with matching pairs of either single- or double-quotes which are not themselves escaped).Any whitespace which appears outside of either of the quoting and escaping mechanisms, is interpreted as having been added by this special concatenation process to designate where the boundaries are between the original, un-concatenated list of strings. These added whitespace characters are removed from the output. unescapeArgs "hello\\ \\\"world\\\"\n" == escapeArgs "hello \"world\""-baseGiven a list of strings, concatenate them into a single string with escaping of certain characters, and the addition of a newline between each string. The escaping is done by adding a single backslash character before any whitespace, single quote, double quote, or backslash character, so this escaping character must be removed. Unescaped whitespace (in this case, newline) is part of this "transport" format to indicate the end of the previous string and the start of a new string.While - allows using quoting (i.e., convenient escaping of many characters) by having matching sets of single- or double-quotes,- does not use the quoting mechasnism, and thus will always escape any whitespace, quotes, and backslashes. unescapeArgs "hello\\ \\\"world\\\"\\n" == escapeArgs "hello \"world\""-baseArguments which look like @foo- will be replaced with the contents of file foo. A gcc-like syntax for response files arguments is expected. This must re-constitute the argument list by doing an inverse of the escaping mechanism done by the calling-program side.We quit if the file is not found or reading somehow fails. (A convenience routine for haddock or possibly other clients)--------/(c) Adam Gundry 2015-2016see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Safe-Inferred.base0Constraint representing the fact that the field x belongs to the record type r and has field type a. This will be solved automatically, but manual instances may be provided as well.-base7Selector function to extract the field from the record.--.(c) Adam Gundry 2015-2016see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)None />--(c) The GHC Developerssee libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Safe-InferredO------((c) The University of Glasgow, 1994-2000see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Safe-Inferred81 .baseByte ordering..base/most-significant-byte occurs in lowest address..base0least-significant-byte occurs in lowest address..base(The byte ordering of the target machine.. base. base. base. base. base. base:base........"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental non-portable Trustworthyd.base,An abstract unique object. Objects of type .< may be compared for equality and ordering and hashed into .:{do x <- newUnique print (x == x) y <- newUnique print (x == y):}TrueFalse.baseCreates a new object of type .. The value returned will not compare equal to any other value of type . returned by previous calls to .-. There is no limit on the number of times . may be called..base Hashes a . into an . Two .s may hash to the same value, although in practice this is unlikely. The ! returned makes a good hash key.......T"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental$non-portable (uses Control.Monad.ST) Trustworthyc.baseMutate the contents of an .:{ runST (do ref <- newSTRef ""# modifySTRef ref (const "world") modifySTRef ref (++ "!")" modifySTRef ref ("Hello, " ++) readSTRef ref ):}"Hello, world!"Be warned that . does not apply the function strictly. This means if the program calls . many times, but seldom uses the value, thunks will pile up in memory resulting in a space leak. This is a common mistake made when using an  as a counter. For example, the following will leak memory and may produce a stack overflow:"import Control.Monad (replicateM_):{print (runST (do ref <- newSTRef 0+ replicateM_ 1000 $ modifySTRef ref (+1) readSTRef ref )):}1000To avoid this problem, use . instead..baseStrict version of ....."(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional+non-portable (uses Control.Monad.ST.Strict)Safe:..3"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportableSafe.base.), applied to two real fractional numbers x and epsilon/, returns the simplest rational number within epsilon of x. A rational number y is said to be simpler than another y' if  ( y) <=   ( y'), and y <=  y'.Any real interval contains a unique simplest rational; in particular, note that 0/1! is the simplest rational of all...None "::None "::94BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimental not portable Trustworthy'"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy5~~S"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental:non-portable (requires universal quantification for runST)Unsafe4"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental:non-portable (requires universal quantification for runST) Trustworthy))"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental:non-portable (requires universal quantification for runST) Trustworthy))"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional:non-portable (requires universal quantification for runST)Safe)"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional:non-portable (requires universal quantification for runST)Unsafet .base The lazy . monad. The ST monad allows for destructive updates, but is escapable (unlike IO). A computation of type . s a returns a value of type a, and executes in "thread" s. The s parameter is either7an uninstantiated type variable (inside invocations of .), or (inside invocations of .).It serves to keep the internal states of different invocations of .2 separate from each other and from invocations of ..The < and =6 operations are not strict in the state. For example, .5 (writeSTRef _|_ v >>= readSTRef _|_ >> return 2) = 2:baseThis is a terrible hack to prevent a thunk from being entered twice. Simon Peyton Jones would very much like to be rid of it..base Return the value computed by an . computation. The forall- ensures that the internal state used by the .9 computation is inaccessible to the rest of the program..baseAllow the result of an . computation to be used (lazily) inside the computation. Note that if f is strict, . f = _|_..baseConvert a strict . computation into a lazy one. The strict state thread passed to . is not performed until the result of the lazy state thread it returns is demanded..baseConvert a lazy . computation into a strict one..base#A monad transformer embedding lazy . in the  monad. The : parameter indicates that the internal state used by the .. computation is a special one supplied by the = monad, and thus distinct from those used by invocations of ..:base: base:base:base:base ........"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional:non-portable (requires universal quantification for runST)UnsafeX...."(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional:non-portable (requires universal quantification for runST) Trustworthy5............"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional:non-portable (requires universal quantification for runST) Trustworthy&............"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental)non-portable (uses Control.Monad.ST.Lazy)Safe........"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafet= v> t=Instances should satisfy the following laws, which state that . is a transformer of monads: . . ? = ? . (m >>= f) = . m >>= (. . f).baseLift a computation from the  monad. This allows us to run IO computations in any monadic stack, so long as it supports these kinds of operations (i.e. " is the base monad for the stack).Example import Control.Monad.Trans.State -- from the "transformers" library printState :: Show s => StateT s IO () printState = do state <- get liftIO $ print stateHad we omitted .), we would have ended up with this error: @ Couldn't match type @IO@ with @StateT s IO@ Expected type: StateT s IO () Actual type: IO ()0The important part here is the mismatch between StateT s IO () and  ().-Luckily, we know of a function that takes an  a and returns an (m a): .?, enabling us to run the program and see the expected results: > evalStateT printState "hello" "hello" > evalStateT printState 3 3 . base.... Trustworthy#$8ѽ7.baseTime values from the RTS, using a fixed resolution of nanoseconds..base9Statistics about a single GC. This is a mirror of the C struct GCDetails in RtsAPI.h, with the field prefixed with gc_ to avoid collisions with ...base The generation number of this GC.base!Number of threads used in this GC.base/Number of bytes allocated since the previous GC.baseTotal amount of live data in the heap (incliudes large + compact data). Updated after every GC. Data in uncollected generations (in minor GCs) are considered live..base*Total amount of live data in large objects.base,Total amount of live data in compact regions.base$Total amount of slop (wasted memory).base(Total amount of memory in use by the RTS.base*Total amount of data copied during this GC.baseIn parallel GC, the max amount of data copied by any one thread. Deprecated..baseIn parallel GC, the amount of balanced data copied by all threads.base1The time elapsed during synchronisation before GC.base"The CPU time used during GC itself.base!The time elapsed during GC itself.baseThe CPU time used during the post-mark pause phase of the concurrent nonmoving GC..baseThe time elapsed during the post-mark pause phase of the concurrent nonmoving GC.. baseStatistics about runtime activity since the start of the program. This is a mirror of the C struct RTSStats in RtsAPI.h.baseTotal number of GCs.base-Total number of major (oldest generation) GCs.baseTotal bytes allocated.baseMaximum live data (including large objects + compact regions) in the heap. Updated after a major GC..base"Maximum live data in large objects.base$Maximum live data in compact regions.base Maximum slop.base Maximum memory in use by the RTS.baseSum of live bytes across all major GCs. Divided by major_gcs gives the average live data over the lifetime of the program..base"Sum of copied_bytes across all GCs.base+Sum of copied_bytes across all parallel GCs.baseSum of par_max_copied_bytes across all parallel GCs. Deprecated..base8Sum of par_balanced_copied bytes across all parallel GCs.base6Total CPU time used by the init phase @since 4.12.0.0.base:Total elapsed time used by the init phase @since 4.12.0.0.base"Total CPU time used by the mutator.base&Total elapsed time used by the mutator.baseTotal CPU time used by the GC.base!Total elapsed time used by the GC.base#Total CPU time (at the previous GC).base'Total elapsed time (at the previous GC).baseThe CPU time used during the post-mark pause phase of the concurrent nonmoving GC..baseThe time elapsed during the post-mark pause phase of the concurrent nonmoving GC..baseThe maximum time elapsed during the post-mark pause phase of the concurrent nonmoving GC..baseThe CPU time used during the post-mark pause phase of the concurrent nonmoving GC..baseThe time elapsed during the post-mark pause phase of the concurrent nonmoving GC..baseThe maximum time elapsed during the post-mark pause phase of the concurrent nonmoving GC..base Details about the most recent GC. base1Returns whether GC stats have been enabled (with +RTS -T, for example).. base&Get current runtime system statistics.. base. base. base. base:base:base3...................................................3...................................................None#$8܂.base Parameters of the runtime system.base$Parameters pertaining to parallelism.base-Parameters pertaining to ticky-ticky profiler.base&Parameters pertaining to event tracing.baseshow timestamp in stderr output.basetrace scheduler events.basetrace GC events.base&trace nonmoving GC heap census samples.base&trace spark events by a sampled method.base"trace spark events 100% accurately.base-trace user events (emitted from Haskell code)/baseIs event tracing enabled?/base no tracing/base$send tracing events to the event log/basesend tracing events to stderr/base&Parameters of the cost-center profiler/basetime between samples/baseticks between samples (derived)/base,What sort of heap profile are we collecting?/base2Parameters pertaining to the cost-center profiler./base-Should the RTS produce a cost-center summary?/baseFlags to control debugging output & extra checking in various subsystems./base s/base i/base w/base G/base g/base n/base b/base S/base t/base p/basel the object linker/base a/base m/basez# stack squeezing & lazy blackholing/basec coverage/base r/baseMiscellaneous parameters/base:address to ask the OS for memory for the linker, 0 ==> off/base'Parameters concerning context switching/base$Parameters of the garbage collector./baseTrue  = "compact all the time"/baseuse "mostly mark-sweep" instead of copying for the oldest generation/base address to ask the OS for memory/baseShould we produce a summary of the garbage collector statistics after the program has exited?/base/ is defined as a  StgWord64 in  stg/Types.h:baseRead a NUL terminated string. Return Nothing in case of a NULL pointer./base/base/base/base/base/base0base0base0base0base0base0base0base0base0base0base0base0base:base:base:base:base:base:base:base:base:base:base:base:base:base:base...................................../////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////.........../////////////////////////////////////////////////////////////////////////////////////////////////////////////..........................//////////'(c) The University of Glasgow 2013-2015see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Noner:base&A LibdwSession from the runtime system:base An address0base The state of the execution stack:baseA chunk of backtrace frames0base7Location information about an address from a backtrace.0base*A location in the original program source.0base#How many stack frames in the given 0:baseReturn a list of the chunks of a backtrace, from the outer-most to inner-most chunk.:baseUnpack the given 0 in the Haskell representation:baseThe size in bytes of a :0base!List the frames of a stack trace.0baseGet an execution stack.0baseFree the cached debug data.0baseRender a stacktrace as a string:base Render a 0 as a string00000000000000000000000000000000'(c) The University of Glasgow 2013-2015see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)None+0base1Get a trace of the current execution stack state.Returns Nothing8 if stack trace support isn't available on host machine.0baseGet a string representation of the current execution stack state. 000000000000 000000000000F(C) 2011-2015 Edward Kmett, (C) 2010 Tony Morris, Oliver Taylor, Eelis van der Weegen BSD-style (see the file LICENSE)libraries@haskell.org provisionalportable Trustworthy38:0baseNumber of elements in   list.0base.Compute n-ary logic exclusive OR operation on   list.0base0 produces a new stream by repeatedly applying the unfolding function to the seed value to produce an element of type b= and a new seed value. When the unfolding function returns / instead of a new seed value, the stream ends.0base0( efficiently turns a normal list into a   stream, producing  if the input is empty.0base0 produces the first element of the stream, and a stream of the remaining elements, if any.0baseThe 0 function is analogous to  Data.List's  operation.0base(Extract the first element of the stream.0base.Extract the possibly-empty tail of the stream.0base'Extract the last element of the stream.0base9Extract everything except the last element of the stream.0base Construct a   list from a single element.0base!Prepend an element to the stream.0base Synonym for 0.0baseSort a stream.0baseConverts a normal list to a   stream.'Raises an error if given an empty list.0base.Convert a stream to a normal list efficiently.:base"Lift list operations to work on a   stream.Beware: If the provided function returns an empty list, this will raise an error.0baseMap a function over a   stream.0baseThe 0 function takes a stream xs) and returns all the finite prefixes of xs.0baseThe 0 function takes a stream xs" and returns all the suffixes of xs.0base0 x xs inserts x into the last position in xs where it is still less than or equal to the next element. In particular, if the list is sorted beforehand, the result will also be sorted.0base0 x sequences x one or more times.0base0 is similar to , but returns a stream of successive reduced values from the left: scanl f z [x1, x2, ...] == z :| [z `f` x1, (z `f` x1) `f` x2, ...] Note that $last (scanl f z xs) == foldl f z xs.0base0 is the right-to-left dual of 0 . Note that $head (scanr f z xs) == foldr f z xs.0base0 is a variant of 0% that has no starting value argument: scanl1 f [x1, x2, ...] == x1 :| [x1 `f` x2, x1 `f` (x2 `f` x3), ...]0base0 is a variant of 0% that has no starting value argument.0base'intersperse x xs' alternates elements of the list with copies of x. ,intersperse 0 (1 :| [2,3]) == 1 :| [0,2,0,3]0base0 f x= produces the infinite sequence of repeated applications of f to x. %iterate f x = x :| [f x, f (f x), ..]0base0 xs$ returns the infinite repetition of xs: )cycle (1 :| [2,3]) = 1 :| [2,3,1,2,3,...]0base0 a finite NonEmpty stream.0base0 x= returns a constant stream, where all elements are equal to x.0base0 n xs returns the first n elements of xs.0base0 n xs drops the first n) elements off the front of the sequence xs.0base0 n xs, returns a pair consisting of the prefix of xs of length n< and the remaining stream immediately following this prefix. 'splitAt' n xs == ('take' n xs, 'drop' n xs) xs == ys ++ zs where (ys, zs) = 'splitAt' n xs0base0 p xs+ returns the longest prefix of the stream xs for which the predicate p holds.0base0 p xs% returns the suffix remaining after 0 p xs.0base0 p xs returns the longest prefix of xs that satisfies p,, together with the remainder of the stream. 'span' p xs == ('takeWhile' p xs, 'dropWhile' p xs) xs == ys ++ zs where (ys, zs) = 'span' p xs0baseThe 0 p function is equivalent to 0 (not . p).0base0 p xs removes any elements from xs that do not satisfy p.0baseThe 0 function takes a predicate p and a stream xs, and returns a pair of lists. The first list corresponds to the elements of xs for which p3 holds; the second corresponds to the elements of xs for which p does not hold. 9'partition' p xs = ('filter' p xs, 'filter' (not . p) xs)0baseThe 0 function takes a stream and returns a list of streams such that flattening the resulting list is equal to the argument. Moreover, each stream in the resulting list contains only equal elements. For example, in list notation: 'group' $ 'cycle' "Mississippi" = "M" : "i" : "ss" : "i" : "ss" : "i" : "pp" : "i" : "M" : "i" : ...0base0 operates like 07, but uses the provided equality predicate instead of 9.0base0 operates like 0?, but uses the provided projection when comparing for equality0base0 operates like 0, but sorts the list first so that each equivalence class has, at most, one list in the output0base0 operates like 0, but uses the knowledge that its input is non-empty to produce guaranteed non-empty output.0base0 is to 0 as 0 is to 0.0base0 is to 0 as 0 is to 00base0 is to 0 as 0 is to 00baseThe 0 function returns 2 if the first argument is a prefix of the second.0basexs !! n# returns the element of the stream xs at index n/. Note that the head of the stream has index 0.Beware8: a negative or out-of-bounds index will cause an error.0baseThe 0 function takes two streams and returns a stream of corresponding pairs.0baseThe 0 function generalizes 0. Rather than tupling the elements, the elements are combined using the function passed as the first argument.0baseThe 0 function is the inverse of the 0 function.0baseThe 0 function removes duplicate elements from a list. In particular, it keeps only the first occurrence of each element. (The name 0, means 'essence'.) It is a special case of 0, which allows the programmer to supply their own inequality test.0baseThe 0 function behaves just like 0, except it uses a user-supplied equality predicate instead of the overloaded 9 function.0base0 for  , behaves the same as  The rows/columns need not be the same length, in which case > transpose . transpose /= id0base0 for  , behaves the same as 0base0 for  , behaves the same as: sortBy . comparing; 000000000000000000000000000000000000000000000000000000000; 0000000000000000000000000000000000000000000000000000000000509 (c) Nils Schweinsberg 2011, (c) George Giorgidze 2011 (c) University Tuebingen 2011/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafe0base"Instances should satisfy the laws:  Naturality   (f  g) (O ma mb) = O (  f ma) (  g mb)Information Preservation  (  ()) ma =   (  ()) mb implies 0 (O ma mb) = (ma, mb)0 base0 base0 base0 base0 base0 base0 base0base0base0base0base0base0base0base0base0 base0base000O000O(c) Ross Paterson 2013 BSD-style (see the file LICENSE)libraries@haskell.org experimentalportableSafe(30 baseLifting of the }# class to binary type constructors.0 base? function for an application of the type constructor based on  and " functions for the argument types.0 base? function for an application of the type constructor based on  and  functions for the argument types. The default implementation using standard list syntax is correct for most types.0baseLifting of the y# class to binary type constructors.Both 0 and 0/ exist to match the interface provided in the y1 type class, but it is recommended to implement 0 instances using 0 as opposed to 0, since the former is more efficient than the latter. For example:  instance 0 T where 0 = ... 0 = 1 9For more information, refer to the documentation for the y class. @since 4.9.0.00 base? function for an application of the type constructor based on  and " functions for the argument types.0 base? function for an application of the type constructor based on  and  functions for the argument types. The default implementation using standard list syntax is correct for most types.0 base? function for an application of the type constructor based on  and " functions for the argument types.0 base? function for an application of the type constructor based on  and " functions for the argument types.The default definition uses 0. Instances that define 0 should also define 0 as 1.0 baseLifting of the x# class to binary type constructors.1 baseLift  ( functions through the type constructor.The function will usually be applied to comparison functions, but the more general type ensures that the implementation uses them to compare elements of the first container with elements of the second.1 baseLifting of the p# class to binary type constructors.1 base1Lift equality tests through the type constructor.The function will usually be applied to equality functions, but the more general type ensures that the implementation uses them to compare elements of the first container with elements of the second.1 baseLifting of the }" class to unary type constructors.1 base? function for an application of the type constructor based on  and ! functions for the argument type.1 base? function for an application of the type constructor based on  and  functions for the argument type. The default implementation using standard list syntax is correct for most types.1 baseLifting of the y" class to unary type constructors.Both 1 and 1/ exist to match the interface provided in the y1 type class, but it is recommended to implement 1 instances using 1 as opposed to 1, since the former is more efficient than the latter. For example:  instance 1 T where 1 = ... 1 = 1 9For more information, refer to the documentation for the y class.1 base? function for an application of the type constructor based on  and ! functions for the argument type.1 base? function for an application of the type constructor based on  and  functions for the argument type. The default implementation using standard list syntax is correct for most types.1 base? function for an application of the type constructor based on  and ! functions for the argument type.1 base? function for an application of the type constructor based on  and ! functions for the argument type.The default definition uses 1. Instances that define 1 should also define 1 as 1.1 baseLifting of the x" class to unary type constructors.1 baseLift a  ' function through the type constructor.The function will usually be applied to a comparison function, but the more general type ensures that the implementation uses it to compare elements of the first container with elements of the second.1 baseLifting of the p" class to unary type constructors.1 base3Lift an equality test through the type constructor.The function will usually be applied to an equality function, but the more general type ensures that the implementation uses it to compare elements of the first container with elements of the second.1 baseLift the standard (9)' function through the type constructor.1 baseLift the standard  ' function through the type constructor.1 baseLift the standard  and ) functions through the type constructor.1 baseLift the standard  and ) functions through the type constructor.1 base*A possible replacement definition for the 1" method. This is only needed for 1 instances where 1 isn't defined as 1.1 base*A possible replacement definition for the 1 method, defined using 1.1 baseLift the standard  and ) functions through the type constructor.1 baseLift the standard (9)' function through the type constructor.1 baseLift the standard  ' function through the type constructor.1 baseLift the standard ' function through the type constructor.1 baseLift the standard ' function through the type constructor.1 base*A possible replacement definition for the 0" method. This is only needed for 0 instances where 0 isn't defined as 1.1 base*A possible replacement definition for the 0 method, defined using 0.1 baseLift the standard ' function through the type constructor.1 base1 p d is a parser for datatypes where each alternative begins with a data constructor. It parses the constructor and passes it to p=. Parsers for various constructors can be constructed with 1, 1 and 1, and combined with mappend from the Monoid class.1 base1 p is a parser for datatypes where each alternative begins with a data constructor. It parses the constructor and passes it to p=. Parsers for various constructors can be constructed with 1 and 1, and combined with '( | )' from the   class.1 base1 rp n c n' matches the name of a unary data constructor and then parses its argument using rp.1 base1 rp n c' matches the name of a unary data constructor and then parses its argument using rp.1 base1 rp1 rp2 n c n' matches the name of a binary data constructor and then parses its arguments using rp1 and rp2 respectively.1 base1 rp1 rp2 n c' matches the name of a binary data constructor and then parses its arguments using rp1 and rp2 respectively.1 base1 sp n d x produces the string representation of a unary data constructor with name n and argument x, in precedence context d.1 base1 sp1 sp2 n d x y produces the string representation of a binary data constructor with name n and arguments x and y, in precedence context d.1 base1 n c n' matches the name of a unary data constructor and then parses its argument using .1 base1 n c n' matches the name of a unary data constructor and then parses its argument using 1.1 base1 n c n' matches the name of a binary data constructor and then parses its arguments using 1.1 base1 n d x produces the string representation of a unary data constructor with name n and argument x, in precedence context d.1 base1 n d x produces the string representation of a unary data constructor with name n and argument x, in precedence context d.1 base1 n d x y produces the string representation of a binary data constructor with name n and arguments x and y, in precedence context d.1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base1 base4000000000111111111111111111111111111111111111111111141111111111111111111111011000001111000111111111111111(C) 2008-2014 Edward Kmett, BSD-style (see the file LICENSE)libraries@haskell.org provisionalportableSafe0 1baseA bifunctor is a type constructor that takes two type arguments and is a functor in both" arguments. That is, unlike with v, a type constructor such as . does not need to be partially applied for a 1 instance, and the methods in this class permit mapping functions over the  value or the " value, or both at the same time.Formally, the class 1 represents a bifunctor from Hask -> Hask.Intuitively it is a bifunctor where both the first and second arguments are covariant.You can define a 1 by either defining 1 or by defining both 1 and 1.If you supply 1, you should ensure that: 1     D  If you supply 1 and 1 , ensure: 1   D   1   D   +If you supply both, you should also ensure: 1 f g D 1 f   1 gThese ensure by parametricity: 1 (f   g) (h   i) D 1 f h   1 g i 1 (f   g) D 1 f   1 g 1 (f   g) D 1 f   1 g 1base)Map over both arguments at the same time. 1 f g D 1 f   1 gExamplesbimap toUpper (+1) ('j', 3)('J',4)bimap toUpper (+1) (Left 'j')Left 'J'bimap toUpper (+1) (Right 3)Right 41base(Map covariantly over the first argument. 1 f D 1 f  Examplesfirst toUpper ('j', 3)('J',3)first toUpper (Left 'j')Left 'J'1base)Map covariantly over the second argument. 1 D 1  Examplessecond (+1) ('j', 3)('j',4)second (+1) (Right 3)Right 41 base1base1base1base1base1base1base1base1base11111111(C) 2011-2016 Edward Kmett BSD-style (see the file LICENSE)libraries@haskell.org provisionalportableSafef.1 base1 identifies foldable structures with two different varieties of elements (as opposed to :, which has one variety of element). Common examples are  and (,): instance Bifoldable Either where bifoldMap f _ (Left a) = f a bifoldMap _ g (Right b) = g b instance Bifoldable (,) where bifoldr f g z (a, b) = f a (g b z)Some examples below also use the following BiList to showcase empty Bifoldable behaviors when relevant (> and '(,)' containing always exactly resp. 1 and 2 elements): data BiList a b = BiList [a] [b] instance Bifoldable BiList where bifoldr f g z (BiList as bs) = foldr f (foldr g z bs) as A minimal 1 definition consists of either 1 or 1. When defining more than this minimal set, one should ensure that the following identities hold: 1 D 1     1 f g D 1 (Z . f) (Z . g) Y 1 f g z t D  (1 (Endo . f) (Endo . g) t) z If the type is also a  instance, it should satisfy: 1 f g D 1 .  f g which implies that 1 f g .  h i D 1 (f . h) (g . i) 1 base4Combines the elements of a structure using a monoid. 1 D 1    Examples Basic usage:bifold (Right [1, 2, 3])[1,2,3]bifold (Left [5, 6])[5,6]bifold ([1, 2, 3], [4, 5]) [1,2,3,4,5]bifold (Product 6, Product 7)Product {getProduct = 42}bifold (Sum 6, Sum 7)Sum {getSum = 13}1 baseCombines the elements of a structure, given ways of mapping them to a common monoid. 1 f g D 1 (Z . f) (Z . g) YExamples Basic usage:2bifoldMap (take 3) (fmap digitToInt) ([1..], "89") [1,2,3,8,9]1bifoldMap (take 3) (fmap digitToInt) (Left [1..])[1,2,3]1bifoldMap (take 3) (fmap digitToInt) (Right "89")[8,9]1 baseCombines the elements of a structure in a right associative manner. Given a hypothetical function %toEitherList :: p a b -> [Either a b] yielding a list of all elements of a structure in order, the following would hold: 1 f g z D  ( f g) z . toEitherListExamples Basic usage: > bifoldr (+) (*) 3 (5, 7) 26 -- 5 + (7 * 3) > bifoldr (+) (*) 3 (7, 5) 22 -- 7 + (5 * 3) > bifoldr (+) (*) 3 (Right 5) 15 -- 5 * 3 > bifoldr (+) (*) 3 (Left 5) 8 -- 5 + 3 1 baseCombines the elements of a structure in a left associative manner. Given a hypothetical function %toEitherList :: p a b -> [Either a b] yielding a list of all elements of a structure in order, the following would hold: 1 f g z D  (acc -> " (f acc) (g acc)) z . toEitherListNote that if you want an efficient left-fold, you probably want to use 1 instead of 1. The reason is that the latter does not force the "inner" results, resulting in a thunk chain which then must be evaluated from the outside-in.Examples Basic usage: > bifoldl (+) (*) 3 (5, 7) 56 -- (5 + 3) * 7 > bifoldl (+) (*) 3 (7, 5) 50 -- (7 + 3) * 5 > bifoldl (+) (*) 3 (Right 5) 15 -- 5 * 3 > bifoldl (+) (*) 3 (Left 5) 8 -- 5 + 3 1 baseAs 1, but strict in the result of the reduction functions at each step.1 base A variant of 1 that has no base case, and thus may only be applied to non-empty structures.Examples Basic usage:bifoldr1 (+) (5, 7)12bifoldr1 (+) (Right 7)7bifoldr1 (+) (Left 5)5 >> bifoldr1 (+) (BiList [1, 2] [3, 4]) 10 -- 1 + (2 + (3 + 4)) bifoldr1 (+) (BiList [1, 2] [])37On empty structures, this function throws an exception:bifoldr1 (+) (BiList [] [])(*** Exception: bifoldr1: empty structure1 base2Right associative monadic bifold over a structure.1 baseAs 1, but strict in the result of the reduction functions at each step.This ensures that each step of the bifold is forced to weak head normal form before being applied, avoiding the collection of thunks that would otherwise occur. This is often what you want to strictly reduce a finite structure to a single, monolithic result (e.g., 1).1 base A variant of 1 that has no base case, and thus may only be applied to non-empty structures.Examples Basic usage:bifoldl1 (+) (5, 7)12bifoldl1 (+) (Right 7)7bifoldl1 (+) (Left 5)5 >> bifoldl1 (+) (BiList [1, 2] [3, 4]) 10 -- ((1 + 2) + 3) + 4 bifoldl1 (+) (BiList [1, 2] [])37On empty structures, this function throws an exception:bifoldl1 (+) (BiList [] [])(*** Exception: bifoldl1: empty structure1 base1Left associative monadic bifold over a structure.Examples Basic usage:bifoldlM (\a b -> print b >> pure a) (\a c -> print (show c) >> pure a) 42 ("Hello", True)"Hello""True"42bifoldlM (\a b -> print b >> pure a) (\a c -> print (show c) >> pure a) 42 (Right True)"True"42bifoldlM (\a b -> print b >> pure a) (\a c -> print (show c) >> pure a) 42 (Left "Hello")"Hello"421 baseMap each element of a structure using one of two actions, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results, see .Examples Basic usage:0bitraverse_ print (print . show) ("Hello", True)"Hello""True"-bitraverse_ print (print . show) (Right True)"True"/bitraverse_ print (print . show) (Left "Hello")"Hello"1 baseAs 1, but with the structure as the primary argument. For a version that doesn't ignore the results, see .Examples Basic usage:+bifor_ ("Hello", True) print (print . show)"Hello""True"(bifor_ (Right True) print (print . show)"True"*bifor_ (Left "Hello") print (print . show)"Hello"1 base Alias for 1.1 base Alias for 1.1 base Alias for 1.1 baseEvaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results, see .Examples Basic usage:*bisequence_ (print "Hello", print "World")"Hello""World""bisequence_ (Left (print "Hello"))"Hello"#bisequence_ (Right (print "World"))"World"1 base1The sum of a collection of actions, generalizing 1.Examples Basic usage:biasum (Nothing, Nothing)Nothingbiasum (Nothing, Just 42)Just 42biasum (Just 18, Nothing)Just 18biasum (Just 18, Just 42)Just 181 base Alias for 1.1 baseCollects the list of elements of a structure, from left to right.Examples Basic usage:biList (18, 42)[18,42]biList (Left 18)[18]1 base$Test whether the structure is empty.Examples Basic usage:binull (18, 42)Falsebinull (Right 42)Falsebinull (BiList [] [])True1 base4Returns the size/length of a finite structure as an .Examples Basic usage:bilength (True, 42)2bilength (Right 42)1bilength (BiList [1,2,3] [4,5])5bilength (BiList [] [])0,On infinite structures, this function hangs: /> bilength (BiList [1..] []) * Hangs forever * 1 base(Does the element occur in the structure?Examples Basic usage:bielem 42 (17, 42)Truebielem 42 (17, 43)Falsebielem 42 (Left 42)Truebielem 42 (Right 13)False"bielem 42 (BiList [1..5] [1..100])True!bielem 42 (BiList [1..5] [1..41])False1 baseReduces a structure of lists to the concatenation of those lists.Examples Basic usage:biconcat ([1, 2, 3], [4, 5]) [1,2,3,4,5]biconcat (Left [1, 2, 3])[1,2,3]4biconcat (BiList [[1, 2, 3, 4, 5], [6, 7, 8]] [[9]])[1,2,3,4,5,6,7,8,9]2 base-The largest element of a non-empty structure.Examples Basic usage:bimaximum (42, 17)42bimaximum (Right 42)42)bimaximum (BiList [13, 29, 4] [18, 1, 7])29!bimaximum (BiList [13, 29, 4] [])297On empty structures, this function throws an exception:bimaximum (BiList [] []))*** Exception: bimaximum: empty structure2 base+The least element of a non-empty structure.Examples Basic usage:biminimum (42, 17)17biminimum (Right 42)42)biminimum (BiList [13, 29, 4] [18, 1, 7])1!biminimum (BiList [13, 29, 4] [])47On empty structures, this function throws an exception:biminimum (BiList [] []))*** Exception: biminimum: empty structure2 baseThe 29 function computes the sum of the numbers of a structure.Examples Basic usage:bisum (42, 17)59bisum (Right 42)42%bisum (BiList [13, 29, 4] [18, 1, 7])72bisum (BiList [13, 29, 4] [])46bisum (BiList [] [])02 baseThe 2> function computes the product of the numbers of a structure.Examples Basic usage:biproduct (42, 17)714biproduct (Right 42)42)biproduct (BiList [13, 29, 4] [18, 1, 7])190008!biproduct (BiList [13, 29, 4] [])1508biproduct (BiList [] [])12 baseGiven a means of mapping the elements of a structure to lists, computes the concatenation of all such lists in order.Examples Basic usage:4biconcatMap (take 3) (fmap digitToInt) ([1..], "89") [1,2,3,8,9]3biconcatMap (take 3) (fmap digitToInt) (Left [1..])[1,2,3]3biconcatMap (take 3) (fmap digitToInt) (Right "89")[8,9]2 base2 returns the conjunction of a container of Bools. For the result to be  , the container must be finite; , however, results from a & value finitely far from the left end.Examples Basic usage:biand (True, False)Falsebiand (True, True)Truebiand (Left True)TrueEmpty structures yield :biand (BiList [] [])TrueA - value finitely far from the left end yields  (short circuit):6biand (BiList [True, True, False, True] (repeat True))FalseA . value infinitely far from the left end hangs: 9> biand (BiList (repeat True) [False]) * Hangs forever * An infinitely  value hangs: 4> biand (BiList (repeat True) []) * Hangs forever * 2 base2 returns the disjunction of a container of Bools. For the result to be  , the container must be finite; , however, results from a & value finitely far from the left end.Examples Basic usage:bior (True, False)Truebior (False, False)Falsebior (Left True)TrueEmpty structures yield :bior (BiList [] [])FalseA - value finitely far from the left end yields  (short circuit):8bior (BiList [False, False, True, False] (repeat False))TrueA . value infinitely far from the left end hangs: 8> bior (BiList (repeat False) [True]) * Hangs forever * An infinitely  value hangs: 4> bior (BiList (repeat False) []) * Hangs forever * 2 baseDetermines whether any element of the structure satisfies its appropriate predicate argument. Empty structures yield .Examples Basic usage:biany even isDigit (27, 't')Falsebiany even isDigit (27, '8')Truebiany even isDigit (26, 't')Truebiany even isDigit (Left 27)Falsebiany even isDigit (Left 26)True/biany even isDigit (BiList [27, 53] ['t', '8'])TrueEmpty structures yield :!biany even isDigit (BiList [] [])False2 baseDetermines whether all elements of the structure satisfy their appropriate predicate argument. Empty structures yield .Examples Basic usage:biall even isDigit (27, 't')Falsebiall even isDigit (26, '8')Truebiall even isDigit (Left 27)Falsebiall even isDigit (Left 26)True/biall even isDigit (BiList [26, 52] ['3', '8'])TrueEmpty structures yield :!biall even isDigit (BiList [] [])True2 baseThe largest element of a non-empty structure with respect to the given comparison function.Examples Basic usage:bimaximumBy compare (42, 17)42bimaximumBy compare (Left 17)172bimaximumBy compare (BiList [42, 17, 23] [-5, 18])427On empty structures, this function throws an exception:"bimaximumBy compare (BiList [] [])(*** Exception: bifoldr1: empty structure2 baseThe least element of a non-empty structure with respect to the given comparison function.Examples Basic usage:biminimumBy compare (42, 17)17biminimumBy compare (Left 17)172biminimumBy compare (BiList [42, 17, 23] [-5, 18])-57On empty structures, this function throws an exception:"biminimumBy compare (BiList [] [])(*** Exception: bifoldr1: empty structure2 base2 is the negation of 1.Examples Basic usage:binotElem 42 (17, 42)FalsebinotElem 42 (17, 43)TruebinotElem 42 (Left 42)FalsebinotElem 42 (Right 13)True%binotElem 42 (BiList [1..5] [1..100])False$binotElem 42 (BiList [1..5] [1..41])True2 baseThe 2 function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or  if there is no such element.Examples Basic usage:bifind even (27, 53)Nothingbifind even (27, 52)Just 52bifind even (26, 52)Just 26Empty structures always yield :bifind even (BiList [] [])Nothing2 base2 base2 base2 base2 base2 base2 base2 base2 base%1111111111111111111111112222222222222%1111111111111111111111122221222222222(C) 2011-2016 Edward Kmett BSD-style (see the file LICENSE)libraries@haskell.org provisionalportable Trustworthyy42 base2 identifies bifunctorial data structures whose elements can be traversed in order, performing  or t actions at each element, and collecting a result structure with the same shape.As opposed to  data structures, which have one variety of element on which an action can be performed, 26 data structures have two such varieties of elements.A definition of 2! must satisfy the following laws:  Naturality2 (t . f) (t . g) D t . 2 f g) for every applicative transformation tIdentity2 + + D + Composition . > (2 g1 g2) . 2 f1 f2 D 2 ( . > g1 . f1) ( . > g2 . f2) where an applicative transformation is a function t :: ( f,  g) => f a -> g apreserving the  operations: t (l x) = l x t (f k x) = t f k t x and the identity functor + and composition functors  are from Data.Functor.Identity and Data.Functor.Compose.Some simple examples are  and (,): instance Bitraversable Either where bitraverse f _ (Left x) = Left <$> f x bitraverse _ g (Right y) = Right <$> g y instance Bitraversable (,) where bitraverse f g (x, y) = (,) <$> f x <*> g y23 relates to its superclasses in the following ways: 1 f g D + . 2 (+ . f) (+ . g) 1 f g =  . 2 ( . f) ( . g) These are available as 2 and 2 respectively.2 baseEvaluates the relevant functions at each element in the structure, running the action, and builds a new structure with the same shape, using the results produced from sequencing the actions. 2 f g D 2 . 1 f g,For a version that ignores the results, see 1.Examples Basic usage:+bitraverse listToMaybe (find odd) (Left [])Nothing2bitraverse listToMaybe (find odd) (Left [1, 2, 3]) Just (Left 1)0bitraverse listToMaybe (find odd) (Right [4, 5])Just (Right 5)5bitraverse listToMaybe (find odd) ([1, 2, 3], [4, 5]) Just (1,5).bitraverse listToMaybe (find odd) ([], [4, 5])Nothing2 base Alias for 2.2 base Alias for 2.2 baseSequences all the actions in a structure, building a new structure with the same shape using the results of the actions. For a version that ignores the results, see 1. 2 D 2    Examples Basic usage:bisequence (Just 4, Nothing)Nothingbisequence (Just 4, Just 5) Just (4,5)bisequence ([1, 2, 3], [4, 5])%[(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)]2 base2 is 2 with the structure as the first argument. For a version that ignores the results, see 1.Examples Basic usage:'bifor (Left []) listToMaybe (find even)Nothing.bifor (Left [1, 2, 3]) listToMaybe (find even) Just (Left 1),bifor (Right [4, 5]) listToMaybe (find even)Just (Right 4)1bifor ([1, 2, 3], [4, 5]) listToMaybe (find even) Just (1,4)*bifor ([], [4, 5]) listToMaybe (find even)Nothing2 base Alias for 2.2 baseThe 2( function behaves like a combination of 1 and 1; it traverses a structure from left to right, threading a state of type a and using the given actions to compute new elements for the structure.Examples Basic usage:bimapAccumL (\acc bool -> (acc + 1, show bool)) (\acc string -> (acc * 2, reverse string)) 3 (True, "foo")(8,("True","oof"))2 baseThe 2( function behaves like a combination of 1 and 1; it traverses a structure from right to left, threading a state of type a and using the given actions to compute new elements for the structure.Examples Basic usage:bimapAccumR (\acc bool -> (acc + 1, show bool)) (\acc string -> (acc * 2, reverse string)) 3 (True, "foo")(7,("True","oof"))2 baseA default definition of 1 in terms of the 2 operations. 2 f g D + . 2 (+ . f) (+ . g)2 baseA default definition of 1 in terms of the 2 operations. 2 f g D  . 2 ( . f) ( . g)2 base2 base2 base2 base2 base2 base2 base2 base2 base 22222222222 22222222222 Trustworthyy''''''**********************'''***'''*********((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)Unsafez((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((*************(((((((((((((((((((((((((((((((((((((*******((((((((((((((((((((******((((( ((c) The University of Glasgow, 2001-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy U base  is wrapped around  (or whatever main is called in the program). It catches otherwise uncaught exceptions, and also flushes stdout/stderr before exiting.2base2 is wrapped around every foreign export and foreign import "wrapper" to mop up any uncaught exceptions. Thus, the result of running  in a foreign-exported function is the same as in the main thread: it terminates the program.2baseLike 2, but in the event of an exception that causes an exit, we don't shut down the system cleanly, we just exit. This is useful in some cases, because the safe exit version will give other threads a chance to clean up first, which might shut down the system in a different way. For example, trymain = forkIO (runIO (exitWith (ExitFailure 1))) >> threadDelay 10000This will sometimes exit with "interrupted" and code 0, because the main thread is given a chance to shut down when the child thread calls safeExit. There is a race to shut down between the main and child threads.2base The same as 23, but for non-IO computations. Used for wrapping foreign export and foreign import "wrapper" when these are used to export Haskell functions with non-IO types. ((222222 22222((2"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (concurrency) TrustworthyM2base2 is a quantity semaphore in which the resource is acquired and released in units of one. It provides guaranteed FIFO ordering for satisfying blocked 2 calls. The pattern . bracket_ (waitQSemN n) (signalQSemN n) (...),is safe; it never loses any of the resource.2base Build a new 2 with a supplied initial quantity. The initial quantity must be at least 0.2base3Wait for the specified quantity to become available2base7Signal that a given quantity is now available from the 2.22222222"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (concurrency)Safe2base2 is a quantity semaphore in which the resource is acquired and released in units of one. It provides guaranteed FIFO ordering for satisfying blocked 2 calls. The pattern $ bracket_ waitQSem signalQSem (...)/is safe; it never loses a unit of the resource.2base Build a new 2 with a supplied initial quantity. The initial quantity must be at least 0.2base#Wait for a unit to become available2baseSignal that a unit of the 2 is available22222222"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (concurrency) Trustworthy2base2< is an abstract type representing an unbounded FIFO channel.2base$Build and returns a new instance of 2.2baseWrite a value to a 2.2baseRead the next value from the 2. Blocks when the channel is empty. Since the read end of a channel is an 2, this operation inherits fairness guarantees of s (e.g. threads blocked in this operation are woken up in FIFO order).Throws r when the channel is empty and no other thread holds a reference to the channel.2base Duplicate a 2: the duplicate channel begins empty, but data written to either channel from then on will be available from both. Hence this creates a kind of broadcast channel, where data written by anyone is seen by everyone else.(Note that a duplicated channel is not equal to its original. So: fmap (c /=) $ dupChan c returns True for all c.)2base>Return a lazy list representing the contents of the supplied 2 , much like .2base#Write an entire list of items to a 2.2base22222222222222"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (concurrency) Trustworthyg 2base% if bound threads are supported. If rtsSupportsBoundThreads is , 2 will always return  and both 2 and 2 will fail.2baseFork a thread and call the supplied function when the thread is about to terminate, with an exception or a returned value. The function is called with asynchronous exceptions masked. forkFinally action and_then = mask $ \restore -> forkIO $ try (restore action) >>= and_thenThis function is useful for informing the parent when a child terminates, for example.2baseLike (*, this sparks off a new thread to run the ; computation passed as the first argument, and returns the ( of the newly created thread. However, 2 creates a bound thread, which is necessary if you need to call foreign (non-Haskell) libraries that make use of thread-local state, such as OpenGL (see Control.Concurrent#boundthreads).Using 2 instead of ( makes no difference at all to the scheduling behaviour of the Haskell runtime system. It is a common misconception that you need to use 2 instead of ( to avoid blocking all the Haskell threads when making a foreign call; this isn't the case. To allow foreign calls to be made without blocking all the Haskell threads (with GHC), it is only necessary to use the  -threaded option when linking your program, and to make sure the foreign import is not marked unsafe.2baseLike (3, but the child thread is a bound thread, as with 2.2baseReturns  if the calling thread is bound, that is, if it is safe to use foreign libraries that rely on thread-local state from the calling thread.2baseRun the  computation passed as the first argument. If the calling thread is not bound), a bound thread is created temporarily. runInBoundThread doesn't finish until the  computation finishes.You can wrap a series of foreign function calls that rely on thread-local state with runInBoundThread so that you can use them without knowing whether the current thread is bound.2baseRun the  computation passed as the first argument. If the calling thread is bound1, an unbound thread is created temporarily using (. runInBoundThread doesn't finish until the  computation finishes.Use this function only in the rare case that you have actually observed a performance loss due to the use of bound threads. A program that doesn't need its main thread to be bound and makes heavy use of concurrency (e.g. a web server), might want to wrap its main action in runInUnboundThread.Note that exceptions which are thrown to the current thread are thrown in turn to the thread that is executing the given computation. This ensures there's always a way of killing the forked thread.2baseBlock the current thread until data is available to read on the given file descriptor (GHC only).This will throw an  if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with 2, use *.2baseBlock the current thread until data can be written to the given file descriptor (GHC only).This will throw an  if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with 2, use *.2baseReturns an STM action that can be used to wait for data to read from a file descriptor. The second returned value is an IO action that can be used to deregister interest in the file descriptor.2baseReturns an STM action that can be used to wait until data can be written to a file descriptor. The second returned value is an IO action that can be used to deregister interest in the file descriptor.;(((((((((((((**********22222222222222222222222222(((2(((((((((*2222222222("(c) The University of Glasgow 2007/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental non-portableSafe2T2base#An exception thrown to a thread by 2' to interrupt a timed-out computation.2baseWrap an $ computation to time out and return Nothing( in case no result is available within n microseconds (1/10^6 seconds). In case a result is available before the timeout expires, Just a is returned. A negative timeout interval means "wait indefinitely". When specifying long timeouts, be careful not to exceed maxBound :: Int.=timeout 1000000 (threadDelay 1000 *> pure "finished on time")Just "finished on time"=timeout 10000 (threadDelay 100000 *> pure "finished on time")Nothing?The design of this combinator was guided by the objective that  timeout n f$ should behave exactly the same as f as long as f$ doesn't time out. This means that f has the same (< it would have without the timeout wrapper. Any exceptions f might throw cancel the timeout and propagate further up. It also possible for f7 to receive exceptions thrown to it by another thread.A tricky implementation detail is the question of how to abort an IO computation. This combinator relies on asynchronous exceptions internally (namely throwing the computation the 2 exception). The technique works very well for computations executing inside of the Haskell runtime system, but it doesn't work at all for non-Haskell code. Foreign function calls, for example, cannot be timed out with this combinator simply because an arbitrary C function cannot receive asynchronous exceptions. When timeout is used to wrap an FFI call that blocks, no timeout event can be delivered until the FFI call returns, which pretty much negates the purpose of the combinator. In practice, however, this limitation is less severe than it may sound. Standard I/O functions like , , Network.Socket.accept, or  appear to be blocking, but they really don't because the runtime system uses scheduling mechanisms like  select(2) to perform asynchronous I/O, so it is possible to interrupt standard socket I/O or file I/O using this combinator.2base2base2222$-(c) The University of Glasgow, CWI 2001--2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental-non-portable (local universal quantification) Trustworthy'(./23>?mubaseThe u+ class comprehends a fundamental primitive 2 for folding over constructor applications, say terms. This primitive can be instantiated in several ways to map over the immediate subterms of a term; see the gmap combinators later in this class. Indeed, a generic programmer does not necessarily need to use the ingenious gfoldl primitive but rather the intuitive gmap combinators. The 2 primitive is completed by means to query top-level constructors, to turn constructor representations into proper terms, and to list all possible datatype constructors. This completion allows us to serve generic programming scenarios like read, show, equality, term generation.The combinators 2, 2, 2<, etc are all provided with default definitions in terms of 2, leaving open the opportunity to provide datatype-specific definitions. (The inclusion of the gmap! combinators as members of class u allows the programmer or the compiler to derive specialised, and maybe more efficient code per datatype. Note: 2 is more higher-order than the gmap combinators. This is subject to ongoing benchmarking experiments. It might turn out that the gmap, combinators will be moved out of the class u.)$Conceptually, the definition of the gmap' combinators in terms of the primitive 2$ requires the identification of the 2 function arguments. Technically, we also need to identify the type constructor c for the construction of the result type from the folded term type.In the definition of gmapQx7 combinators, we use phantom type constructors for the c in the type of 2 because the result type of a query does not involve the (polymorphic) type of the term argument. In the definition of 2; we simply use the plain constant type constructor because 2 is left-associative anyway and so it is readily suited to fold a left-associative binary operation over the immediate subterms. In the definition of gmapQr, extra effort is needed. We use a higher-order accumulation trick to mediate between left-associative constructor application vs. right-associative binary operation (e.g., (:)7). When the query is meant to compute a value of type r1, then the result type within generic folding is r -> r. So the result of folding is a function to which we finally pass the right unit. With the -XDeriveDataTypeable+ option, GHC can generate instances of the u9 class automatically. For example, given the declaration 2data T a b = C1 a b | C2 deriving (Typeable, Data)3GHC will generate an instance that is equivalent to instance (Data a, Data b) => Data (T a b) where gfoldl k z (C1 a b) = z C1 `k` a `k` b gfoldl k z C2 = z C2 gunfold k z c = case constrIndex c of 1 -> k (k (z C1)) 2 -> z C2 toConstr (C1 _ _) = con_C1 toConstr C2 = con_C2 dataTypeOf _ = ty_T con_C1 = mkConstr ty_T "C1" [] Prefix con_C2 = mkConstr ty_T "C2" [] Prefix ty_T = mkDataType "Module.T" [con_C1, con_C2]?This is suitable for datatypes that are exported transparently.2baseFixity of constructors2baseUnique index for datatype constructors, counting from 1 in the order they are given in the program text.2base%Public representation of constructors2base"Public representation of datatypes2baseRepresentation of constructors. Note that equality on constructors with different types may not work -- i.e. the constructors for  and  may compare equal.2baseRepresentation of datatypes. A package of constructor representations with names of type and module.:base1The type constructor used in definition of gmapMp:base1The type constructor used in definition of gmapQr:base/Type constructor for adding counters to queries2base=Left-associative fold operation for constructor applications. The type of 2 is a headache, but operationally it is a simple generalisation of a list fold.The default definition for 2 is    , which is suitable for abstract datatypes with no substructures.2base"Unfolding constructor applications2baseObtaining the constructor from a given datum. For proper terms, this is meant to be the top-level constructor. Primitive datatypes are here viewed as potentially infinite sets of values (i.e., constructors).2base&The outer type constructor of the type2base*Mediate types and unary type constructors.In u instances of the form ) instance (Data a, ...) => Data (T a) 2 should be defined as .The default definition is   5, which is appropriate for instances of other forms.2base+Mediate types and binary type constructors.In u instances of the form 3 instance (Data a, Data b, ...) => Data (T a b) 2 should be defined as .The default definition is   5, which is appropriate for instances of other forms.2base>A generic transformation that maps over the immediate subterms9The default definition instantiates the type constructor c in the type of 2 to an identity datatype constructor, using the isomorphism pair as injection and projection.2base7A generic query with a left-associative binary operator2base8A generic query with a right-associative binary operator2baseA generic query that processes the immediate subterms and returns a list of results. The list is given in the same order as originally specified in the declaration of the data constructors.2base>A generic query that processes one child by index (zero-based)2baseA generic monadic transformation that maps over the immediate subterms9The default definition instantiates the type constructor c in the type of 2 to the monad datatype constructor, defining injection and projection using ? and <.2base>Transformation of at least one immediate subterm does not fail2base4Transformation of one immediate subterm with success2baseBuild a term skeleton2base4Build a term and use a generic function for subterms2baseMonadic variation on 22base.Gets the type constructor including the module2base*Gets the public presentation of a datatype2base"Gets the datatype of a constructor2base,Gets the public presentation of constructors2base+Look up a constructor by its representation2base Constructs an algebraic datatype2baseConstructs a constructor2base.Gets the constructors of an algebraic datatype2baseGets the field labels of a constructor. The list of labels is returned in the same order as they were given in the original constructor declaration.2base Gets the fixity of a constructor2base!Gets the string for a constructor2base!Lookup a constructor via a string2baseTest for an algebraic type2base Max (Arg 1 ())Max {getMax = Arg 1 ()}3base Min (Arg 0 ()) <> Min (Arg 1 ())Min {getMin = Arg 0 ()}3base3 isn't itself a 0 in its own right, but it can be placed inside 3 and 3" to compute an arg min or arg max.,minimum [ Arg (x * x) x | x <- [-10 .. 10] ]Arg 0 03baseA generalization of  to an arbitrary <. May fail to terminate for some values in some semigroups.3base)This lets you use a difference list of a  as a .Example:let hello = diff "Hello, "appEndo hello "World!""Hello, World!""appEndo (hello <> mempty) "World!""Hello, World!""appEndo (mempty <> hello) "World!""Hello, World!"let world = diff "World"let excl = diff "!")appEndo (hello <> (world <> excl)) mempty"Hello, World!")appEndo ((hello <> world) <> excl) mempty"Hello, World!"3baseRepeat a value n times. ?mtimesDefault n a = a <> a <> ... <> a -- using <> (n-1) timesImplemented using   and Y.%This is a suitable definition for an mtimes member of .3baseFold an 3 case-wise, just like .3 base3 base3 base3 base3 base3 base3 base3 base3 base3 base3 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base: base: base: base: base: base: base: base: base: base: base: base: base: base: base3base%The argument used for comparisons in p and x.baseThe "value" exposed via the v,  etc. instances.3X 333333333333333333333333333X  33333333333333333333333333(C) 2008-2014 Edward Kmett/BSD-style (see the file libraries/base/LICENSE)Edward Kmett  provisionalportableSafe238 4baseUninhabited data type4baseSince 4 values logically don't exist, this witnesses the logical reasoning tool of "ex falso quodlibet".%let x :: Either Void Int; x = Right 5:{ case x of Right r -> r Left l -> absurd l:}54baseIf 4 is uninhabited then any v! that holds only values of type 4 is holding no values.Using  ApplicativeDo: '4 theVoid' can be understood as the do expression )do void <- theVoid pure (absurd void) with an inferred Functor constraint.4 base4base4base4base4base4base4base Reading a 4- value is always a parse error, considering 4% as a data type with no constructors.4base:base444444(c) Ross Paterson 2014 BSD-style (see the file LICENSE)libraries@haskell.org experimentalportableSafe.3804baseLifted sum of functors.4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base4 base: base: base444444(c) Ross Paterson 2010 BSD-style (see the file LICENSE)libraries@haskell.org experimentalportableSafe.384baseLifted product of functors.5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base: base: base4545(c) Ross Paterson 2010 BSD-style (see the file LICENSE)libraries@haskell.org experimentalportable Trustworthy '(.385baseRight-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad.5base)The deduction (via generativity) that if  g x :~: g y then x :~: y.5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base5 base: base: base55555559 59 (C) 2007-2015 Edward Kmett BSD-style (see the file LICENSE)libraries@haskell.org provisionalportable Trustworthy02<=5baseDual function arrows.5base2This data type represents an equivalence relation.9Equivalence relations are expected to satisfy three laws:  Reflexivity5 f a a = TrueSymmetry5 f a b = 5 f b a TransitivityIf 5 f a b and 5 f b c are both  then so is 5 f a c.The types alone do not enforce these laws, so you'll have to check them yourself.5base*Defines a total ordering on a type as per  .This condition is not checked by the types. You must ensure that the supplied values are valid total orderings yourself.5base$The class of contravariant functors.'Whereas in Haskell, one can think of a v as containing or producing values, a contravariant functor is a functor that can be thought of as  consuming values.9As an example, consider the type of predicate functions  a -> Bool. One such predicate might be negative x = x < 0, which classifies integers as to whether they are negative. However, given this predicate, we can re-use it in other situations, providing we have a way to map values to( integers. For instance, we can use the negative predicate on a person's bank balance to work out if they are currently overdrawn: newtype Predicate a = Predicate { getPredicate :: a -> Bool } instance Contravariant Predicate where contramap :: (a' -> a) -> (Predicate a -> Predicate a') contramap f (Predicate p) = Predicate (p . f) | `- First, map the input... `----- then apply the predicate. overdrawn :: Predicate Person overdrawn = contramap personBankBalance negative 5Any instance should be subject to the following laws: Identity5  =  Composition5 (g . f) = 5 f . 5 gNote, that the second law follows from the free theorem of the type of 5 and the first law, so you need only check that the former condition holds.5baseReplace all locations in the output with the same value. The default definition is 5 .  <, but this may be overridden with a more efficient version.5baseIf f is both v and 5 then by the time you factor in the laws of each of those classes, it can't actually use its argument in any meaningful capacity.This method is surprisingly useful. Where both instances exist and are lawful we have the following laws: > f D 5 5 f D 5 5baseThis is 5 with its arguments flipped.5baseThis is an infix alias for 5.5baseThis is an infix version of 5 with the arguments flipped.5baseCompare using  .5baseCheck for equivalence with 9.Note: The instances for  and  violate reflexivity for NaN.5baseA 5 is a 5 v , because 5 can apply its function argument to each input of the comparison function.5baseEquivalence relations are 5, because you can apply the contramapped function to each input to the equivalence relation.5base(X)( on predicates uses logical conjunction ( )/ on the results. Without newtypes this equals   (&&). (<>) :: Predicate a -> Predicate a -> Predicate a Predicate pred <> Predicate pred' = Predicate a -> pred a && pred' a 5baseY on predicates always returns True . Without newtypes this equals l True. )mempty :: Predicate a mempty = _ -> True 5baseA 5 is a 5 v , because 5 can apply its function argument to the input of the predicate.Without newtypes 5 f equals precomposing with f (= (. f)). contramap :: (a' -> a) -> (Predicate a -> Predicate a') contramap f (Predicate g) = Predicate (g . f) 5base(X ) @(Op a b) without newtypes is (X ) @(b->a) = liftA2 (X). This lifts the  operation (X) over the output of a. (<>) :: Op a b -> Op a b -> Op a b Op f <> Op g = Op a -> f a <> g a 5baseY @(Op a b) without newtypes is mempty @(b->a) =  _ -> mempty. )mempty :: Op a b mempty = Op _ -> mempty 5base(X)* on equivalences uses logical conjunction ( )/ on the results. Without newtypes this equals   (  (&&)). (<>) :: Equivalence a -> Equivalence a -> Equivalence a Equivalence equiv <> Equivalence equiv' = Equivalence a b -> equiv a b && equiv a b 5baseY on equivalences always returns True . Without newtypes this equals l (l True). 9mempty :: Equivalence a mempty = Equivalence _ _ -> True 5base(X)& on comparisons combines results with (X ) @Ordering. Without newtypes this equals   (  (X)). (<>) :: Comparison a -> Comparison a -> Comparison a Comparison cmp <> Comparison cmp' = Comparison a a' -> cmp a a' <> cmp a a' 5baseY on comparisons always returns EQ . Without newtypes this equals l (l EQ). 5mempty :: Comparison a mempty = Comparison _ _ -> EQ 5555555555555555555555555555555555555555555554545454#(c) Ashley Yakeley 2005, 2006, 2009/BSD-style (see the file libraries/base/LICENSE)$Ashley Yakeley  experimentalportable Trustworthy.> 5base$resolution of 10^-12 = .0000000000015base resolution of 10^-9 = .0000000015baseresolution of 10^-6 = .0000015baseresolution of 10^-3 = .0015base>resolution of 10^-2 = .01, useful for many monetary currencies5baseresolution of 10^-1 = .15base/resolution of 1, this works the same as Integer5base,The type parameter should be an instance of 5.5baseGeneralisation of  to any instance of z5baseGeneralisation of  to any instance of z5baseGeneralisation of  to any instance of z5base/First arg is whether to chop off trailing zeros5base5base5base5base5base5base5base5base5base For example,  Fixed 1000 will give you a 5 with a resolution of 1000.5base5base5base5base6base6base6base6base6base55555555555555555555555555555555555555555555"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy235678 6base&Complex numbers are an algebraic type.For a complex number z,   z# is a number with the magnitude of z8, but oriented in the positive real direction, whereas  z has the phase of z, but unit magnitude.The  and ( instances traverse the real part first. Note that 6's instances inherit the deficiencies from the type parameter's. For example,  Complex Float's x# instance has similar problems to 's.6baseforms a complex number from its real and imaginary rectangular components.6base+Extracts the real part of a complex number.6base0Extracts the imaginary part of a complex number.6base"The conjugate of a complex number.6baseForm a complex number from polar components of magnitude and phase.6base6 t# is a complex value with magnitude 1 and phase t (modulo 2*).6base The function 6 takes a complex number and returns a (magnitude, phase) pair in canonical form: the magnitude is nonnegative, and the phase in the range (-, ]2; if the magnitude is zero, then so is the phase.6base.The nonnegative magnitude of a complex number.6base,The phase of a complex number, in the range (-, ]2. If the magnitude is zero, then so is the phase.6 base6 base6base6base6base6base6base6base6base6base6 base6 base6 base: base: base 6666666666 666666666666:i   II:VVVVI::::CC        !!!VV::$I`::QX)*+++++,-./>>>> A::i;;;;aa8++++++++++++++++++++++++++,,,,,-,,,,-C-!AA:;88=C----+++++++++++++++++!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @@@@@<<AA                           CCCCCCCCCCCCCCCCDDEEEEGHHIIIIIIIIIKKKKKKKKKKKKKMMMMMMMMMMMMMMMMMMMMMMNNOO    PPPP222222222QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQRRRRRRRRRRRRRRRRUUUUUU?VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XXXXXXXXXXXXXXXXXXWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\\\\\\;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]^^^^^^^^^^^^^^^^^^^^^^^__________________________````````````````````````````````````````````````````````################aaaaaaaaaaaaaaaaabb====cc>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>dddddddddddee5555555555555555555555555555ffffffffffffffffffggggggggghhhhhhhhhhhhhhhhhhh8888888888888888%%%%00000&!!,,,,,,,,,,,--------------iiiiiijjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkkkkkkkkkkkkkkkkkkkkkkk777777777777777777777777777777777lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++))))))))))))))))))))))))))))))))))))))) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) n n n n n n n n n n n n n n n n n n n n n n n n n n n                             oo o o o o o o o o o o o o o o o o o o o o o @@@@ @ @ @ @@ @ @ @@ @ @ @ @ @ D D D DD D D D D D D D        !<!<!<!<!<!<<<!<!<!<!<<!<<!<!<!<!<!<<!<!<<!<!<!<!t!t!t!t!t!t!t!t!t!t!t!t!t!v!v!v!v!v!v!v!v!v!v!v!vvv!v!v!v!v!v!v!vv!v!v!vv!v!v!v!v!v!v!!!!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!y!z!z!z!z!zzz!z!z!z!z!z!z!z!z!z!z!z!z!z!z!z!z!z!s!s!s"ss"{"{"{"{"{"{"{"{"{"|"|"|"}"}"}"}"}"}"}"}"}"}"}"}!}"}"}"}"}"}"}"}"}"}"}"}"}"}}"}"}"}"}"}"}"}"}"}"~"~!~"~"~"~"~"~"~"~"~""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " " " "  " " " " " " # # # # # # # #  # # # # # # # # # # # # # # # # # # # # #   # # # # # # # #   # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ##################################################$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((""(((((())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))!!))))))))))))))))))))q)q)q)qqqqqqq)q)q)q)q)q)q)q)q)q)q)q)q)q*q*q*q*q*q*q*q*q*q*q*q*q*q*q*q*q*q*q*q**r*r*r*r*r*L****|#||#|#|#|#|#|#|#|*|*|*|*|*|*||#|#G*G*G*G*G*G*G*G*G*G*G*G*G***************************"****************J*J)J*J)J*J*J*JJ******************************((***+++++++++++++++++++++++++p+p+p++++++++++++++++++++++++++++++++++++++++++++++++++++c+c+c+++++++++++++++++++++++++++++++++++++++++++++++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",",",",",",",",","",",",",",",",",",",",",",",",",",",",",",*********,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,, , , , , , , , , , , , ,,,,OO,O,O,O,O-O-O-O-O-----,---------------------------------------------------------------------------------------[-[-[--------------------------------........................./......................T.T.3.*..!....................................................................................//////////////////////////////////////////////////////////.////////////////////////////////////////////////////////////./////////////////00000000000000000000000000000000000000000FFF0F0FFFFFFFF0F0FFFFFFFF0FFFFFFFFFFFFFFFFFFFFFF0F0F0F0F0FFFFFFFFFF-000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111,111111111111111111111111111111111111111111111111111111111111111111111111 1 1 1 1 1 111111111222222222222****22222$$$$2$2$2$2$2$2$2$2$$$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$$$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$3$333B-B-B3B3B3B3BBBBBBB3B3B3B3B3B3B3B3B3B3B3B3B3BB3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B+BBB,B BBB3B+BBB,B BBB3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3BBBBB2BBB3BBBBB2BBB3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B333333333333334, 44444444424440+4444, 444444444244444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444445555555555555555555555555555555 555555555555555555555555555555555555555555555555555555555555555555555555"3333555555555533333355..5..555.W5W5Y5555555555555566666666666__6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+6+66666666666666466444666666666666666444466444466666666777777777777777777777777777777n7n7-77777777777777777v77777777777777777777+7777777277777777777772777772777777777777777777|7|7777777777777777777777888888888888888888+88888888888888******888**88888888778778888"8"8"8"8"8"8O88888.88.888.8.88+888888888888888888888888F$8$8$8$8B8B8B8B8B7B7B7B7B8B8B8B8B8B88777788888baseControl.Exception.BaseGHC.ExtsGHC.ListPreludeGHC.BaseForeign.StablePtr System.IO Data.Tuple Data.BoolGHC.TopHandlerGHC.IO.Exception Debug.Trace Data.Function GHC.Float Data.CoerceData.EqData.Ord Control.Monad Data.FunctorControl.Monad.FixControl.Monad.Fail Control.Arrow GHC.Desugar Data.StringControl.Monad.ZipGHC.GHCiType.Reflection.Unsafe Data.Dynamic Data.Monoid GHC.Stack GHC.StaticPtr GHC.Natural Unsafe.CoerceControl.ApplicativeNumeric Data.Data Text.Read Text.ShowData.IxType.Reflection Data.FoldableData.Traversable GHC.Generics GHC.TypeNats GHC.TypeLitsGHC.OverloadedLabels GHC.Records Data.CharData.Int Data.Maybe Data.RatioControl.Monad.ST.SafeData.Type.Equality Data.Word Foreign.Ptr Data.Either Data.KindGHC.RealGHC.WordGHC.IOGHC.Fingerprint.TypeGHC.IntGHC.CharGHC.Exception.Type GHC.MaybeData.SemigroupGHC.Stack.Types GHC.ExceptionGHC.ErrData.List.NonEmpty GHC.Stack.CCS GHC.ProfilingGHC.NumControl.Concurrent.MVarGHC.MVarSystem.IO.UnsafeGHC.Float.RealFracMethodsGHC.Float.ConversionUtils Data.VersionData.Type.BoolGHC.ShowGHC.STControl.Monad.ST.Unsafe Data.STRef GHC.STRefGHC.EnumGHC.ArrGHC.Ix Data.Bits GHC.UnicodeSystem.Mem.WeakGHC.WeakText.ParserCombinators.ReadPText.ParserCombinators.ReadPrec Text.Read.LexGHC.ReadGHC.PtrGHC.PackGHC.Fingerprint GHC.IO.IOMode GHC.ClockData.Type.CoercionControl.Category Data.Proxy GHC.Stable GHC.StorableForeign.StorableForeign.C.Types GHC.OldListData.Functor.Const Data.TypeableGHC.IO.Handle.LockSystem.IO.ErrorControl.Exception Data.IORef GHC.IORefForeign.ForeignPtr.SafeGHC.ForeignPtrForeign.ForeignPtr.UnsafeForeign.ForeignPtr GHC.IO.BufferGHC.IO.Encoding.Types GHC.IOArrayGHC.IO.Encoding GHC.IO.DeviceGHC.IO.BufferedIO GHC.IO.HandleGHC.IO.Handle.TypesGHC.IO.Handle.FD System.ExitGHC.IO.Encoding.FailureGHC.IO.Encoding.UTF8GHC.IO.Encoding.UTF32GHC.IO.Encoding.UTF16GHC.IO.Encoding.Latin1Foreign.Marshal.ErrorForeign.Marshal.AllocForeign.Marshal.UtilsForeign.Marshal.Array GHC.ForeignForeign.C.StringForeign.Marshal.UnsafeForeign.ConcurrentForeign.C.ErrorForeign.Marshal.PoolSystem.Posix.Types GHC.EventSystem.Posix.InternalsGHC.ConcControl.Concurrent System.Mem GHC.Conc.SyncGHC.IO.Encoding.IconvGHC.IO.Handle.InternalsGHC.EnvironmentGHC.Conc.Signal GHC.IO.FDGHC.IO.Handle.TextData.Functor.Identity Data.ListText.Show.Functions Text.Printf System.InfoSystem.EnvironmentSystem.Environment.BlankSystem.Console.GetOptSystem.CPUTimeGHC.StableNameGHC.ResponseFileGHC.GHCi.Helpers GHC.ByteOrder Data.UniqueControl.Monad.ST.Lazy.SafeControl.Monad.ST.Lazy.UnsafeData.STRef.LazyControl.Monad.IO.Class GHC.Stats GHC.RTS.FlagsGHC.ExecutionStack.InternalGHC.ExecutionStackData.Functor.ClassesData.BifunctorData.BifoldableData.BitraversableControl.Concurrent.QSemNControl.Concurrent.QSemControl.Concurrent.ChanSystem.Timeout Data.VoidData.Functor.SumData.Functor.ProductData.Functor.ComposeData.Functor.Contravariant Data.Fixed Data.ComplexerrorEitherthrow UnderflowArithException callStackAssertionFailedzipWithSTM atomicallyMaybeIO<$>SumProductstimesIdempotentfromEnumCharRational GHC.IO.Unsafebracket hGetContentsGHC.IO.Handle.Lock.WindowsGHC.IO.Encoding.CodePage GHC.Event.Arr GHC.ConstantsGHC.ConsoleHandler$IntStringshowevenJustRightsortBycomparefstData.Functor.Utils>>= MonadPlus readMaybe genericLength maximumBy minimumBygenericReplicate genericTake genericDropgenericSplitAt genericIndexRead readsPrecControl.Monad.STstToIOGHC.Event.UniquetoEnumNumeric.NaturalNaturalOverflowisLetteruncurry GHC.Event.PSQShow showsPrecStorableInt8Int16Int32Int64Word8Word16Word32Word64 StablePtrfreeHaskellFunPtropenFilelengthisAlphaPtrnullPtridData.Semigroup.Internal Data.OldListtraverseformapMforM sequenceAsequenceData.Typeable.InternalGHC.IO.Handle.Lock.CommonControl ExceptionthrowToforkIOWithUnmaskforkIOatomicModifyIORefmalloc newForeignPtrHandlestdoutstdinstderrwithForeignPtrForeign.ForeignPtr.Imp mallocArray mallocArray0utf8mkTextEncodingMVarGHC.Event.IntTableGHC.Event.ArrayhSeek mkFileHandlemkHandleFromFDSystem.DirectorygetDirectoryContentshFlush hLookAheadGHC.IO.Handle.Lock.NoOpfixIO killThread GHC.CompactcompactsetAllocationCounterenableAllocationLimit TextEncoding ForeignPtrnewsizeOffree finalizerFreeallocawithCStringtouchForeignPtraddForeignPtrFinalizer Foreign.CForeign.Marshal.SafeForeign.Marshal Foreign.SafeForeignGHC.Event.InternalIOErrorGHC.Event.KQueueGHC.Event.EPoll threadDelayforkOSmaskthrowIOControl.Concurrent.STM.TChan newTChanIOnewBroadcastTChanIOControl.Concurrent.STM.TQueue newTQueueIOControl.Concurrent.STM.TBQueue newTBQueueIOControl.Concurrent.STM.TMVar newTMVarIOunsafePerformIOtrycatchControl.Monad.ST.ImpisDoesNotExistErrorgetArgsGHC.Event.PollGHC.Event.ControlGHC.Event.TimerManagerGHC.Event.ManagerGHC.Event.Thread GHC.Conc.IOhCloseisAlreadyInUseErrorisPermissionErrorhSetBinaryModeGHC.IO.Handle.Lock.LinuxOFDGHC.IO.Handle.Lock.Flock isFullError isEOFErrorlocaleEncodingisIllegalOperationisIllegalOperationErrormfixreturnliftMExceptComposefoldMap traverse_ sequenceA_mapM_ sequence_for_forM_foldlfoldrMonadIOliftIOfilterChan forkFinally SomeException!System.Environment.ExecutablePathSystem.Posix.EnvgetEnvsetEnv IOException lookupEnvunsetEnvSystem.CPUTime.UtilsSystem.CPUTime.Unsupported!System.CPUTime.Posix.ClockGetTimeGHC.StaticPtr.InternalSystem.Mem.StableNameData.STRef.StrictSystem.CPUTime.Posix.TimesSystem.CPUTime.Posix.RUsageControl.Monad.ST.StrictControl.Monad.ST.Lazy.ImpControl.Monad.ST.LazyControl.Monad.Instancesunfoldr transpose*** Bifunctorbimap bitraversebifor bisequenceMainmainexitWithBlockedIndefinitelyOnMVarhGetBufhPutBuf hWaitForInputLastFirstcycle absentErroraugment++build recSelErrorghc-primGHC.PrimseqeqStringnoMethodBindingErrornonExhaustiveGuardsError runtimeErrorpatError realWorld# recConError GHC.CStringunpackCStringUtf8#unpackFoldrCString#unpackCString#void# typeErrorcstringLength#concatzipbindIOreturnIO newStablePtrprint nullAddr#snd otherwiseassert runMainIOthenIO GHC.Magiclazy assertErroroneShotrunRW#trace breakpointbreakpointCondinlinemap groupWithnoinlinerationalToFloatrationalToDouble magicDictcoerce fromInteger- fromRationalenumFrom enumFromThen enumFromToenumFromThenTo GHC.Classes==>=negate>>fmapfailarr>>>firstapp|||loop fromStringtoAnnotationWrapper fromIntegral realToFrac toInteger toRationalguardmzip ghciStepIOIsListfromList fromListNtoListproxy#mkTrContoDyn<>memptymappendmconcatemptyCallStack pushCallStack fromStaticPtrnaturalFromIntegernaturalToInteger plusNatural minusNatural timesNatural mkNaturalNatS#wordToNatural#unsafeEqualityProof unsafeCoerce# unsafeCoercejoin<*>pure*>BoundedEnumEqFloating FractionalIntegralMonadDataFunctorNumOrdReal RealFloatRealFracIxTypeableMonadFix MonadFailIsString ApplicativeFoldable TraversableGenericGeneric1Datatype ConstructorSelectorKnownNat KnownSymbol GHCiSandboxIOIsLabel SemigroupMonoidHasFieldAddr#Array# GHC.TypesBool ByteArray#Char#Double#DoubleFloat#FloatInt#Int8#Int16#Int32#Int64#integer-wired-inGHC.Integer.TypeIntegerWeak# MutableArray#MutableByteArray#OrderingMVar#Ratio RealWorld StablePtr#~~ ArrayArray#MutableArrayArray#State# StableName#MutVar#Void#Word#WordWord8#Word16#Word32#Word64# ThreadId#BCOFunPtrTVar#Compact#TypeTYPE Constraint RuntimeRepVecCountVecElemOpaqueV1U1Par1Rec1K1M1:+::*::.:RDCSRec0D1C1S1RepRep1URecUAddrUCharUDoubleUFloatUIntUWordNatSymbol+*^<=? CmpSymbolCmpNatDivModLog2 TypeError CoercibleProxy#Any SmallArray#SmallMutableArray# StaticPtr CallStackTypeRep SomeTypeRep AppendSymbolUnsafeEqualityInt8X16#Int16X8#Int32X4#Int64X2#Int8X32# Int16X16#Int32X8#Int64X4#Int8X64# Int16X32# Int32X16#Int64X8# Word8X16# Word16X8# Word32X4# Word64X2# Word8X32# Word16X16# Word32X8# Word64X4# Word8X64# Word16X32# Word32X16# Word64X8#FloatX4# DoubleX2#FloatX8# DoubleX4# FloatX16# DoubleX8#C#D#FalseF#I#Nothing:%W8#TrueW#LeftLTEQGT StaticPtrInfo FingerprintSrcLocTyConModuleKindRep TypeLitSortText:<>::$$:ShowTypePrefixIInfixILeftAssociativeRightAssociativeNotAssociative SourceUnpackSourceNoUnpackNoSourceUnpackedness SourceLazy SourceStrictNoSourceStrictness DecidedLazy DecidedStrict DecidedUnpackMetaDataMetaConsMetaSelVecRepTupleRepSumRep LiftedRep UnliftedRepIntRepInt8RepInt16RepInt32RepInt64RepWordRepWord8Rep Word16Rep Word32Rep Word64RepAddrRepFloatRep DoubleRepVec2Vec4Vec8Vec16Vec32Vec64 Int8ElemRep Int16ElemRep Int32ElemRep Int64ElemRep Word8ElemRep Word16ElemRep Word32ElemRep Word64ElemRep FloatElemRep DoubleElemRepKindRepTyConApp KindRepVar KindRepApp KindRepFun KindRepTYPEKindRepTypeLitSKindRepTypeLitD TypeLitSymbol TypeLitNat UnsafeReflgtChar#geChar#eqChar#neChar#ltChar#leChar#ord# extendInt8# narrowInt8# negateInt8# plusInt8#subInt8# timesInt8# quotInt8#remInt8# quotRemInt8#eqInt8#geInt8#gtInt8#leInt8#ltInt8#neInt8# extendWord8# narrowWord8# notWord8# plusWord8# subWord8# timesWord8# quotWord8# remWord8# quotRemWord8#eqWord8#geWord8#gtWord8#leWord8#ltWord8#neWord8# extendInt16# narrowInt16# negateInt16# plusInt16# subInt16# timesInt16# quotInt16# remInt16# quotRemInt16#eqInt16#geInt16#gtInt16#leInt16#ltInt16#neInt16# extendWord16# narrowWord16# notWord16# plusWord16# subWord16# timesWord16# quotWord16# remWord16#quotRemWord16# eqWord16# geWord16# gtWord16# leWord16# ltWord16# neWord16#+#-#*# timesInt2#mulIntMayOflo#quotInt#remInt# quotRemInt#andI#orI#xorI#notI# negateInt#addIntC#subIntC#>#>=#==#/=#<#<=#chr# int2Word# int2Float# int2Double# word2Float# word2Double#uncheckedIShiftL#uncheckedIShiftRA#uncheckedIShiftRL# plusWord# addWordC# subWordC# plusWord2# minusWord# timesWord# timesWord2# quotWord#remWord# quotRemWord# quotRemWord2#and#or#xor#not#uncheckedShiftL#uncheckedShiftRL# word2Int#gtWord#geWord#eqWord#neWord#ltWord#leWord#popCnt8# popCnt16# popCnt32# popCnt64#popCnt#pdep8#pdep16#pdep32#pdep64#pdep#pext8#pext16#pext32#pext64#pext#clz8#clz16#clz32#clz64#clz#ctz8#ctz16#ctz32#ctz64#ctz# byteSwap16# byteSwap32# byteSwap64# byteSwap# bitReverse8# bitReverse16# bitReverse32# bitReverse64# bitReverse# narrow8Int# narrow16Int# narrow32Int# narrow8Word# narrow16Word# narrow32Word#>##>=##==##/=##<##<=##+##-##*##/## negateDouble# fabsDouble# double2Int# double2Float# expDouble# expm1Double# logDouble# log1pDouble# sqrtDouble# sinDouble# cosDouble# tanDouble# asinDouble# acosDouble# atanDouble# sinhDouble# coshDouble# tanhDouble# asinhDouble# acoshDouble# atanhDouble#**##decodeDouble_2Int#decodeDouble_Int64#gtFloat#geFloat#eqFloat#neFloat#ltFloat#leFloat# plusFloat# minusFloat# timesFloat# divideFloat# negateFloat# fabsFloat# float2Int# expFloat# expm1Float# logFloat# log1pFloat# sqrtFloat# sinFloat# cosFloat# tanFloat# asinFloat# acosFloat# atanFloat# sinhFloat# coshFloat# tanhFloat# asinhFloat# acoshFloat# atanhFloat# powerFloat# float2Double#decodeFloat_Int# newArray#sameMutableArray# readArray# writeArray# sizeofArray#sizeofMutableArray# indexArray#unsafeFreezeArray#unsafeThawArray# copyArray#copyMutableArray# cloneArray#cloneMutableArray# freezeArray# thawArray# casArray#newSmallArray#sameSmallMutableArray#shrinkSmallMutableArray#readSmallArray#writeSmallArray#sizeofSmallArray#sizeofSmallMutableArray#getSizeofSmallMutableArray#indexSmallArray#unsafeFreezeSmallArray#unsafeThawSmallArray#copySmallArray#copySmallMutableArray#cloneSmallArray#cloneSmallMutableArray#freezeSmallArray#thawSmallArray#casSmallArray# newByteArray#newPinnedByteArray#newAlignedPinnedByteArray#isMutableByteArrayPinned#isByteArrayPinned#byteArrayContents#sameMutableByteArray#shrinkMutableByteArray#resizeMutableByteArray#unsafeFreezeByteArray#sizeofByteArray#sizeofMutableByteArray#getSizeofMutableByteArray#indexCharArray#indexWideCharArray#indexIntArray#indexWordArray#indexAddrArray#indexFloatArray#indexDoubleArray#indexStablePtrArray#indexInt8Array#indexInt16Array#indexInt32Array#indexInt64Array#indexWord8Array#indexWord16Array#indexWord32Array#indexWord64Array#indexWord8ArrayAsChar#indexWord8ArrayAsWideChar#indexWord8ArrayAsAddr#indexWord8ArrayAsFloat#indexWord8ArrayAsDouble#indexWord8ArrayAsStablePtr#indexWord8ArrayAsInt16#indexWord8ArrayAsInt32#indexWord8ArrayAsInt64#indexWord8ArrayAsInt#indexWord8ArrayAsWord16#indexWord8ArrayAsWord32#indexWord8ArrayAsWord64#indexWord8ArrayAsWord#readCharArray#readWideCharArray# readIntArray#readWordArray#readAddrArray#readFloatArray#readDoubleArray#readStablePtrArray#readInt8Array#readInt16Array#readInt32Array#readInt64Array#readWord8Array#readWord16Array#readWord32Array#readWord64Array#readWord8ArrayAsChar#readWord8ArrayAsWideChar#readWord8ArrayAsAddr#readWord8ArrayAsFloat#readWord8ArrayAsDouble#readWord8ArrayAsStablePtr#readWord8ArrayAsInt16#readWord8ArrayAsInt32#readWord8ArrayAsInt64#readWord8ArrayAsInt#readWord8ArrayAsWord16#readWord8ArrayAsWord32#readWord8ArrayAsWord64#readWord8ArrayAsWord#writeCharArray#writeWideCharArray#writeIntArray#writeWordArray#writeAddrArray#writeFloatArray#writeDoubleArray#writeStablePtrArray#writeInt8Array#writeInt16Array#writeInt32Array#writeInt64Array#writeWord8Array#writeWord16Array#writeWord32Array#writeWord64Array#writeWord8ArrayAsChar#writeWord8ArrayAsWideChar#writeWord8ArrayAsAddr#writeWord8ArrayAsFloat#writeWord8ArrayAsDouble#writeWord8ArrayAsStablePtr#writeWord8ArrayAsInt16#writeWord8ArrayAsInt32#writeWord8ArrayAsInt64#writeWord8ArrayAsInt#writeWord8ArrayAsWord16#writeWord8ArrayAsWord32#writeWord8ArrayAsWord64#writeWord8ArrayAsWord#compareByteArrays#copyByteArray#copyMutableByteArray#copyByteArrayToAddr#copyMutableByteArrayToAddr#copyAddrToByteArray# setByteArray#atomicReadIntArray#atomicWriteIntArray# casIntArray#fetchAddIntArray#fetchSubIntArray#fetchAndIntArray#fetchNandIntArray#fetchOrIntArray#fetchXorIntArray#newArrayArray#sameMutableArrayArray#unsafeFreezeArrayArray#sizeofArrayArray#sizeofMutableArrayArray#indexByteArrayArray#indexArrayArrayArray#readByteArrayArray#readMutableByteArrayArray#readArrayArrayArray#readMutableArrayArrayArray#writeByteArrayArray#writeMutableByteArrayArray#writeArrayArrayArray#writeMutableArrayArrayArray#copyArrayArray#copyMutableArrayArray# plusAddr# minusAddr#remAddr# addr2Int# int2Addr#gtAddr#geAddr#eqAddr#neAddr#ltAddr#leAddr#indexCharOffAddr#indexWideCharOffAddr#indexIntOffAddr#indexWordOffAddr#indexAddrOffAddr#indexFloatOffAddr#indexDoubleOffAddr#indexStablePtrOffAddr#indexInt8OffAddr#indexInt16OffAddr#indexInt32OffAddr#indexInt64OffAddr#indexWord8OffAddr#indexWord16OffAddr#indexWord32OffAddr#indexWord64OffAddr#readCharOffAddr#readWideCharOffAddr#readIntOffAddr#readWordOffAddr#readAddrOffAddr#readFloatOffAddr#readDoubleOffAddr#readStablePtrOffAddr#readInt8OffAddr#readInt16OffAddr#readInt32OffAddr#readInt64OffAddr#readWord8OffAddr#readWord16OffAddr#readWord32OffAddr#readWord64OffAddr#writeCharOffAddr#writeWideCharOffAddr#writeIntOffAddr#writeWordOffAddr#writeAddrOffAddr#writeFloatOffAddr#writeDoubleOffAddr#writeStablePtrOffAddr#writeInt8OffAddr#writeInt16OffAddr#writeInt32OffAddr#writeInt64OffAddr#writeWord8OffAddr#writeWord16OffAddr#writeWord32OffAddr#writeWord64OffAddr# newMutVar# readMutVar# writeMutVar# sameMutVar#atomicModifyMutVar2#atomicModifyMutVar_# casMutVar#catch#raise# raiseDivZero#raiseUnderflow#raiseOverflow#raiseIO#maskAsyncExceptions#maskUninterruptible#unmaskAsyncExceptions#getMaskingState# atomically#retry# catchRetry# catchSTM#newTVar# readTVar# readTVarIO# writeTVar# sameTVar#newMVar# takeMVar# tryTakeMVar#putMVar# tryPutMVar# readMVar# tryReadMVar# sameMVar# isEmptyMVar#delay# waitRead# waitWrite#fork#forkOn# killThread#yield# myThreadId# labelThread#isCurrentThreadBound# noDuplicate# threadStatus#mkWeak#mkWeakNoFinalizer#addCFinalizerToWeak# deRefWeak# finalizeWeak#touch#makeStablePtr#deRefStablePtr# eqStablePtr#makeStableName# eqStableName#stableNameToInt# compactNew#compactResize#compactContains#compactContainsAny#compactGetFirstBlock#compactGetNextBlock#compactAllocateBlock#compactFixupPointers# compactAdd#compactAddWithSharing# compactSize#reallyUnsafePtrEquality#par#spark#seq# getSpark# numSparks# dataToTag# tagToEnum# addrToAny# anyToAddr# mkApUpd0#newBCO#unpackClosure# closureSize#getApStackVal# getCCSOf#getCurrentCCS# clearCCS# traceEvent#traceBinaryEvent# traceMarker#setThreadAllocationCounter#broadcastInt8X16#broadcastInt16X8#broadcastInt32X4#broadcastInt64X2#broadcastInt8X32#broadcastInt16X16#broadcastInt32X8#broadcastInt64X4#broadcastInt8X64#broadcastInt16X32#broadcastInt32X16#broadcastInt64X8#broadcastWord8X16#broadcastWord16X8#broadcastWord32X4#broadcastWord64X2#broadcastWord8X32#broadcastWord16X16#broadcastWord32X8#broadcastWord64X4#broadcastWord8X64#broadcastWord16X32#broadcastWord32X16#broadcastWord64X8#broadcastFloatX4#broadcastDoubleX2#broadcastFloatX8#broadcastDoubleX4#broadcastFloatX16#broadcastDoubleX8# packInt8X16# packInt16X8# packInt32X4# packInt64X2# packInt8X32# packInt16X16# packInt32X8# packInt64X4# packInt8X64# packInt16X32# packInt32X16# packInt64X8# packWord8X16# packWord16X8# packWord32X4# packWord64X2# packWord8X32#packWord16X16# packWord32X8# packWord64X4# packWord8X64#packWord16X32#packWord32X16# packWord64X8# packFloatX4# packDoubleX2# packFloatX8# packDoubleX4# packFloatX16# packDoubleX8#unpackInt8X16#unpackInt16X8#unpackInt32X4#unpackInt64X2#unpackInt8X32#unpackInt16X16#unpackInt32X8#unpackInt64X4#unpackInt8X64#unpackInt16X32#unpackInt32X16#unpackInt64X8#unpackWord8X16#unpackWord16X8#unpackWord32X4#unpackWord64X2#unpackWord8X32#unpackWord16X16#unpackWord32X8#unpackWord64X4#unpackWord8X64#unpackWord16X32#unpackWord32X16#unpackWord64X8#unpackFloatX4#unpackDoubleX2#unpackFloatX8#unpackDoubleX4#unpackFloatX16#unpackDoubleX8#insertInt8X16#insertInt16X8#insertInt32X4#insertInt64X2#insertInt8X32#insertInt16X16#insertInt32X8#insertInt64X4#insertInt8X64#insertInt16X32#insertInt32X16#insertInt64X8#insertWord8X16#insertWord16X8#insertWord32X4#insertWord64X2#insertWord8X32#insertWord16X16#insertWord32X8#insertWord64X4#insertWord8X64#insertWord16X32#insertWord32X16#insertWord64X8#insertFloatX4#insertDoubleX2#insertFloatX8#insertDoubleX4#insertFloatX16#insertDoubleX8# plusInt8X16# plusInt16X8# plusInt32X4# plusInt64X2# plusInt8X32# plusInt16X16# plusInt32X8# plusInt64X4# plusInt8X64# plusInt16X32# plusInt32X16# plusInt64X8# plusWord8X16# plusWord16X8# plusWord32X4# plusWord64X2# plusWord8X32#plusWord16X16# plusWord32X8# plusWord64X4# plusWord8X64#plusWord16X32#plusWord32X16# plusWord64X8# plusFloatX4# plusDoubleX2# plusFloatX8# plusDoubleX4# plusFloatX16# plusDoubleX8# minusInt8X16# minusInt16X8# minusInt32X4# minusInt64X2# minusInt8X32#minusInt16X16# minusInt32X8# minusInt64X4# minusInt8X64#minusInt16X32#minusInt32X16# minusInt64X8#minusWord8X16#minusWord16X8#minusWord32X4#minusWord64X2#minusWord8X32#minusWord16X16#minusWord32X8#minusWord64X4#minusWord8X64#minusWord16X32#minusWord32X16#minusWord64X8# minusFloatX4#minusDoubleX2# minusFloatX8#minusDoubleX4#minusFloatX16#minusDoubleX8# timesInt8X16# timesInt16X8# timesInt32X4# timesInt64X2# timesInt8X32#timesInt16X16# timesInt32X8# timesInt64X4# timesInt8X64#timesInt16X32#timesInt32X16# timesInt64X8#timesWord8X16#timesWord16X8#timesWord32X4#timesWord64X2#timesWord8X32#timesWord16X16#timesWord32X8#timesWord64X4#timesWord8X64#timesWord16X32#timesWord32X16#timesWord64X8# timesFloatX4#timesDoubleX2# timesFloatX8#timesDoubleX4#timesFloatX16#timesDoubleX8#divideFloatX4#divideDoubleX2#divideFloatX8#divideDoubleX4#divideFloatX16#divideDoubleX8# quotInt8X16# quotInt16X8# quotInt32X4# quotInt64X2# quotInt8X32# quotInt16X16# quotInt32X8# quotInt64X4# quotInt8X64# quotInt16X32# quotInt32X16# quotInt64X8# quotWord8X16# quotWord16X8# quotWord32X4# quotWord64X2# quotWord8X32#quotWord16X16# quotWord32X8# quotWord64X4# quotWord8X64#quotWord16X32#quotWord32X16# quotWord64X8# remInt8X16# remInt16X8# remInt32X4# remInt64X2# remInt8X32# remInt16X16# remInt32X8# remInt64X4# remInt8X64# remInt16X32# remInt32X16# remInt64X8# remWord8X16# remWord16X8# remWord32X4# remWord64X2# remWord8X32# remWord16X16# remWord32X8# remWord64X4# remWord8X64# remWord16X32# remWord32X16# remWord64X8#negateInt8X16#negateInt16X8#negateInt32X4#negateInt64X2#negateInt8X32#negateInt16X16#negateInt32X8#negateInt64X4#negateInt8X64#negateInt16X32#negateInt32X16#negateInt64X8#negateFloatX4#negateDoubleX2#negateFloatX8#negateDoubleX4#negateFloatX16#negateDoubleX8#indexInt8X16Array#indexInt16X8Array#indexInt32X4Array#indexInt64X2Array#indexInt8X32Array#indexInt16X16Array#indexInt32X8Array#indexInt64X4Array#indexInt8X64Array#indexInt16X32Array#indexInt32X16Array#indexInt64X8Array#indexWord8X16Array#indexWord16X8Array#indexWord32X4Array#indexWord64X2Array#indexWord8X32Array#indexWord16X16Array#indexWord32X8Array#indexWord64X4Array#indexWord8X64Array#indexWord16X32Array#indexWord32X16Array#indexWord64X8Array#indexFloatX4Array#indexDoubleX2Array#indexFloatX8Array#indexDoubleX4Array#indexFloatX16Array#indexDoubleX8Array#readInt8X16Array#readInt16X8Array#readInt32X4Array#readInt64X2Array#readInt8X32Array#readInt16X16Array#readInt32X8Array#readInt64X4Array#readInt8X64Array#readInt16X32Array#readInt32X16Array#readInt64X8Array#readWord8X16Array#readWord16X8Array#readWord32X4Array#readWord64X2Array#readWord8X32Array#readWord16X16Array#readWord32X8Array#readWord64X4Array#readWord8X64Array#readWord16X32Array#readWord32X16Array#readWord64X8Array#readFloatX4Array#readDoubleX2Array#readFloatX8Array#readDoubleX4Array#readFloatX16Array#readDoubleX8Array#writeInt8X16Array#writeInt16X8Array#writeInt32X4Array#writeInt64X2Array#writeInt8X32Array#writeInt16X16Array#writeInt32X8Array#writeInt64X4Array#writeInt8X64Array#writeInt16X32Array#writeInt32X16Array#writeInt64X8Array#writeWord8X16Array#writeWord16X8Array#writeWord32X4Array#writeWord64X2Array#writeWord8X32Array#writeWord16X16Array#writeWord32X8Array#writeWord64X4Array#writeWord8X64Array#writeWord16X32Array#writeWord32X16Array#writeWord64X8Array#writeFloatX4Array#writeDoubleX2Array#writeFloatX8Array#writeDoubleX4Array#writeFloatX16Array#writeDoubleX8Array#indexInt8X16OffAddr#indexInt16X8OffAddr#indexInt32X4OffAddr#indexInt64X2OffAddr#indexInt8X32OffAddr#indexInt16X16OffAddr#indexInt32X8OffAddr#indexInt64X4OffAddr#indexInt8X64OffAddr#indexInt16X32OffAddr#indexInt32X16OffAddr#indexInt64X8OffAddr#indexWord8X16OffAddr#indexWord16X8OffAddr#indexWord32X4OffAddr#indexWord64X2OffAddr#indexWord8X32OffAddr#indexWord16X16OffAddr#indexWord32X8OffAddr#indexWord64X4OffAddr#indexWord8X64OffAddr#indexWord16X32OffAddr#indexWord32X16OffAddr#indexWord64X8OffAddr#indexFloatX4OffAddr#indexDoubleX2OffAddr#indexFloatX8OffAddr#indexDoubleX4OffAddr#indexFloatX16OffAddr#indexDoubleX8OffAddr#readInt8X16OffAddr#readInt16X8OffAddr#readInt32X4OffAddr#readInt64X2OffAddr#readInt8X32OffAddr#readInt16X16OffAddr#readInt32X8OffAddr#readInt64X4OffAddr#readInt8X64OffAddr#readInt16X32OffAddr#readInt32X16OffAddr#readInt64X8OffAddr#readWord8X16OffAddr#readWord16X8OffAddr#readWord32X4OffAddr#readWord64X2OffAddr#readWord8X32OffAddr#readWord16X16OffAddr#readWord32X8OffAddr#readWord64X4OffAddr#readWord8X64OffAddr#readWord16X32OffAddr#readWord32X16OffAddr#readWord64X8OffAddr#readFloatX4OffAddr#readDoubleX2OffAddr#readFloatX8OffAddr#readDoubleX4OffAddr#readFloatX16OffAddr#readDoubleX8OffAddr#writeInt8X16OffAddr#writeInt16X8OffAddr#writeInt32X4OffAddr#writeInt64X2OffAddr#writeInt8X32OffAddr#writeInt16X16OffAddr#writeInt32X8OffAddr#writeInt64X4OffAddr#writeInt8X64OffAddr#writeInt16X32OffAddr#writeInt32X16OffAddr#writeInt64X8OffAddr#writeWord8X16OffAddr#writeWord16X8OffAddr#writeWord32X4OffAddr#writeWord64X2OffAddr#writeWord8X32OffAddr#writeWord16X16OffAddr#writeWord32X8OffAddr#writeWord64X4OffAddr#writeWord8X64OffAddr#writeWord16X32OffAddr#writeWord32X16OffAddr#writeWord64X8OffAddr#writeFloatX4OffAddr#writeDoubleX2OffAddr#writeFloatX8OffAddr#writeDoubleX4OffAddr#writeFloatX16OffAddr#writeDoubleX8OffAddr#indexInt8ArrayAsInt8X16#indexInt16ArrayAsInt16X8#indexInt32ArrayAsInt32X4#indexInt64ArrayAsInt64X2#indexInt8ArrayAsInt8X32#indexInt16ArrayAsInt16X16#indexInt32ArrayAsInt32X8#indexInt64ArrayAsInt64X4#indexInt8ArrayAsInt8X64#indexInt16ArrayAsInt16X32#indexInt32ArrayAsInt32X16#indexInt64ArrayAsInt64X8#indexWord8ArrayAsWord8X16#indexWord16ArrayAsWord16X8#indexWord32ArrayAsWord32X4#indexWord64ArrayAsWord64X2#indexWord8ArrayAsWord8X32#indexWord16ArrayAsWord16X16#indexWord32ArrayAsWord32X8#indexWord64ArrayAsWord64X4#indexWord8ArrayAsWord8X64#indexWord16ArrayAsWord16X32#indexWord32ArrayAsWord32X16#indexWord64ArrayAsWord64X8#indexFloatArrayAsFloatX4#indexDoubleArrayAsDoubleX2#indexFloatArrayAsFloatX8#indexDoubleArrayAsDoubleX4#indexFloatArrayAsFloatX16#indexDoubleArrayAsDoubleX8#readInt8ArrayAsInt8X16#readInt16ArrayAsInt16X8#readInt32ArrayAsInt32X4#readInt64ArrayAsInt64X2#readInt8ArrayAsInt8X32#readInt16ArrayAsInt16X16#readInt32ArrayAsInt32X8#readInt64ArrayAsInt64X4#readInt8ArrayAsInt8X64#readInt16ArrayAsInt16X32#readInt32ArrayAsInt32X16#readInt64ArrayAsInt64X8#readWord8ArrayAsWord8X16#readWord16ArrayAsWord16X8#readWord32ArrayAsWord32X4#readWord64ArrayAsWord64X2#readWord8ArrayAsWord8X32#readWord16ArrayAsWord16X16#readWord32ArrayAsWord32X8#readWord64ArrayAsWord64X4#readWord8ArrayAsWord8X64#readWord16ArrayAsWord16X32#readWord32ArrayAsWord32X16#readWord64ArrayAsWord64X8#readFloatArrayAsFloatX4#readDoubleArrayAsDoubleX2#readFloatArrayAsFloatX8#readDoubleArrayAsDoubleX4#readFloatArrayAsFloatX16#readDoubleArrayAsDoubleX8#writeInt8ArrayAsInt8X16#writeInt16ArrayAsInt16X8#writeInt32ArrayAsInt32X4#writeInt64ArrayAsInt64X2#writeInt8ArrayAsInt8X32#writeInt16ArrayAsInt16X16#writeInt32ArrayAsInt32X8#writeInt64ArrayAsInt64X4#writeInt8ArrayAsInt8X64#writeInt16ArrayAsInt16X32#writeInt32ArrayAsInt32X16#writeInt64ArrayAsInt64X8#writeWord8ArrayAsWord8X16#writeWord16ArrayAsWord16X8#writeWord32ArrayAsWord32X4#writeWord64ArrayAsWord64X2#writeWord8ArrayAsWord8X32#writeWord16ArrayAsWord16X16#writeWord32ArrayAsWord32X8#writeWord64ArrayAsWord64X4#writeWord8ArrayAsWord8X64#writeWord16ArrayAsWord16X32#writeWord32ArrayAsWord32X16#writeWord64ArrayAsWord64X8#writeFloatArrayAsFloatX4#writeDoubleArrayAsDoubleX2#writeFloatArrayAsFloatX8#writeDoubleArrayAsDoubleX4#writeFloatArrayAsFloatX16#writeDoubleArrayAsDoubleX8#indexInt8OffAddrAsInt8X16#indexInt16OffAddrAsInt16X8#indexInt32OffAddrAsInt32X4#indexInt64OffAddrAsInt64X2#indexInt8OffAddrAsInt8X32#indexInt16OffAddrAsInt16X16#indexInt32OffAddrAsInt32X8#indexInt64OffAddrAsInt64X4#indexInt8OffAddrAsInt8X64#indexInt16OffAddrAsInt16X32#indexInt32OffAddrAsInt32X16#indexInt64OffAddrAsInt64X8#indexWord8OffAddrAsWord8X16#indexWord16OffAddrAsWord16X8#indexWord32OffAddrAsWord32X4#indexWord64OffAddrAsWord64X2#indexWord8OffAddrAsWord8X32#indexWord16OffAddrAsWord16X16#indexWord32OffAddrAsWord32X8#indexWord64OffAddrAsWord64X4#indexWord8OffAddrAsWord8X64#indexWord16OffAddrAsWord16X32#indexWord32OffAddrAsWord32X16#indexWord64OffAddrAsWord64X8#indexFloatOffAddrAsFloatX4#indexDoubleOffAddrAsDoubleX2#indexFloatOffAddrAsFloatX8#indexDoubleOffAddrAsDoubleX4#indexFloatOffAddrAsFloatX16#indexDoubleOffAddrAsDoubleX8#readInt8OffAddrAsInt8X16#readInt16OffAddrAsInt16X8#readInt32OffAddrAsInt32X4#readInt64OffAddrAsInt64X2#readInt8OffAddrAsInt8X32#readInt16OffAddrAsInt16X16#readInt32OffAddrAsInt32X8#readInt64OffAddrAsInt64X4#readInt8OffAddrAsInt8X64#readInt16OffAddrAsInt16X32#readInt32OffAddrAsInt32X16#readInt64OffAddrAsInt64X8#readWord8OffAddrAsWord8X16#readWord16OffAddrAsWord16X8#readWord32OffAddrAsWord32X4#readWord64OffAddrAsWord64X2#readWord8OffAddrAsWord8X32#readWord16OffAddrAsWord16X16#readWord32OffAddrAsWord32X8#readWord64OffAddrAsWord64X4#readWord8OffAddrAsWord8X64#readWord16OffAddrAsWord16X32#readWord32OffAddrAsWord32X16#readWord64OffAddrAsWord64X8#readFloatOffAddrAsFloatX4#readDoubleOffAddrAsDoubleX2#readFloatOffAddrAsFloatX8#readDoubleOffAddrAsDoubleX4#readFloatOffAddrAsFloatX16#readDoubleOffAddrAsDoubleX8#writeInt8OffAddrAsInt8X16#writeInt16OffAddrAsInt16X8#writeInt32OffAddrAsInt32X4#writeInt64OffAddrAsInt64X2#writeInt8OffAddrAsInt8X32#writeInt16OffAddrAsInt16X16#writeInt32OffAddrAsInt32X8#writeInt64OffAddrAsInt64X4#writeInt8OffAddrAsInt8X64#writeInt16OffAddrAsInt16X32#writeInt32OffAddrAsInt32X16#writeInt64OffAddrAsInt64X8#writeWord8OffAddrAsWord8X16#writeWord16OffAddrAsWord16X8#writeWord32OffAddrAsWord32X4#writeWord64OffAddrAsWord64X2#writeWord8OffAddrAsWord8X32#writeWord16OffAddrAsWord16X16#writeWord32OffAddrAsWord32X8#writeWord64OffAddrAsWord64X4#writeWord8OffAddrAsWord8X64#writeWord16OffAddrAsWord16X32#writeWord32OffAddrAsWord32X16#writeWord64OffAddrAsWord64X8#writeFloatOffAddrAsFloatX4#writeDoubleOffAddrAsDoubleX2#writeFloatOffAddrAsFloatX8#writeDoubleOffAddrAsDoubleX4#writeFloatOffAddrAsFloatX16#writeDoubleOffAddrAsDoubleX8#prefetchByteArray3#prefetchMutableByteArray3#prefetchAddr3#prefetchValue3#prefetchByteArray2#prefetchMutableByteArray2#prefetchAddr2#prefetchValue2#prefetchByteArray1#prefetchMutableByteArray1#prefetchAddr1#prefetchValue1#prefetchByteArray0#prefetchMutableByteArray0#prefetchAddr0#prefetchValue0#not||&&leWordltWordgeWordgtWordleIntltIntgeIntgtIntneInteqInteqDoubleeqFloatneChareqCharneWordeqWord/=minmax><=< unpackNBytes#unpackAppendCString#isTrue#divZeroExceptionoverflowExceptionratioZeroDenomExceptionunderflowException mkUserErrormplusIO $fEqMaybe $fOrdMaybeNatJ#isValidNatural signumNatural negateNatural gcdNatural lcmNaturalquotRemNatural quotNatural remNatural andNatural orNatural xorNatural bitNaturaltestBitNaturalpopCountNatural shiftLNatural shiftRNaturalminusNaturalMaybe naturalToWord naturalToIntwordToNaturalBase wordToNaturalnaturalToWordMaybe powModNatural intToNatural $fEqNatural $fOrdNaturalstimesIdempotentMonoid srcLocPackage srcLocModule srcLocFilesrcLocStartLinesrcLocStartCol srcLocEndLine srcLocEndColEmptyCallStack PushCallStackFreezeCallStack HasCallStack getCallStackfromCallSiteListfreezeCallStack $fEqSrcLocerrorCallWithCallStackExceptionerrorCallExceptionerrorWithoutStackTrace undefined absentErrONonEmpty:|mzeromplus Alternativeempty<|>somemanyliftA2<*<$sconcatstimes<**>liftAliftA3=<<whenliftM2liftM3liftM4liftM5apmapFB unsafeChrordminIntmaxIntconst.flip$!untilasTypeOffailIOunIOgetTagquotIntremIntdivIntmodInt quotRemInt divModInt divModInt#shiftL#shiftRL#iShiftL# iShiftRA# iShiftRL# $fFunctor[]$fFunctorMaybe $fFunctor(,) $fFunctor->$fFunctor(,,,) $fFunctor(,,)$fApplicativeIO$fApplicative[]$fApplicativeMaybe$fApplicative-> $fMonadIO $fFunctorIO $fMonad[] $fMonadMaybe $fMonad->$fAlternativeIO$fAlternative[]$fAlternativeMaybe $fMonadPlusIO $fMonadPlus[]$fMonadPlusMaybe$fMonadNonEmpty$fApplicativeNonEmpty$fFunctorNonEmpty $fSemigroupIO$fSemigroupMaybe$fSemigroupOrdering$fSemigroup(,,,,)$fSemigroup(,,,)$fSemigroup(,,)$fSemigroup(,) $fSemigroup() $fSemigroup->$fSemigroupNonEmpty $fSemigroup[] $fMonoidIO $fMonad(,,,)$fApplicative(,,,) $fMonad(,,)$fApplicative(,,) $fMonad(,)$fApplicative(,) $fMonoidMaybe$fMonoidOrdering$fMonoid(,,,,) $fMonoid(,,,) $fMonoid(,,) $fMonoid(,) $fMonoid() $fMonoid-> $fMonoid[] $fEqNonEmpty $fOrdNonEmptycurrentCallStackstartProfTimer stopProfTimerabssignumsubtract $fNumNatural $fNumInteger $fNumWord$fNumInt newEmptyMVarnewMVartakeMVarreadMVarputMVar tryTakeMVar tryPutMVar tryReadMVar isEmptyMVaraddMVarFinalizer$fEqMVarunsafeDupablePerformIOunsafeInterleaveIOunsafeDupableInterleaveIO noDuplicateNoIO$fGHCiSandboxIOIO$fGHCiSandboxIONoIO $fMonadNoIO$fApplicativeNoIO $fFunctorNoIOproperFractionFloatInt floorFloatIntceilingFloatInt roundFloatIntproperFractionFloatIntegertruncateFloatIntegerfloorFloatIntegerceilingFloatIntegerroundFloatIntegerproperFractionDoubleIntfloorDoubleIntceilingDoubleIntroundDoubleIntproperFractionDoubleIntegertruncateDoubleIntegerfloorDoubleIntegerceilingDoubleIntegerroundDoubleInteger double2Int int2Double float2Int int2FloatelimZerosInteger elimZerosInt#Version makeVersioncurryswap<&>$>voidfixon&boolNotIf $fMonadFailIO $fMonadFail[]$fMonadFailMaybemaybeisJust isNothingfromJust fromMaybe maybeToList listToMaybe catMaybesmapMaybeheadunconstaillastinitnullfoldl'foldl1foldl1'sumproductscanlscanl1scanl'foldr1scanrscanr1maximumminimumiterateiterate'repeat replicate takeWhile dropWhiletakedropsplitAtspanbreakreverseandoranyallelemnotElemlookup concatMap!!zip3zipWith3unzipunzip3errorEmptyListshowListShowS showList__appPrecappPrec1showsshowChar showString showParen showSpaceshowCommaSpace showLitChar showLitStringshowMultiLineString protectEscasciiTab intToDigit showSignedInt $fShowKindRep $fShowNatural $fShowInteger$fShow(,,,,,,,,,,,,,,)$fShow(,,,,,,,,,,,,,)$fShow(,,,,,,,,,,,,)$fShow(,,,,,,,,,,,)$fShow(,,,,,,,,,,)$fShow(,,,,,,,,,)$fShow(,,,,,,,,)$fShow(,,,,,,,)$fShow(,,,,,,) $fShow(,,,,,) $fShow(,,,,) $fShow(,,,) $fShow(,,) $fShow(,)$fShowCallStack $fShowModule $fShowTrName $fShowTyCon $fShowWord $fShowInt $fShowChar$fShow[]$fShowTypeLitSort $fShowVecElem$fShowVecCount$fShowRuntimeRep $fShowSrcLoc$fShowNonEmpty $fShowMaybe$fShowOrdering $fShowBool$fShow()STretSTRepSTliftSTunsafeInterleaveSTunsafeDupableInterleaveSTrunST$fShowST $fMonoidST $fSemigroupST $fMonadFailST $fMonadST$fApplicativeST $fFunctorSTSTRefnewSTRef readSTRef writeSTRef $fEqSTRefchrsuccpredminBoundmaxBoundboundedEnumFromboundedEnumFromThen toEnumError fromEnumError succError predError $fBoundedWord $fBoundedInt $fBoundedChar $fEnumNatural $fEnumInteger $fEnumWord $fEnumInt $fEnumChar$fEnumOrdering $fEnumBool$fEnum() $fEnumVecElem$fBoundedVecElem$fEnumVecCount$fBoundedVecCount$fBoundedOrdering $fBoundedBool$fBounded(,,,,,,,,,,,,,,)$fBounded(,,,,,,,,,,,,,)$fBounded(,,,,,,,,,,,,)$fBounded(,,,,,,,,,,,)$fBounded(,,,,,,,,,,)$fBounded(,,,,,,,,,)$fBounded(,,,,,,,,)$fBounded(,,,,,,,)$fBounded(,,,,,,)$fBounded(,,,,,)$fBounded(,,,,)$fBounded(,,,) $fBounded(,,) $fBounded(,) $fBounded()properFractiontruncateroundceilingfloor/recipquotremdivmodquotRemdivMod divZeroErrorratioZeroDenominatorError overflowErrorunderflowError ratioPrec ratioPrec1infinity notANumberreduce% numerator denominatornumericEnumFromnumericEnumFromThennumericEnumFromTonumericEnumFromThenTo showSignedodd^^^%^^^%^^gcdlcmgcdInt'gcdWord'integralEnumFromintegralEnumFromThenintegralEnumFromTointegralEnumFromThenTo $fShowRatio $fRealNatural $fRealInteger $fRealRatio $fNumRatio $fOrdRatio$fIntegralNatural$fIntegralInteger$fIntegralWord $fRealWord $fIntegralInt $fRealInt$fFractionalRatio $fEnumRatio$fRealFracRatio $fEqRatiorangeindex unsafeIndexinRange rangeSizeunsafeRangeSize $fIx(,,,,) $fIx(,,,)$fIx(,,)$fIx(,)$fIx() $fIxOrdering$fIxBool $fIxNatural $fIxInteger$fIxWord$fIxInt$fIxCharSTArrayArray arrEleBottomarray unsafeArray unsafeArray'filldone listArray! safeRangeSizenegRange safeIndex lessSafeIndex badSafeIndexunsafeAtbounds numElementsindiceselems foldrElems foldlElems foldrElems' foldlElems' foldl1Elems foldr1Elemsassocs accumArrayunsafeAccumArrayunsafeAccumArray'adjust// unsafeReplaceaccum unsafeAccumamapixmapeqArraycmpArray cmpIntArray newSTArray boundsSTArraynumElementsSTArray readSTArrayunsafeReadSTArray writeSTArrayunsafeWriteSTArray freezeSTArrayunsafeFreezeSTArray thawSTArrayunsafeThawSTArray $fShowArray $fOrdArray $fEqArray$fFunctorArray $fEqSTArray FiniteBits finiteBitSizecountLeadingZeroscountTrailingZerosBits.&..|.xor complementshiftrotatezeroBitsbitsetBitclearBit complementBittestBit bitSizeMaybebitSizeisSignedshiftL unsafeShiftLshiftR unsafeShiftRrotateLrotateRpopCount bitDefaulttestBitDefaultpopCountDefaulttoIntegralSized $fBitsNatural $fBitsInteger $fBitsBool$fFiniteBitsWord $fBitsWord$fFiniteBitsInt $fBitsInt$fFiniteBitsBoolGeneralCategoryUppercaseLetterLowercaseLetterTitlecaseLetterModifierLetter OtherLetterNonSpacingMarkSpacingCombiningMark EnclosingMark DecimalNumber LetterNumber OtherNumberConnectorPunctuationDashPunctuationOpenPunctuationClosePunctuation InitialQuote FinalQuoteOtherPunctuation MathSymbolCurrencySymbolModifierSymbol OtherSymbolSpace LineSeparatorParagraphSeparatorFormat Surrogate PrivateUse NotAssignedwgencatunicodeVersiongeneralCategoryisAsciiisLatin1 isAsciiLower isAsciiUpperisSpaceisDigit isOctDigit isHexDigit isPunctuationisSymbol isAlphaNum isControlisPrintisUpperisLowertoLowertoUppertoTitle$fShowGeneralCategory$fEqGeneralCategory$fOrdGeneralCategory$fEnumGeneralCategory$fBoundedGeneralCategory$fIxGeneralCategoryWeakmkWeak deRefWeakfinalizerunFinalizerBatchW64#W32#W16#eqWord8neWord8gtWord8geWord8ltWord8leWord8eqWord16neWord16gtWord16geWord16ltWord16leWord16 byteSwap16eqWord32neWord32gtWord32geWord32ltWord32leWord32 byteSwap32eqWord64neWord64gtWord64geWord64ltWord64leWord64uncheckedShiftL64#uncheckedShiftRL64# byteSwap64 bitReverse8 bitReverse16 bitReverse32 bitReverse64$fFiniteBitsWord8 $fBitsWord8 $fIxWord8$fBoundedWord8$fIntegralWord8 $fEnumWord8 $fRealWord8 $fNumWord8 $fShowWord8 $fOrdWord8 $fEqWord8$fFiniteBitsWord16 $fBitsWord16 $fIxWord16$fBoundedWord16$fIntegralWord16 $fEnumWord16 $fRealWord16 $fNumWord16 $fShowWord16 $fOrdWord16 $fEqWord16 $fIxWord32$fBoundedWord32 $fRealWord32 $fShowWord32$fFiniteBitsWord32 $fBitsWord32$fIntegralWord32 $fEnumWord32 $fNumWord32 $fOrdWord32 $fEqWord32 $fIxWord64$fBoundedWord64 $fRealWord64 $fShowWord64$fFiniteBitsWord64 $fBitsWord64$fIntegralWord64 $fEnumWord64 $fNumWord64 $fOrdWord64 $fEqWord64FFFormat FFExponentFFFixed FFGeneric floatRadix floatDigits floatRange decodeFloat encodeFloatexponent significand scaleFloatisNaN isInfiniteisDenormalizedisNegativeZeroisIEEEatan2piexplogsqrt**logBasesincostanasinacosatansinhcoshtanhasinhacoshatanhlog1pexpm1log1pexplog1mexpstgDoubleToWord64stgWord64ToDoublestgFloatToWord32stgWord32ToFloatisDoubleFiniteisDoubleNegativeZeroisDoubleDenormalizedisDoubleInfinite isDoubleNaN isFloatFiniteisFloatNegativeZeroisFloatDenormalizedisFloatInfinite isFloatNaN showFloatformatRealFloatformatRealFloatAltroundTo floatToDigitsfromRatfromRat'minExptmaxExptexptexpts maxExpt10expts10integerLogBase fromRat'' plusFloat minusFloat timesFloat divideFloat negateFloatgtFloatgeFloatltFloatleFloatexpFloat expm1FloatlogFloat log1pFloat sqrtFloat fabsFloatsinFloatcosFloattanFloat asinFloat acosFloat atanFloat sinhFloat coshFloat tanhFloat asinhFloat acoshFloat atanhFloat powerFloat plusDouble minusDouble timesDouble divideDouble negateDoublegtDoublegeDoubleltDoubleleDouble double2Float float2Double expDouble expm1Double logDouble log1pDouble sqrtDouble fabsDouble sinDouble cosDouble tanDouble asinDouble acosDouble atanDouble sinhDouble coshDouble tanhDouble asinhDouble acoshDouble atanhDouble powerDouble word2Double word2FloatshowSignedFloatclampcastWord32ToFloatcastFloatToWord32castWord64ToDoublecastDoubleToWord64 $fEnumDouble $fEnumFloat $fShowDouble$fFractionalDouble $fRealDouble $fNumDouble $fShowFloat$fFractionalFloat $fRealFloat $fNumFloat$fFloatingDouble$fFloatingFloat$fRealFloatDouble$fRealFracDouble$fRealFloatFloat$fRealFracFloatReadPReadSgetlookpfail+++<++gathersatisfychareofstringmunchmunch1choice skipSpacescountbetweenoptionoptionalmany1skipMany skipMany1sepBysepBy1endByendBy1chainrchainlchainr1chainl1manyTill readP_to_S readS_to_P$fAlternativeP $fMonadFailP$fMonadP $fMonadPlusP$fApplicativeP$fMonadPlusReadP$fAlternativeReadP$fMonadFailReadP $fMonadReadP$fApplicativeReadP$fFunctorReadP $fFunctorPPrecReadPrecminPrecliftstepresetprec readPrec_to_P readP_to_Prec readPrec_to_S readS_to_Prec$fAlternativeReadPrec$fMonadPlusReadPrec$fMonadFailReadPrec$fMonadReadPrec$fApplicativeReadPrec$fFunctorReadPrecNumberLexemePuncIdentEOFnumberToInteger numberToFixednumberToRangedRationalnumberToRationallexexpecthsLex isSymbolCharlexCharreadIntPreadOctPreadDecPreadHexP $fEqLexeme $fShowLexeme $fEqNumber $fShowNumberreadListreadPrec readListPrec readParenreadListDefaultreadListPrecDefault lexLitChar readLitChar lexDigitslexPexpectPparenparenslistchoose readField readFieldHash readSymField readNumber$fRead(,,,,,,,,,,,,,,)$fRead(,,,,,,,,,,,,,)$fRead(,,,,,,,,,,,,)$fRead(,,,,,,,,,,,)$fRead(,,,,,,,,,,)$fRead(,,,,,,,,,)$fRead(,,,,,,,,)$fRead(,,,,,,,)$fRead(,,,,,,) $fRead(,,,,,) $fRead(,,,,) $fRead(,,,) $fRead(,,) $fRead(,)$fRead() $fReadRatio $fReadDouble $fReadFloat $fReadNatural $fReadInteger $fReadWord64 $fReadWord32 $fReadWord16 $fReadWord8 $fReadWord $fReadInt $fReadLexeme $fReadArray$fRead[] $fReadMaybe$fReadOrdering $fReadBool $fReadChar$fReadNonEmpty$fReadGeneralCategoryreadIntreadOctreadDecreadHex readFloat readSignedshowInt showEFloat showFFloat showGFloat showFFloatAlt showGFloatAlt showHFloat showIntAtBaseshowHexshowOctcastPtrplusPtralignPtrminusPtr nullFunPtr castFunPtrcastFunPtrToPtrcastPtrToFunPtr $fShowPtr $fShowFunPtr $fEqFunPtr $fOrdFunPtr$fEqPtr$fOrdPtr unpackCString packCString#$fShowFingerprint$fEqFingerprint$fOrdFingerprintfingerprintStringfingerprintFingerprintsI64#I32#I16#I8#eqInt8neInt8gtInt8geInt8ltInt8leInt8eqInt16neInt16gtInt16geInt16ltInt16leInt16eqInt32neInt32gtInt32geInt32ltInt32leInt32eqInt64neInt64gtInt64geInt64ltInt64leInt64uncheckedIShiftL64#uncheckedIShiftRA64#$fFiniteBitsInt8 $fBitsInt8 $fReadInt8$fIxInt8 $fBoundedInt8$fIntegralInt8 $fEnumInt8 $fRealInt8 $fNumInt8 $fShowInt8 $fOrdInt8$fEqInt8$fFiniteBitsInt16 $fBitsInt16 $fReadInt16 $fIxInt16$fBoundedInt16$fIntegralInt16 $fEnumInt16 $fRealInt16 $fNumInt16 $fShowInt16 $fOrdInt16 $fEqInt16 $fIxInt32$fBoundedInt32 $fRealInt32$fFiniteBitsInt32 $fBitsInt32 $fReadInt32$fIntegralInt32 $fEnumInt32 $fNumInt32 $fShowInt32 $fOrdInt32 $fEqInt32 $fIxInt64$fBoundedInt64 $fRealInt64$fFiniteBitsInt64 $fBitsInt64 $fReadInt64$fIntegralInt64 $fEnumInt64 $fNumInt64 $fShowInt64 $fOrdInt64 $fEqInt64IOModeReadMode WriteMode AppendMode ReadWriteMode $fEqIOMode $fOrdIOMode $fIxIOMode $fEnumIOMode $fReadIOMode $fShowIOModegetMonotonicTimeNSecgetMonotonicTime TestEquality testEquality:~~:HRefl:~:ReflsymtranscastWith gcastWithapplyinnerouter $fEnum:~: $fEnum:~~:$fTestEqualityk:~~:$fTestEqualityk:~: $fBounded:~~: $fRead:~~: $fOrd:~~: $fShow:~~:$fEq:~~: $fBounded:~: $fRead:~:$fOrd:~: $fShow:~:$fEq:~: TestCoercion testCoercionCoercion coerceWith gcoerceWithrepr$fEnumCoercion$fTestCoercionkCoercion$fTestCoercionk:~~:$fTestCoercionk:~:$fBoundedCoercion$fReadCoercion $fOrdCoercion$fShowCoercion $fEqCoercionCategory<<<$fCategorykCoercion$fCategoryk:~~:$fCategoryk:~:$fCategoryTYPE->KProxyProxy asProxyTypeOf$fMonadPlusProxy $fMonadProxy$fAlternativeProxy$fApplicativeProxy$fFunctorProxy $fMonoidProxy$fSemigroupProxy $fIxProxy $fEnumProxy $fShowProxy $fOrdProxy $fEqProxy$fBoundedProxy $fReadProxyeitherleftsrightspartitionEithersisLeftisRightfromLeft fromRight $fMonadEither$fApplicativeEither$fSemigroupEither$fFunctorEither $fEqEither $fOrdEither $fReadEither $fShowEitherreads readEitherread digitToIntisMarkisNumber isSeparator showListWithunsafeCoerceUnliftedunsafeCoerceAddrSomeNatnatValnatVal' someNatValsameNat $fReadSomeNat $fShowSomeNat $fOrdSomeNat $fEqSomeNat ErrorMessage SomeSymbol symbolVal symbolVal' someSymbolVal sameSymbol$fReadSomeSymbol$fShowSomeSymbol$fOrdSomeSymbol$fEqSomeSymbol freeStablePtrdeRefStablePtrcastStablePtrToPtrcastPtrToStablePtr $fEqStablePtrreadWideCharOffPtr readIntOffPtrreadWordOffPtr readPtrOffPtrreadFunPtrOffPtrreadFloatOffPtrreadDoubleOffPtrreadStablePtrOffPtrreadInt8OffPtrreadWord8OffPtrreadInt16OffPtrreadWord16OffPtrreadInt32OffPtrreadWord32OffPtrreadInt64OffPtrreadWord64OffPtrwriteWideCharOffPtrwriteIntOffPtrwriteWordOffPtrwritePtrOffPtrwriteFunPtrOffPtrwriteFloatOffPtrwriteDoubleOffPtrwriteStablePtrOffPtrwriteInt8OffPtrwriteWord8OffPtrwriteInt16OffPtrwriteWord16OffPtrwriteInt32OffPtrwriteWord32OffPtrwriteInt64OffPtrwriteWord64OffPtr alignment peekElemOff pokeElemOff peekByteOff pokeByteOffpeekpoke$fStorableFingerprint$fStorableRatio$fStorableInt64$fStorableInt32$fStorableInt16$fStorableInt8$fStorableWord64$fStorableWord32$fStorableWord16$fStorableWord8$fStorableDouble$fStorableFloat$fStorableStablePtr$fStorableFunPtr $fStorablePtr$fStorableWord $fStorableInt$fStorableChar$fStorableBool $fStorable()IntPtrWordPtr ptrToWordPtr wordPtrToPtr ptrToIntPtr intPtrToPtr $fEqIntPtr $fOrdIntPtr $fNumIntPtr $fEnumIntPtr$fStorableIntPtr $fRealIntPtr$fBoundedIntPtr$fIntegralIntPtr $fBitsIntPtr$fFiniteBitsIntPtr $fReadIntPtr $fShowIntPtr $fEqWordPtr $fOrdWordPtr $fNumWordPtr $fEnumWordPtr$fStorableWordPtr $fRealWordPtr$fBoundedWordPtr$fIntegralWordPtr $fBitsWordPtr$fFiniteBitsWordPtr $fReadWordPtr $fShowWordPtrCUIntMaxCIntMaxCUIntPtrCIntPtrCJmpBufCFposCFile CSUSeconds CUSecondsCTimeCClock CSigAtomicCWcharCSizeCPtrdiffCDoubleCFloatCBoolCULLongCLLongCULongCLongCUIntCIntCUShortCShortCUCharCSCharCChar $fEqCUIntMax $fOrdCUIntMax $fNumCUIntMax$fEnumCUIntMax$fStorableCUIntMax$fRealCUIntMax$fBoundedCUIntMax$fIntegralCUIntMax$fBitsCUIntMax$fFiniteBitsCUIntMax$fReadCUIntMax$fShowCUIntMax $fEqCIntMax $fOrdCIntMax $fNumCIntMax $fEnumCIntMax$fStorableCIntMax $fRealCIntMax$fBoundedCIntMax$fIntegralCIntMax $fBitsCIntMax$fFiniteBitsCIntMax $fReadCIntMax $fShowCIntMax $fEqCUIntPtr $fOrdCUIntPtr $fNumCUIntPtr$fEnumCUIntPtr$fStorableCUIntPtr$fRealCUIntPtr$fBoundedCUIntPtr$fIntegralCUIntPtr$fBitsCUIntPtr$fFiniteBitsCUIntPtr$fReadCUIntPtr$fShowCUIntPtr $fEqCIntPtr $fOrdCIntPtr $fNumCIntPtr $fEnumCIntPtr$fStorableCIntPtr $fRealCIntPtr$fBoundedCIntPtr$fIntegralCIntPtr $fBitsCIntPtr$fFiniteBitsCIntPtr $fReadCIntPtr $fShowCIntPtr$fEqCSUSeconds$fOrdCSUSeconds$fNumCSUSeconds$fEnumCSUSeconds$fStorableCSUSeconds$fRealCSUSeconds$fReadCSUSeconds$fShowCSUSeconds $fEqCUSeconds$fOrdCUSeconds$fNumCUSeconds$fEnumCUSeconds$fStorableCUSeconds$fRealCUSeconds$fReadCUSeconds$fShowCUSeconds $fEqCTime $fOrdCTime $fNumCTime $fEnumCTime$fStorableCTime $fRealCTime $fReadCTime $fShowCTime $fEqCClock $fOrdCClock $fNumCClock $fEnumCClock$fStorableCClock $fRealCClock $fReadCClock $fShowCClock$fEqCSigAtomic$fOrdCSigAtomic$fNumCSigAtomic$fEnumCSigAtomic$fStorableCSigAtomic$fRealCSigAtomic$fBoundedCSigAtomic$fIntegralCSigAtomic$fBitsCSigAtomic$fFiniteBitsCSigAtomic$fReadCSigAtomic$fShowCSigAtomic $fEqCWchar $fOrdCWchar $fNumCWchar $fEnumCWchar$fStorableCWchar $fRealCWchar$fBoundedCWchar$fIntegralCWchar $fBitsCWchar$fFiniteBitsCWchar $fReadCWchar $fShowCWchar $fEqCSize $fOrdCSize $fNumCSize $fEnumCSize$fStorableCSize $fRealCSize$fBoundedCSize$fIntegralCSize $fBitsCSize$fFiniteBitsCSize $fReadCSize $fShowCSize $fEqCPtrdiff $fOrdCPtrdiff $fNumCPtrdiff$fEnumCPtrdiff$fStorableCPtrdiff$fRealCPtrdiff$fBoundedCPtrdiff$fIntegralCPtrdiff$fBitsCPtrdiff$fFiniteBitsCPtrdiff$fReadCPtrdiff$fShowCPtrdiff $fEqCDouble $fOrdCDouble $fNumCDouble $fEnumCDouble$fStorableCDouble $fRealCDouble$fFractionalCDouble$fFloatingCDouble$fRealFracCDouble$fRealFloatCDouble $fReadCDouble $fShowCDouble $fEqCFloat $fOrdCFloat $fNumCFloat $fEnumCFloat$fStorableCFloat $fRealCFloat$fFractionalCFloat$fFloatingCFloat$fRealFracCFloat$fRealFloatCFloat $fReadCFloat $fShowCFloat $fEqCBool $fOrdCBool $fNumCBool $fEnumCBool$fStorableCBool $fRealCBool$fBoundedCBool$fIntegralCBool $fBitsCBool$fFiniteBitsCBool $fReadCBool $fShowCBool $fEqCULLong $fOrdCULLong $fNumCULLong $fEnumCULLong$fStorableCULLong $fRealCULLong$fBoundedCULLong$fIntegralCULLong $fBitsCULLong$fFiniteBitsCULLong $fReadCULLong $fShowCULLong $fEqCLLong $fOrdCLLong $fNumCLLong $fEnumCLLong$fStorableCLLong $fRealCLLong$fBoundedCLLong$fIntegralCLLong $fBitsCLLong$fFiniteBitsCLLong $fReadCLLong $fShowCLLong $fEqCULong $fOrdCULong $fNumCULong $fEnumCULong$fStorableCULong $fRealCULong$fBoundedCULong$fIntegralCULong $fBitsCULong$fFiniteBitsCULong $fReadCULong $fShowCULong $fEqCLong $fOrdCLong $fNumCLong $fEnumCLong$fStorableCLong $fRealCLong$fBoundedCLong$fIntegralCLong $fBitsCLong$fFiniteBitsCLong $fReadCLong $fShowCLong $fEqCUInt $fOrdCUInt $fNumCUInt $fEnumCUInt$fStorableCUInt $fRealCUInt$fBoundedCUInt$fIntegralCUInt $fBitsCUInt$fFiniteBitsCUInt $fReadCUInt $fShowCUInt$fEqCInt $fOrdCInt $fNumCInt $fEnumCInt$fStorableCInt $fRealCInt $fBoundedCInt$fIntegralCInt $fBitsCInt$fFiniteBitsCInt $fReadCInt $fShowCInt $fEqCUShort $fOrdCUShort $fNumCUShort $fEnumCUShort$fStorableCUShort $fRealCUShort$fBoundedCUShort$fIntegralCUShort $fBitsCUShort$fFiniteBitsCUShort $fReadCUShort $fShowCUShort $fEqCShort $fOrdCShort $fNumCShort $fEnumCShort$fStorableCShort $fRealCShort$fBoundedCShort$fIntegralCShort $fBitsCShort$fFiniteBitsCShort $fReadCShort $fShowCShort $fEqCUChar $fOrdCUChar $fNumCUChar $fEnumCUChar$fStorableCUChar $fRealCUChar$fBoundedCUChar$fIntegralCUChar $fBitsCUChar$fFiniteBitsCUChar $fReadCUChar $fShowCUChar $fEqCSChar $fOrdCSChar $fNumCSChar $fEnumCSChar$fStorableCSChar $fRealCSChar$fBoundedCSChar$fIntegralCSChar $fBitsCSChar$fFiniteBitsCSChar $fReadCSChar $fShowCSChar $fEqCChar $fOrdCChar $fNumCChar $fEnumCChar$fStorableCChar $fRealCChar$fBoundedCChar$fIntegralCChar $fBitsCChar$fFiniteBitsCChar $fReadCChar $fShowCCharDowngetDown comparing $fMonadDown$fApplicativeDown $fFunctorDown $fOrdDown $fShowDown $fReadDown$fEqDown $fNumDown$fSemigroupDown $fMonoidDown $fBitsDown $fBoundedDown $fEnumDown$fFiniteBitsDown$fFloatingDown$fFractionalDown$fIntegralDown$fIxDown $fRealDown$fRealFracDown$fRealFloatDown$fStorableDownMetafrom1to1fromtoselNameselSourceUnpackednessselSourceStrictnessselDecidedStrictnessDecidedStrictnessSourceStrictnessSourceUnpackedness AssociativityFixityIFixityPrefixInfixconName conFixity conIsRecord datatypeName moduleName packageName isNewtypeComp1unComp1L1R1unM1unK1unRec1unPar1uWord#uInt#uFloat#uDouble#uChar#uAddr#$fAlternative:.:$fApplicative:.: $fMonoid:*:$fSemigroup:*:$fMonadPlus:*: $fMonad:*:$fAlternative:*:$fApplicative:*:$fApplicativeK1 $fMonadRec1 $fMonadPar1$fApplicativePar1 $fMonoidU1 $fSemigroupU1 $fMonadPlusU1 $fMonadU1$fAlternativeU1$fApplicativeU1 $fFunctorU1$fShowU1$fOrdU1$fEqU1 $fSemigroupV1%$fSingIDecidedStrictnessDecidedUnpack%$fSingIDecidedStrictnessDecidedStrict#$fSingIDecidedStrictnessDecidedLazy#$fSingISourceStrictnessSourceStrict!$fSingISourceStrictnessSourceLazy)$fSingISourceStrictnessNoSourceStrictness%$fSingISourceUnpackednessSourceUnpack'$fSingISourceUnpackednessSourceNoUnpack-$fSingISourceUnpackednessNoSourceUnpackedness"$fSingIAssociativityNotAssociative$$fSingIAssociativityRightAssociative#$fSingIAssociativityLeftAssociative$fSingIFixityIInfixI$fSingIFixityIPrefixI$fSingIMaybeJust$fSingIMaybeNothing$fSingIBoolFalse$fSingIBoolTrue$fSingISymbola$fSingKindDecidedStrictness$fSingKindSourceStrictness$fSingKindSourceUnpackedness$fSingKindAssociativity$fSingKindFixityI$fSingKindMaybe$fSingKindBool$fSingKindSymbol$fSelectorMetaMetaSel$fConstructorMetaMetaCons$fDatatypeMetaMetaData$fEqM1$fOrdM1$fReadM1$fShowM1 $fFunctorM1 $fGenericM1 $fGeneric1kM1$fEqV1$fOrdV1$fReadV1$fShowV1 $fFunctorV1 $fGenericV1 $fGeneric1kV1 $fGenericU1 $fGeneric1kU1$fEqPar1 $fOrdPar1 $fReadPar1 $fShowPar1 $fFunctorPar1 $fGenericPar1$fGeneric1TYPEPar1$fEqRec1 $fOrdRec1 $fReadRec1 $fShowRec1 $fFunctorRec1 $fGenericRec1$fGeneric1kRec1$fEqK1$fOrdK1$fReadK1$fShowK1 $fFunctorK1 $fGenericK1 $fGeneric1kK1$fEq:+:$fOrd:+: $fRead:+: $fShow:+: $fFunctor:+: $fGeneric:+:$fGeneric1k:+:$fEq:*:$fOrd:*: $fRead:*: $fShow:*: $fFunctor:*: $fGeneric:*:$fGeneric1k:*:$fEq:.:$fOrd:.: $fRead:.: $fShow:.: $fFunctor:.: $fGeneric:.:$fGeneric1k:.:$fEqURec $fOrdURec $fShowURec $fFunctorURec $fGenericURec$fGeneric1kURec $fEqURec0 $fOrdURec0 $fShowURec0$fFunctorURec0$fGenericURec0$fGeneric1kURec0 $fEqURec1 $fOrdURec1 $fShowURec1$fFunctorURec1$fGenericURec1$fGeneric1kURec1 $fEqURec2 $fOrdURec2 $fShowURec2$fFunctorURec2$fGenericURec2$fGeneric1kURec2 $fEqURec3 $fOrdURec3 $fShowURec3$fFunctorURec3$fGenericURec3$fGeneric1kURec3 $fEqURec4 $fOrdURec4$fFunctorURec4$fGenericURec4$fGeneric1kURec4 $fEqFixity $fShowFixity $fOrdFixity $fReadFixity$fGenericFixity$fEqAssociativity$fShowAssociativity$fOrdAssociativity$fReadAssociativity$fEnumAssociativity$fBoundedAssociativity$fIxAssociativity$fGenericAssociativity$fEqSourceUnpackedness$fShowSourceUnpackedness$fOrdSourceUnpackedness$fReadSourceUnpackedness$fEnumSourceUnpackedness$fBoundedSourceUnpackedness$fIxSourceUnpackedness$fGenericSourceUnpackedness$fEqSourceStrictness$fShowSourceStrictness$fOrdSourceStrictness$fReadSourceStrictness$fEnumSourceStrictness$fBoundedSourceStrictness$fIxSourceStrictness$fGenericSourceStrictness$fEqDecidedStrictness$fShowDecidedStrictness$fOrdDecidedStrictness$fReadDecidedStrictness$fEnumDecidedStrictness$fBoundedDecidedStrictness$fIxDecidedStrictness$fGenericDecidedStrictness$fGeneric1TYPEDown$fGeneric1TYPE(,,,,,,)$fGeneric1TYPE(,,,,,)$fGeneric1TYPE(,,,,)$fGeneric1TYPE(,,,)$fGeneric1TYPE(,,)$fGeneric1TYPE(,)$fGeneric1kProxy$fGeneric1TYPEEither$fGeneric1TYPEMaybe$fGeneric1TYPENonEmpty$fGeneric1TYPE[]$fGenericFingerprint$fGenericGeneralCategory$fGenericSrcLoc $fGenericDown$fGeneric(,,,,,,)$fGeneric(,,,,,)$fGeneric(,,,,)$fGeneric(,,,) $fGeneric(,,) $fGeneric(,) $fGeneric()$fGenericProxy$fGenericOrdering $fGenericBool$fGenericEither$fGenericMaybe$fGenericNonEmpty $fGeneric[] $fMonoid:.:$fSemigroup:.: $fMonoidM1 $fSemigroupM1 $fMonadPlusM1 $fMonadM1$fAlternativeM1$fApplicativeM1 $fMonoidK1 $fSemigroupK1 $fMonoidRec1$fSemigroupRec1$fMonadPlusRec1$fAlternativeRec1$fApplicativeRec1 $fMonoidPar1$fSemigroupPar1$fReadU1AltgetAlt getProductgetSumgetAnyAllgetAllEndoappEndoDualgetDual stimesMonoidApgetApgetLastgetFirst $fMonoidFirst$fSemigroupFirst $fMonoidLast$fSemigroupLast$fNumAp $fBoundedAp $fMonoidAp $fSemigroupAp$fAlternativeAp$fApplicativeAp$fEnumAp$fEqAp $fFunctorAp $fGenericAp $fGeneric1kAp $fMonadAp $fMonadFailAp $fMonadPlusAp$fOrdAp$fReadAp$fShowAp$fEqLast $fOrdLast $fReadLast $fShowLast $fGenericLast$fGeneric1TYPELast $fFunctorLast$fApplicativeLast $fMonadLast $fEqFirst $fOrdFirst $fReadFirst $fShowFirst$fGenericFirst$fGeneric1TYPEFirst$fFunctorFirst$fApplicativeFirst $fMonadFirst dropWhileEnd stripPrefix elemIndex elemIndicesfind findIndex findIndices isPrefixOf isSuffixOf isInfixOfnubnubBydeletedeleteBy\\unionunionBy intersect intersectBy intersperse intercalate partition mapAccumL mapAccumRinsertinsertByzip4zip5zip6zip7zipWith4zipWith5zipWith6zipWith7unzip4unzip5unzip6unzip7deleteFirstsBygroupgroupByinitstails subsequences permutationssortsortOn singletonlinesunlineswordsunwordsfoldfoldMap'foldr'foldrMfoldlMasummsum $fFoldableU1 $fFoldableAp $fFoldableAlt$fFoldableLast$fFoldableFirst$fFoldableProduct $fFoldableSum$fFoldableDual$fFoldableProxy$fFoldableArray $fFoldable(,)$fFoldableEither$fFoldableNonEmpty $fFoldable[]$fFoldableMaybe$fFoldableDown$fFoldableURec$fFoldableURec0$fFoldableURec1$fFoldableURec2$fFoldableURec3$fFoldableURec4 $fFoldable:.: $fFoldable:*: $fFoldable:+: $fFoldableM1 $fFoldableK1$fFoldableRec1$fFoldablePar1 $fFoldableV1ConstgetConst$fApplicativeConst$fFunctorConst$fFoldableConst $fShowConst $fReadConst $fBitsConst$fBoundedConst $fEnumConst $fEqConst$fFiniteBitsConst$fFloatingConst$fFractionalConst$fGenericConst$fGeneric1kConst$fIntegralConst $fIxConst$fSemigroupConst $fMonoidConst $fNumConst $fOrdConst $fRealConst$fRealFracConst$fRealFloatConst$fStorableConstKindRepTypeLitCon'ConAppFun modulePackage tyConPackage tyConModule tyConNametyConFingerprint tyConKindArgs tyConKindRep rnfModulernfTyContypeRepFingerprint withTypeablesomeTypeRepTyCon typeRepTyCon eqTypeRep typeRepKindtypeReptypeOf someTypeRepsomeTypeRepFingerprint splitApps rnfTypeReprnfSomeTypeRepmkTyCon showsTypeRepcasteqTgcastgcast1gcast2 funResultTymkFunTy splitTyConApp typeRepArgstypeOf1typeOf2typeOf3typeOf4typeOf5typeOf6typeOf7LossOfPrecision DivideByZeroDenormalRatioZeroDenominator toException fromExceptiondisplayException$fExceptionSomeException$fShowSomeException$fShowArithException$fExceptionArithException$fEqArithException$fOrdArithException ErrorCallErrorCallWithLocation showCCSStack prettySrcLocprettyCallStackprettyCallStackLines$fShowErrorCall$fExceptionErrorCall $fEqErrorCall$fOrdErrorCallLockMode SharedLock ExclusiveLockFileLockingNotSupportedunsupportedOperation userError MaskingStateUnmaskedMaskedInterruptibleMaskedUninterruptibleFilePathioToST unsafeIOToST unsafeSTToIOcatchExceptioncatchAny unsafeUnmask interruptiblegetMaskingState onExceptionmask_uninterruptibleMask_uninterruptibleMaskfinallyevaluate$fEqMaskingState$fShowMaskingStateIORefnewIORef readIORef writeIORefatomicModifyIORef2LazyatomicModifyIORef2atomicModifyIORefPatomicModifyIORefLazy_atomicModifyIORef'_atomicSwapIORefatomicModifyIORef' $fEqIORefFinalizerEnvPtr FinalizerPtrForeignPtrContentsPlainForeignPtrFinalPtr MallocPtrPlainPtr Finalizers NoFinalizers CFinalizersHaskellFinalizersnewConcForeignPtrmallocForeignPtrmallocForeignPtrBytesmallocForeignPtrAlignedBytesmallocPlainForeignPtrmallocPlainForeignPtrBytes!mallocPlainForeignPtrAlignedBytesaddForeignPtrFinalizerEnvaddForeignPtrConcFinalizernewForeignPtr_unsafeForeignPtrToPtrcastForeignPtrplusForeignPtrfinalizeForeignPtr$fShowForeignPtr$fOrdForeignPtr$fEqForeignPtrnewForeignPtrEnvmallocForeignPtrArraymallocForeignPtrArray0 BufferState ReadBuffer WriteBuffer CharBufferBufferbufRawbufStatebufSizebufLbufR RawCharBuffer CharBufElem RawBuffer readWord8Buf writeWord8Buf peekCharBuf readCharBuf writeCharBufreadCharBufPtrwriteCharBufPtrcharSize withBuffer withRawBuffer isEmptyBuffer isFullBufferisFullCharBuffer isWriteBuffer bufferElemsbufferAvailable bufferRemove bufferAdjustL bufferAdd emptyBuffer newByteBuffer newCharBuffer newBuffer slideContents summaryBuffer checkBuffer$fEqBufferStateCodingProgressInputUnderflowOutputUnderflowInvalidSequencetextEncodingName mkTextDecoder mkTextEncoder TextEncoder TextDecoder EncodeBuffer DecodeBuffer CodeBuffer BufferCodecencoderecoverclosegetStatesetState$fShowTextEncoding$fEqCodingProgress$fShowCodingProgress mkWeakIORef modifyIORef modifyIORef'atomicWriteIORefIOArray newIOArrayunsafeReadIOArrayunsafeWriteIOArray readIOArray writeIOArray boundsIOArray $fEqIOArraygetLocaleEncodinggetFileSystemEncodinggetForeignEncodingSeekMode AbsoluteSeek RelativeSeek SeekFromEnd IODeviceType DirectoryStream RegularFile RawDeviceIODeviceready isTerminal isSeekableseektellgetSizesetSizesetEchogetEchosetRawdevTypedupdup2RawIOreadNonBlockingwritewriteNonBlocking $fEqSeekMode $fOrdSeekMode $fIxSeekMode$fEnumSeekMode$fReadSeekMode$fShowSeekMode$fEqIODeviceType BufferedIOfillReadBufferfillReadBuffer0emptyWriteBufferflushWriteBufferflushWriteBuffer0readBufreadBufNonBlockingwriteBufwriteBufNonBlocking NewlineModeinputNLoutputNLNewlineLFCRLF BufferMode NoBuffering LineBufferingBlockBuffering HandleType ClosedHandleSemiClosedHandle ReadHandle WriteHandle AppendHandleReadWriteHandle BufferList BufferListNilBufferListConsHandle__haDevicehaType haByteBuffer haBufferMode haLastDecode haCharBuffer haBuffers haEncoder haDecoderhaCodec haInputNL haOutputNL haOtherSide FileHandle DuplexHandleisReadableHandleTypeisWritableHandleTypeisReadWriteHandleTypecheckHandleInvariants nativeNewlineuniversalNewlineModenativeNewlineModenoNewlineTranslation showHandle$fShowHandleType $fShowHandle $fEqHandle$fEqNewlineMode$fOrdNewlineMode$fReadNewlineMode$fShowNewlineMode $fEqNewline $fOrdNewline $fReadNewline $fShowNewline$fEqBufferMode$fOrdBufferMode$fReadBufferMode$fShowBufferMode IOErrorType AlreadyExists NoSuchThing ResourceBusyResourceExhaustedIllegalOperationPermissionDenied UserErrorUnsatisfiedConstraints SystemError ProtocolError OtherErrorInvalidArgumentInappropriateType HardwareFaultUnsupportedOperation TimeExpiredResourceVanished Interrupted ioe_handleioe_type ioe_locationioe_description ioe_errno ioe_filenameExitCode ExitSuccess ExitFailureFixIOExceptionArrayExceptionIndexOutOfBoundsUndefinedElementAsyncException StackOverflow HeapOverflow ThreadKilled UserInterruptSomeAsyncExceptionCompactionFailedAllocationLimitExceededDeadlockBlockedIndefinitelyOnSTMblockedIndefinitelyOnMVarblockedIndefinitelyOnSTMallocationLimitExceededcannotCompactFunctioncannotCompactPinnedcannotCompactMutableasyncExceptionToExceptionasyncExceptionFromException stackOverflow heapOverflow ioExceptionioErroruntangle$fShowBlockedIndefinitelyOnMVar$$fExceptionBlockedIndefinitelyOnMVar$fShowBlockedIndefinitelyOnSTM#$fExceptionBlockedIndefinitelyOnSTM$fShowDeadlock$fExceptionDeadlock$fShowAllocationLimitExceeded"$fExceptionAllocationLimitExceeded$fShowCompactionFailed$fExceptionCompactionFailed$fShowAssertionFailed$fExceptionAssertionFailed$fExceptionSomeAsyncException$fShowSomeAsyncException$fShowAsyncException$fExceptionAsyncException$fShowArrayException$fExceptionArrayException$fShowFixIOException$fExceptionFixIOException$fExceptionExitCode$fShowIOErrorType$fEqIOErrorType$fShowIOException$fEqIOException$fExceptionIOException $fEqExitCode $fOrdExitCode$fReadExitCode$fShowExitCode$fGenericExitCode$fEqArrayException$fOrdArrayException$fEqAsyncException$fOrdAsyncExceptionCodingFailureModeErrorOnCodingFailureIgnoreCodingFailureTransliterateCodingFailureRoundtripFailurecodingFailureModeSuffix isSurrogate recoverDecode recoverEncode$fShowCodingFailureModemkUTF8utf8_bom mkUTF8_bomutf32mkUTF32 utf32_encode utf32_decodeutf32be mkUTF32beutf32le mkUTF32leutf32be_decodeutf32le_decodeutf32be_encodeutf32le_encodeutf16mkUTF16 utf16_encode utf16_decodeutf16be mkUTF16beutf16le mkUTF16leutf16be_decodeutf16le_decodeutf16be_encodeutf16le_encodelatin1mkLatin1latin1_checkedmkLatin1_checkedasciimkAscii latin1_decode ascii_decode latin1_encodelatin1_checked_encode ascii_encodethrowIfthrowIf_ throwIfNeg throwIfNeg_ throwIfNullcalloc mallocBytes callocBytes allocaBytesallocaBytesAlignedrealloc reallocBytesfromBooltoBoolmaybeNew maybeWith maybePeekwithMany copyBytes moveBytes fillBytes callocArray callocArray0 allocaArray allocaArray0 reallocArray reallocArray0 peekArray peekArray0 pokeArray pokeArray0newArray newArray0 withArray withArrayLen withArray0 withArrayLen0 copyArray moveArray lengthArray0 advancePtr peekCStringpeekCStringLen newCString newCStringLen withCStringwithCStringLenwithCStringsLencharIsRepresentable CWStringLenCWString CStringLencastCCharToCharcastCharToCCharcastCUCharToCharcastCharToCUCharcastCSCharToCharcastCharToCSChar peekCAStringpeekCAStringLen newCAStringnewCAStringLen withCAStringwithCAStringLen peekCWStringpeekCWStringLen newCWStringnewCWStringLen withCWStringwithCWStringLenunsafeLocalStateErrnoeOKe2BIGeACCES eADDRINUSE eADDRNOTAVAILeADV eAFNOSUPPORTeAGAINeALREADYeBADFeBADMSGeBADRPCeBUSYeCHILDeCOMM eCONNABORTED eCONNREFUSED eCONNRESETeDEADLK eDESTADDRREQeDIRTYeDOMeDQUOTeEXISTeFAULTeFBIGeFTYPE eHOSTDOWN eHOSTUNREACHeIDRMeILSEQ eINPROGRESSeINTReINVALeIOeISCONNeISDIReLOOPeMFILEeMLINKeMSGSIZE eMULTIHOP eNAMETOOLONGeNETDOWN eNETRESET eNETUNREACHeNFILEeNOBUFSeNODATAeNODEVeNOENTeNOEXECeNOLCKeNOLINKeNOMEMeNOMSGeNONET eNOPROTOOPTeNOSPCeNOSReNOSTReNOSYSeNOTBLKeNOTCONNeNOTDIR eNOTEMPTYeNOTSOCKeNOTSUPeNOTTYeNXIO eOPNOTSUPPePERM ePFNOSUPPORTePIPEePROCLIM ePROCUNAVAIL ePROGMISMATCH ePROGUNAVAILePROTOePROTONOSUPPORT ePROTOTYPEeRANGEeREMCHGeREMOTEeROFS eRPCMISMATCHeRREMOTE eSHUTDOWNeSOCKTNOSUPPORTeSPIPEeSRCHeSRMNTeSTALEeTIME eTIMEDOUT eTOOMANYREFSeTXTBSYeUSERS eWOULDBLOCKeXDEV isValidErrnogetErrno resetErrno throwErrno throwErrnoIf throwErrnoIf_throwErrnoIfRetrythrowErrnoIfRetryMayBlockthrowErrnoIfRetry_throwErrnoIfRetryMayBlock_throwErrnoIfMinus1throwErrnoIfMinus1_throwErrnoIfMinus1RetrythrowErrnoIfMinus1Retry_throwErrnoIfMinus1RetryMayBlock throwErrnoIfMinus1RetryMayBlock_throwErrnoIfNullthrowErrnoIfNullRetrythrowErrnoIfNullRetryMayBlockthrowErrnoPaththrowErrnoPathIfthrowErrnoPathIf_throwErrnoPathIfNullthrowErrnoPathIfMinus1throwErrnoPathIfMinus1_errnoToIOError $fEqErrnoPoolnewPoolfreePoolwithPool pooledMallocpooledMallocBytes pooledReallocpooledReallocBytespooledMallocArraypooledMallocArray0pooledReallocArraypooledReallocArray0 pooledNewpooledNewArraypooledNewArray0LimitProcessGroupID FileOffset ProcessIDFileModeFileIDDeviceID EpochTime ClockTick ByteCountGroupIDUserID LinkCountFdCNfdsCSocklenCTimerCKeyCId CFsFilCnt CFsBlkCntCClockIdCBlkCntCBlkSizeCRLimCTcflagCSpeedCCcCUidCNlinkCGidCSsizeCPidCOffCModeCInoCDev$fEqFd$fOrdFd$fNumFd$fEnumFd $fStorableFd$fRealFd $fBoundedFd $fIntegralFd$fBitsFd$fFiniteBitsFd$fReadFd$fShowFd $fEqCNfds $fOrdCNfds $fNumCNfds $fEnumCNfds$fStorableCNfds $fRealCNfds$fBoundedCNfds$fIntegralCNfds $fBitsCNfds$fFiniteBitsCNfds $fReadCNfds $fShowCNfds $fEqCSocklen $fOrdCSocklen $fNumCSocklen$fEnumCSocklen$fStorableCSocklen$fRealCSocklen$fBoundedCSocklen$fIntegralCSocklen$fBitsCSocklen$fFiniteBitsCSocklen$fReadCSocklen$fShowCSocklen $fEqCTimer $fOrdCTimer$fStorableCTimer $fShowCTimer$fEqCKey $fOrdCKey $fNumCKey $fEnumCKey$fStorableCKey $fRealCKey $fBoundedCKey$fIntegralCKey $fBitsCKey$fFiniteBitsCKey $fReadCKey $fShowCKey$fEqCId$fOrdCId$fNumCId $fEnumCId $fStorableCId $fRealCId $fBoundedCId $fIntegralCId $fBitsCId$fFiniteBitsCId $fReadCId $fShowCId $fEqCFsFilCnt$fOrdCFsFilCnt$fNumCFsFilCnt$fEnumCFsFilCnt$fStorableCFsFilCnt$fRealCFsFilCnt$fBoundedCFsFilCnt$fIntegralCFsFilCnt$fBitsCFsFilCnt$fFiniteBitsCFsFilCnt$fReadCFsFilCnt$fShowCFsFilCnt $fEqCFsBlkCnt$fOrdCFsBlkCnt$fNumCFsBlkCnt$fEnumCFsBlkCnt$fStorableCFsBlkCnt$fRealCFsBlkCnt$fBoundedCFsBlkCnt$fIntegralCFsBlkCnt$fBitsCFsBlkCnt$fFiniteBitsCFsBlkCnt$fReadCFsBlkCnt$fShowCFsBlkCnt $fEqCClockId $fOrdCClockId $fNumCClockId$fEnumCClockId$fStorableCClockId$fRealCClockId$fBoundedCClockId$fIntegralCClockId$fBitsCClockId$fFiniteBitsCClockId$fReadCClockId$fShowCClockId $fEqCBlkCnt $fOrdCBlkCnt $fNumCBlkCnt $fEnumCBlkCnt$fStorableCBlkCnt $fRealCBlkCnt$fBoundedCBlkCnt$fIntegralCBlkCnt $fBitsCBlkCnt$fFiniteBitsCBlkCnt $fReadCBlkCnt $fShowCBlkCnt $fEqCBlkSize $fOrdCBlkSize $fNumCBlkSize$fEnumCBlkSize$fStorableCBlkSize$fRealCBlkSize$fBoundedCBlkSize$fIntegralCBlkSize$fBitsCBlkSize$fFiniteBitsCBlkSize$fReadCBlkSize$fShowCBlkSize $fEqCRLim $fOrdCRLim $fNumCRLim $fEnumCRLim$fStorableCRLim $fRealCRLim$fBoundedCRLim$fIntegralCRLim $fBitsCRLim$fFiniteBitsCRLim $fReadCRLim $fShowCRLim $fEqCTcflag $fOrdCTcflag $fNumCTcflag $fEnumCTcflag$fStorableCTcflag $fRealCTcflag$fBoundedCTcflag$fIntegralCTcflag $fBitsCTcflag$fFiniteBitsCTcflag $fReadCTcflag $fShowCTcflag $fEqCSpeed $fOrdCSpeed $fNumCSpeed $fEnumCSpeed$fStorableCSpeed $fRealCSpeed $fReadCSpeed $fShowCSpeed$fEqCCc$fOrdCCc$fNumCCc $fEnumCCc $fStorableCCc $fRealCCc $fReadCCc $fShowCCc$fEqCUid $fOrdCUid $fNumCUid $fEnumCUid$fStorableCUid $fRealCUid $fBoundedCUid$fIntegralCUid $fBitsCUid$fFiniteBitsCUid $fReadCUid $fShowCUid $fEqCNlink $fOrdCNlink $fNumCNlink $fEnumCNlink$fStorableCNlink $fRealCNlink$fBoundedCNlink$fIntegralCNlink $fBitsCNlink$fFiniteBitsCNlink $fReadCNlink $fShowCNlink$fEqCGid $fOrdCGid $fNumCGid $fEnumCGid$fStorableCGid $fRealCGid $fBoundedCGid$fIntegralCGid $fBitsCGid$fFiniteBitsCGid $fReadCGid $fShowCGid $fEqCSsize $fOrdCSsize $fNumCSsize $fEnumCSsize$fStorableCSsize $fRealCSsize$fBoundedCSsize$fIntegralCSsize $fBitsCSsize$fFiniteBitsCSsize $fReadCSsize $fShowCSsize$fEqCPid $fOrdCPid $fNumCPid $fEnumCPid$fStorableCPid $fRealCPid $fBoundedCPid$fIntegralCPid $fBitsCPid$fFiniteBitsCPid $fReadCPid $fShowCPid$fEqCOff $fOrdCOff $fNumCOff $fEnumCOff$fStorableCOff $fRealCOff $fBoundedCOff$fIntegralCOff $fBitsCOff$fFiniteBitsCOff $fReadCOff $fShowCOff $fEqCMode $fOrdCMode $fNumCMode $fEnumCMode$fStorableCMode $fRealCMode$fBoundedCMode$fIntegralCMode $fBitsCMode$fFiniteBitsCMode $fReadCMode $fShowCMode$fEqCIno $fOrdCIno $fNumCIno $fEnumCIno$fStorableCIno $fRealCIno $fBoundedCIno$fIntegralCIno $fBitsCIno$fFiniteBitsCIno $fReadCIno $fShowCIno$fEqCDev $fOrdCDev $fNumCDev $fEnumCDev$fStorableCDev $fRealCDev $fBoundedCDev$fIntegralCDev $fBitsCDev$fFiniteBitsCDev $fReadCDev $fShowCDevLifetimeOneShot MultiShotEventevtReadevtWrite CFilePathFDCUtsnameCUtimbufCTmsCTmCTermiosCStatCSigset CSigactionCPasswdCLconvCGroupCFLocksEEK_ENDsEEK_SETsEEK_CURdEFAULT_BUFFER_SIZE c_s_issockptr_c_cc poke_c_lflagc_lflagsizeof_sigset_tsizeof_termiosconst_fd_cloexec const_f_setfd const_f_setfl const_f_getflconst_sig_setmaskconst_sig_block const_sigttou const_vtime const_vmin const_icanon const_tcsanow const_echost_inost_devst_modest_sizest_mtime sizeof_stat c_s_isfifo c_s_isdir c_s_isblk c_s_ischr c_s_isrego_BINARY o_NONBLOCKo_NOCTTYo_TRUNCo_EXCLo_CREATo_APPENDo_RDWRo_WRONLYo_RDONLY c_waitpid c_tcsetattr c_tcgetattr c_sigprocmask c_sigaddset c_sigemptysetc_mkfifoc_linkc_fork c_fcntl_lock c_fcntl_write c_fcntl_read c_ftruncatec_statc_getpidc_utimec_unlinkc_pipe c_safe_writec_writec_umask c_safe_readc_readc_isattyc_dup2c_dupc_creatc_closec_chmodc_accessc_lseeklstatc_fstat c_safe_openc_openset_saved_termiosget_saved_termiosputs fdFileSizefileTypefdStatfdType statGetTypeioe_unknownfiletype fdGetMode withFilePath newFilePath peekFilePathpeekFilePathLen setCooked tcSetAttrsetNonBlockingFDsetCloseOnExecs_isregs_ischrs_isblks_isdirs_isfifos_issockDynamicfromDyn fromDynamicdynApplydynApp dynTypeRep$fExceptionDynamic $fShowDynamicTVarPrimMVar ThreadStatus ThreadRunningThreadFinished ThreadBlocked ThreadDied BlockReason BlockedOnMVarBlockedOnBlackHoleBlockedOnException BlockedOnSTMBlockedOnForeignCallBlockedOnOtherThreadIdreportHeapOverflowgetAllocationCounterdisableAllocationLimitforkOnforkOnWithUnmasknumCapabilitiesgetNumCapabilitiessetNumCapabilitiesgetNumProcessors numSparks childHandler myThreadIdyield labelThreadpseqpar runSparks threadStatusthreadCapabilitymkWeakThreadIdnewStablePtrPrimMVar unsafeIOToSTMretryorElsethrowSTMcatchSTMnewTVar newTVarIO readTVarIOreadTVar writeTVarwithMVar modifyMVar_ sharedCAFreportStackOverflow reportErrorsetUncaughtExceptionHandlergetUncaughtExceptionHandler $fOrdThreadId $fEqThreadId$fShowThreadId$fMonadPlusSTM$fAlternativeSTM $fMonadSTM$fApplicativeSTM $fFunctorSTM$fEqTVar$fEqThreadStatus$fOrdThreadStatus$fShowThreadStatus$fEqBlockReason$fOrdBlockReason$fShowBlockReasonNestedAtomicallyNonTermination NoMethodError RecUpdError RecConError RecSelErrorPatternMatchFail catchJusthandle handleJust mapExceptiontryJustbracket_bracketOnErrornonTerminationnestedAtomically$fExceptionPatternMatchFail$fShowPatternMatchFail$fExceptionRecSelError$fShowRecSelError$fExceptionRecConError$fShowRecConError$fExceptionRecUpdError$fShowRecUpdError$fExceptionNoMethodError$fShowNoMethodError$fExceptionTypeError$fShowTypeError$fExceptionNonTermination$fShowNonTermination$fExceptionNestedAtomically$fShowNestedAtomically tryIOError mkIOErrorisAlreadyExistsError isUserErrorisResourceVanishedErroralreadyExistsErrorTypedoesNotExistErrorTypealreadyInUseErrorType fullErrorType eofErrorTypeillegalOperationErrorTypepermissionErrorType userErrorTyperesourceVanishedErrorTypeisAlreadyExistsErrorTypeisDoesNotExistErrorTypeisAlreadyInUseErrorTypeisFullErrorTypeisEOFErrorTypeisIllegalOperationErrorTypeisPermissionErrorTypeisUserErrorTypeisResourceVanishedErrorTypeioeGetErrorTypeioeGetErrorStringioeGetLocation ioeGetHandleioeGetFileNameioeSetErrorTypeioeSetErrorStringioeSetLocation ioeSetHandleioeSetFileName modifyIOErrorannotateIOError catchIOErrorfixSTHandlercatchesallowInterrupt$fFunctorHandler unsafeFixIOlocaleEncodingName iconvEncodingmkIconvEncodingsetLocaleEncodingsetFileSystemEncodingsetForeignEncodinginitLocaleEncoding argvEncodingchar8 CostCentreCostCentreStack getCurrentCCSgetCCSOfclearCCSccsCC ccsParentccLabelccModule ccSrcSpan ccsToStrings whoCreated renderStackerrorWithStackTrace popCallStackwithFrozenCallStackHandleFinalizer withHandle withHandle' withHandle_ withHandle_'withAllHandles__ withHandle__'augmentIOErrorwantWritableHandlewantReadableHandlewantReadableHandle_wantSeekableHandleioe_closedHandleioe_semiclosedHandleioe_EOFioe_notReadableioe_notWritableioe_finalizedHandle ioe_bufsizhandleFinalizerdEFAULT_CHAR_BUFFER_SIZE flushBufferflushCharBufferflushByteWriteBufferwriteCharBufferflushCharReadBufferflushByteReadBuffermkHandlemkDuplexHandleinitBufferStateopenTextEncodingcloseTextCodecs hClose_help hLookAhead_debugIOreadTextDevicereadTextDeviceNonBlocking decodeByteBuf getFullArgsswapMVarwithMVarMasked modifyMVarmodifyMVarMasked_modifyMVarMasked mkWeakMVar HandlerFunSignal setHandler runHandlersrunHandlersPtr TimerManagerTimeoutCallback TimeoutKeyregisterTimeoutunregisterTimeout updateTimeout EventManager IOCallbackFdKeykeyFd registerFd unregisterFd_ unregisterFdcloseFdgetSystemEventManagergetSystemTimerManagerensureIOManagerIsRunningioManagerCapabilitiesChangedthreadWaitReadthreadWaitWritethreadWaitReadSTMthreadWaitWriteSTM closeFdWith registerDelayfdFDfdIsNonBlockingmkFDreleasesetNonBlockingModereadRawBufferPtrreadRawBufferPtrNoBlockwriteRawBufferPtr$fBufferedIOFD $fIODeviceFD $fRawIOFD$fShowFDmemcpyhGetCharhGetLine hGetContents'hPutCharhPutStr hPutStrLn commitBuffer'hPutBufNonBlocking hGetBufSomehGetBufNonBlockingopenFileBlockingopenBinaryFile fdToHandle' fdToHandle handleToFdhLockhTryLockhUnlockHandlePosition HandlePosn hFileSize hSetFileSizehIsEOFisEOF hSetBuffering hSetEncoding hGetEncoding hFlushAllhGetPosnhSetPosnhTellhIsOpen hIsClosed hIsReadable hIsWritable hGetBuffering hIsSeekablehSetEchohGetEchohIsTerminalDevicehSetNewlineMode hDuplicate hDuplicateTohShow$fShowHandlePosn$fEqHandlePosnputCharputStrputStrLngetChargetLine getContents getContents'interactreadFile readFile' writeFile appendFilereadLnreadIOhReadyhPrintwithFilewithBinaryFile openTempFileopenBinaryTempFile"openTempFileWithDefaultPermissions(openBinaryTempFileWithDefaultPermissions fingerprint0fingerprintData getFileHash$fMonadFixDown $fMonadFix:*: $fMonadFixM1$fMonadFixRec1$fMonadFixPar1 $fMonadFixAp $fMonadFixAlt$fMonadFixLast$fMonadFixFirst$fMonadFixProduct $fMonadFixSum$fMonadFixDual $fMonadFixST$fMonadFixEither $fMonadFix-> $fMonadFixIO$fMonadFixNonEmpty $fMonadFix[]$fMonadFixMaybeIdentity runIdentity$fMonadFixIdentity$fMonadIdentity$fApplicativeIdentity$fFunctorIdentity$fFoldableIdentity$fShowIdentity$fReadIdentity$fBitsIdentity$fBoundedIdentity$fEnumIdentity $fEqIdentity$fFiniteBitsIdentity$fFloatingIdentity$fFractionalIdentity$fGenericIdentity$fGeneric1TYPEIdentity$fIntegralIdentity $fIxIdentity$fSemigroupIdentity$fMonoidIdentity $fNumIdentity $fOrdIdentity$fRealIdentity$fRealFracIdentity$fRealFloatIdentity$fStorableIdentity ArrowLoop ArrowMonad ArrowApply ArrowChoiceleftright ArrowPlus<+> ArrowZero zeroArrowKleisli runKleisliArrowsecond&&&returnA^>>>>^<<^^<<leftApp $fArrow->$fArrowKleisli$fCategoryTYPEKleisli$fMonadPlusKleisli$fMonadKleisli$fAlternativeKleisli$fApplicativeKleisli$fArrowZeroKleisli$fArrowPlusKleisli$fArrowChoiceKleisli$fArrowChoice->$fArrowApplyKleisli$fArrowApply->$fMonadPlusArrowMonad$fAlternativeArrowMonad$fMonadArrowMonad$fApplicativeArrowMonad$fFunctorArrowMonad$fArrowLoopKleisli $fArrowLoop->$fFunctorKleisli$fGeneric1TYPEKleisli$fGenericKleisliZipList getZipList WrappedArrow WrapArrow unwrapArrow WrappedMonad WrapMonad unwrapMonad$fAlternativeWrappedMonad$fApplicativeWrappedMonad$fFunctorWrappedMonad$fAlternativeWrappedArrow$fApplicativeWrappedArrow$fFunctorWrappedArrow$fAlternativeZipList$fApplicativeZipList $fShowZipList $fEqZipList $fOrdZipList $fReadZipList$fFunctorZipList$fFoldableZipList$fGenericZipList$fGeneric1TYPEZipList$fGenericWrappedArrow$fGeneric1TYPEWrappedArrow$fGenericWrappedMonad$fGeneric1TYPEWrappedMonad$fMonadWrappedMonad fmapDefaultfoldMapDefault$fTraversableU1$fTraversableZipList$fTraversableAp$fTraversableAlt$fTraversableLast$fTraversableFirst$fTraversableProduct$fTraversableSum$fTraversableDual$fTraversableConst$fTraversableProxy$fTraversableArray$fTraversable(,)$fTraversableEither$fTraversableNonEmpty$fTraversable[]$fTraversableMaybe$fTraversableDown$fTraversableURec$fTraversableURec0$fTraversableURec1$fTraversableURec2$fTraversableURec3$fTraversableURec4$fTraversable:.:$fTraversable:*:$fTraversable:+:$fTraversableM1$fTraversableK1$fTraversableRec1$fTraversablePar1$fTraversableV1$fTraversableIdentityisSubsequenceOftraceIO putTraceMsgtraceId traceShow traceShowIdtraceM traceShowM traceStack traceEvent traceEventIO traceMarker traceMarkerIO $fIsString[]$fIsStringIdentity$fIsStringConst versionBranch versionTags showVersion parseVersion $fOrdVersion $fEqVersion $fReadVersion $fShowVersion$fGenericVersionItem maxTupleSizethesortWithatomicModifyMutVar#resizeSmallMutableArray#$fIsListCallStack$fIsListVersion$fIsListNonEmpty$fIsListZipList $fIsList[]filterM>=><=<forever mapAndUnzipMzipWithM zipWithM_foldMfoldM_ replicateM replicateM_unless<$!>mfiltermkTrApp$fShow->ModifierParserFieldFormatter FormatParse fpModifiersfpCharfpRest FieldFormatfmtWidth fmtPrecision fmtAdjustfmtSign fmtAlternate fmtModifiersfmtChar FormatSignSignPlus SignSpaceFormatAdjustment LeftAdjustZeroPadIsChartoCharfromChar PrintfArg formatArg parseFormat HPrintfType PrintfTypeprintfhPrintfvFmt formatChar formatString formatInt formatIntegerperrorerrorBadFormaterrorShortFormaterrorMissingArgumenterrorBadArgument $fIsCharChar$fPrintfArgDouble$fPrintfArgFloat$fPrintfArgNatural$fPrintfArgInteger$fPrintfArgWord64$fPrintfArgWord32$fPrintfArgWord16$fPrintfArgWord8$fPrintfArgWord$fPrintfArgInt64$fPrintfArgInt32$fPrintfArgInt16$fPrintfArgInt8$fPrintfArgInt $fPrintfArg[]$fPrintfArgChar$fHPrintfType->$fHPrintfTypeIO$fPrintfType->$fPrintfTypeIO$fPrintfType[] mkWeakPtr addFinalizer mkWeakPairperformMinorGCperformMajorGC performGCcompilerVersionosarch compilerName exitFailure exitSuccessdiegetExecutablePath getProgNamewithArgs withProgNamegetEnvironment getEnvDefaultArgDescrNoArgReqArgOptArgOptDescrOptionArgOrder RequireOrderPermute ReturnInOrder usageInfogetOptgetOpt'$fFunctorArgOrder$fFunctorArgDescr$fFunctorOptDescrcpuTimePrecision getCPUTime spInfoUnitIdspInfoModuleName spInfoSrcLocIsStatic StaticKeydeRefStaticPtr staticKeyunsafeLookupStaticPtr staticPtrInfo staticPtrKeys$fIsStaticStaticPtr$fShowStaticPtrInfo StableNamemakeStableNamehashStableName eqStableName$fEqStableNamegetArgsWithResponseFiles unescapeArgs escapeArgsexpandResponsegetField fromLabeldisableBufferingflushAll evalWrapper ByteOrder BigEndian LittleEndiantargetByteOrder $fEqByteOrder$fOrdByteOrder$fBoundedByteOrder$fEnumByteOrder$fReadByteOrder$fShowByteOrder$fGenericByteOrderUnique newUnique hashUnique $fEqUnique $fOrdUnique modifySTRef modifySTRef'approxRationalstrictToLazySTlazyToStrictST $fMonadIOIORtsTime GCDetails gcdetails_gengcdetails_threadsgcdetails_allocated_bytesgcdetails_live_bytesgcdetails_large_objects_bytesgcdetails_compact_bytesgcdetails_slop_bytesgcdetails_mem_in_use_bytesgcdetails_copied_bytesgcdetails_par_max_copied_bytes#gcdetails_par_balanced_copied_bytesgcdetails_sync_elapsed_nsgcdetails_cpu_nsgcdetails_elapsed_ns"gcdetails_nonmoving_gc_sync_cpu_ns&gcdetails_nonmoving_gc_sync_elapsed_nsRTSStatsgcs major_gcsallocated_bytesmax_live_bytesmax_large_objects_bytesmax_compact_bytesmax_slop_bytesmax_mem_in_use_bytescumulative_live_bytes copied_bytespar_copied_bytescumulative_par_max_copied_bytes$cumulative_par_balanced_copied_bytes init_cpu_nsinit_elapsed_nsmutator_cpu_nsmutator_elapsed_ns gc_cpu_ns gc_elapsed_nscpu_ns elapsed_nsnonmoving_gc_sync_cpu_nsnonmoving_gc_sync_elapsed_ns nonmoving_gc_sync_max_elapsed_nsnonmoving_gc_cpu_nsnonmoving_gc_elapsed_nsnonmoving_gc_max_elapsed_nsgcgetRTSStatsEnabled getRTSStats$fReadRTSStats$fShowRTSStats$fGenericRTSStats$fReadGCDetails$fShowGCDetails$fGenericGCDetailsRTSFlagsgcFlagsconcurrentFlags miscFlags debugFlagscostCentreFlagsprofilingFlags traceFlags tickyFlagsparFlagsParFlags nCapabilitiesmigratemaxLocalSparks parGcEnabledparGcGenparGcLoadBalancingEnabledparGcLoadBalancingGenparGcNoSyncWithIdle parGcThreads setAffinity TickyFlagsshowTickyStats tickyFile TraceFlagstracing timestamptraceSchedulertraceGctraceNonmovingGc sparksSampled sparksFulluserDoTrace TraceNone TraceEventLog TraceStderr ProfFlags doHeapProfileheapProfileIntervalheapProfileIntervalTicks includeTSOsshowCCSOnExceptionmaxRetainerSetSize ccsLength modSelector descrSelector typeSelector ccSelector ccsSelectorretainerSelector bioSelector DoHeapProfileNoHeapProfiling HeapByCCS HeapByMod HeapByDescr HeapByTypeHeapByRetainer HeapByLDVHeapByClosureTypeCCFlags doCostCentres profilerTicks msecsPerTick DoCostCentresCostCentresNoneCostCentresSummaryCostCentresVerboseCostCentresAllCostCentresJSON DebugFlags scheduler interpreterweakgccafs nonmoving_gc block_allocsanitystableproflinkerstmsqueezehpcsparks MiscFlags tickIntervalinstallSignalHandlersinstallSEHHandlersgenerateCrashDumpFilegenerateStackTracemachineReadabledisableDelayedOsMemoryReturninternalCounterslinkerAlwaysPic linkerMemBase ConcFlagsctxtSwitchTimectxtSwitchTicksGCFlags statsFile giveStats maxStkSizeinitialStkSize stkChunkSizestkChunkBufferSize maxHeapSizeminAllocAreaSize largeAllocLimnurseryChunkSize minOldGenSizeheapSizeSuggestionheapSizeSuggestionAuto oldGenFactor pcFreeHeap generationssqueezeUpdFramescompactThresholdsweepringBellidleGCDelayTimedoIdleGCheapBaseallocLimitGracenumanumaMask GiveGCStats NoGCStatsCollectGCStatsOneLineGCStatsSummaryGCStatsVerboseGCStats getRTSFlags getGCFlags getParFlags getConcFlags getMiscFlags getDebugFlags getCCFlags getProfFlags getTraceFlags getTickyFlags$fEnumGiveGCStats$fEnumDoCostCentres$fEnumDoHeapProfile $fEnumDoTrace$fShowRTSFlags$fGenericRTSFlags$fShowParFlags$fGenericParFlags$fShowTickyFlags$fGenericTickyFlags$fShowTraceFlags$fGenericTraceFlags $fShowDoTrace$fGenericDoTrace$fShowProfFlags$fGenericProfFlags$fShowDoHeapProfile$fGenericDoHeapProfile $fShowCCFlags$fGenericCCFlags$fShowDoCostCentres$fGenericDoCostCentres$fShowDebugFlags$fGenericDebugFlags$fShowMiscFlags$fGenericMiscFlags$fShowConcFlags$fGenericConcFlags $fShowGCFlags$fGenericGCFlags$fShowGiveGCStats$fGenericGiveGCStats StackTraceLocation objectName functionNamesrcLoc sourceFile sourceLine sourceColumn stackDepth stackFramescollectStackTraceinvalidateDebugCacheshowStackFrames getStackTraceshowStackTraceunfoldnonEmpty<|conssome1 groupAllWithgroup1groupBy1 groupWith1 groupAllWith1MonadZipmzipWithmunzip$fMonadZipDown $fMonadZip:*: $fMonadZipM1$fMonadZipRec1$fMonadZipPar1 $fMonadZipU1$fMonadZipProxy $fMonadZipAlt$fMonadZipLast$fMonadZipFirst$fMonadZipMaybe$fMonadZipProduct $fMonadZipSum$fMonadZipDual$fMonadZipIdentity$fMonadZipNonEmpty $fMonadZip[]Show2liftShowsPrec2 liftShowList2Read2liftReadsPrec2 liftReadList2 liftReadPrec2liftReadListPrec2Ord2 liftCompare2Eq2liftEq2Show1 liftShowsPrec liftShowListRead1 liftReadsPrec liftReadList liftReadPrecliftReadListPrecOrd1 liftCompareEq1liftEqeq1compare1 readsPrec1 readPrec1liftReadListDefaultliftReadListPrecDefault showsPrec1eq2compare2 readsPrec2 readPrec2liftReadList2DefaultliftReadListPrec2Default showsPrec2 readsDatareadDatareadsUnaryWith readUnaryWithreadsBinaryWithreadBinaryWithshowsUnaryWithshowsBinaryWith readsUnary readsUnary1 readsBinary1 showsUnary showsUnary1 showsBinary1 $fEq1Down $fEq1Proxy $fEq1Identity $fEq1NonEmpty$fEq1[] $fEq1Maybe $fOrd1Down $fOrd1Proxy$fOrd1Identity$fOrd1NonEmpty$fOrd1[] $fOrd1Maybe $fRead1Down $fRead1Proxy$fRead1Identity$fRead1NonEmpty $fRead1[] $fRead1Maybe $fShow1Down $fShow1Proxy$fShow1Identity$fShow1NonEmpty $fShow1[] $fShow1Maybe $fEq1Const $fEq2Const $fEq1Either $fEq2Either$fEq1(,)$fEq2(,) $fOrd1Const $fOrd2Const $fOrd1Either $fOrd2Either $fOrd1(,) $fOrd2(,) $fRead1Const $fRead2Const $fRead1Either $fRead2Either $fRead1(,) $fRead2(,) $fShow1Const $fShow2Const $fShow1Either $fShow2Either $fShow1(,) $fShow2(,) $fBifunctorK1$fBifunctorConst$fBifunctorEither$fBifunctor(,,,,,,)$fBifunctor(,,,,,)$fBifunctor(,,,,)$fBifunctor(,,,)$fBifunctor(,,)$fBifunctor(,) Bifoldablebifold bifoldMapbifoldrbifoldlbifoldr'bifoldr1bifoldrMbifoldl'bifoldl1bifoldlM bitraverse_bifor_bimapM_biforM_ bisequenceA_ bisequence_biasumbimsumbiListbinullbilengthbielembiconcat bimaximum biminimumbisum biproduct biconcatMapbiandbiorbianybiall bimaximumBy biminimumBy binotElembifind$fBifoldableEither$fBifoldable(,,,,,,)$fBifoldable(,,,,,)$fBifoldable(,,,,)$fBifoldable(,,,)$fBifoldable(,,)$fBifoldableK1$fBifoldableConst$fBifoldable(,) Bitraversable bisequenceAbimapMbiforM bimapAccumL bimapAccumR bimapDefaultbifoldMapDefault$fBitraversableK1$fBitraversableConst$fBitraversableEither$fBitraversable(,,,,,,)$fBitraversable(,,,,,)$fBitraversable(,,,,)$fBitraversable(,,,)$fBitraversable(,,)$fBitraversable(,)runIO runIOFastExitrunNonIO topHandlertopHandlerFastExitflushStdHandlesQSemNnewQSemN waitQSemN signalQSemNQSemnewQSemwaitQSem signalQSemnewChan writeChanreadChandupChangetChanContentswriteList2Chan$fEqChanrtsSupportsBoundThreadsforkOSWithUnmaskisCurrentThreadBoundrunInBoundThreadrunInUnboundThreadTimeouttimeout$fExceptionTimeout $fShowTimeout $fEqTimeoutConIndex ConstrRep AlgConstr IntConstr FloatConstr CharConstrDataRepAlgRepCharRepNoRepConstrDataTypegfoldlgunfoldtoConstr dataTypeOf dataCast1 dataCast2gmapTgmapQlgmapQrgmapQgmapQigmapMgmapMpgmapMo fromConstr fromConstrB fromConstrM dataTypeName dataTypeRep constrType constrRep repConstr mkDataTypemkConstrdataTypeConstrs constrFields constrFixity showConstr readConstr isAlgType indexConstr constrIndexmaxConstrIndex mkIntType mkFloatType mkCharTypemkIntegralConstr mkRealConstr mkCharConstr mkNoRepType isNorepType tyconUQname tyconModule $fEqConstr $fShowConstr $fDataArray$fDataForeignPtr $fDataPtr$fData[] $fDataRatio $fDataWord64 $fDataWord32 $fDataWord16 $fDataWord8 $fDataWord $fDataInt64 $fDataInt32 $fDataInt16 $fDataInt8 $fDataNatural $fDataInteger $fDataInt $fDataDouble $fDataFloat $fDataChar$fShowDataType $fEqDataRep $fShowDataRep $fEqConstrRep$fShowConstrRep $fDataDown$fDataDecidedStrictness$fDataSourceStrictness$fDataSourceUnpackedness$fDataAssociativity $fDataFixity $fData:*:$fDataV1 $fData:.: $fData:+:$fDataM1$fDataK1 $fDataRec1 $fDataPar1$fDataU1$fDataAp $fDataAlt $fDataLast $fDataFirst $fDataProduct $fDataSum $fDataAny $fDataAll $fDataDual $fDataVersion $fDataConst$fDataIdentity$fDataCoercion $fData:~~: $fData:~: $fDataProxy $fDataWordPtr $fDataIntPtr$fData(,,,,,,) $fData(,,,,,) $fData(,,,,) $fData(,,,) $fData(,,) $fData(,)$fData() $fDataEither$fDataOrdering $fDataMaybe$fDataNonEmpty $fDataZipList$fDataWrappedMonad$fDataWrappedArrow $fDataBoolAnnotationWrapper getOption WrappedMonoid WrapMonoid unwrapMonoidArgMaxArgMinArgMaxgetMaxMingetMincycle1diff mtimesDefault$fNumMin $fMonadFixMin $fMonadMin$fApplicativeMin$fTraversableMin $fFoldableMin $fFunctorMin $fMonoidMin$fSemigroupMin $fEnumMin$fNumMax $fMonadFixMax $fMonadMax$fApplicativeMax$fTraversableMax $fFoldableMax $fFunctorMax $fMonoidMax$fSemigroupMax $fEnumMax$fBitraversableArg$fBifoldableArg$fBifunctorArg$fOrdArg$fEqArg$fTraversableArg $fFoldableArg $fFunctorArg $fEnumFirst $fEnumLast$fEnumWrappedMonoid$fMonoidWrappedMonoid$fSemigroupWrappedMonoid$fMonoidOption$fSemigroupOption$fTraversableOption$fFoldableOption$fMonadFixOption$fMonadPlusOption$fAlternativeOption $fMonadOption$fApplicativeOption$fFunctorOption $fEqOption $fOrdOption $fShowOption $fReadOption $fDataOption$fGenericOption$fGeneric1TYPEOption$fBoundedWrappedMonoid$fEqWrappedMonoid$fOrdWrappedMonoid$fShowWrappedMonoid$fReadWrappedMonoid$fDataWrappedMonoid$fGenericWrappedMonoid$fGeneric1TYPEWrappedMonoid $fBoundedLast$fBoundedFirst $fShowArg $fReadArg $fDataArg $fGenericArg$fGeneric1TYPEArg $fBoundedMax$fEqMax$fOrdMax $fShowMax $fReadMax $fDataMax $fGenericMax$fGeneric1TYPEMax $fBoundedMin$fEqMin$fOrdMin $fShowMin $fReadMin $fDataMin $fGenericMin$fGeneric1TYPEMinVoidabsurdvacuous$fSemigroupVoid$fExceptionVoid$fIxVoid$fEqVoid $fDataVoid $fGenericVoid $fOrdVoid $fReadVoid $fShowVoidInLInR $fFunctorSum $fShowSum $fReadSum$fOrdSum$fEqSum $fShow1Sum $fRead1Sum $fOrd1Sum$fEq1Sum $fGenericSum$fGeneric1kSumPair$fMonadPlusProduct$fMonadProduct$fAlternativeProduct$fApplicativeProduct$fFunctorProduct $fShowProduct $fReadProduct $fOrdProduct $fEqProduct$fShow1Product$fRead1Product $fOrd1Product $fEq1Product$fGenericProduct$fGeneric1kProduct getCompose$fTestEqualitykCompose$fAlternativeCompose$fApplicativeCompose$fTraversableCompose$fFoldableCompose$fFunctorCompose $fShowCompose $fReadCompose $fOrdCompose $fEqCompose$fShow1Compose$fRead1Compose $fOrd1Compose $fEq1Compose $fDataCompose$fGenericCompose$fGeneric1kComposeOpgetOp EquivalencegetEquivalence Comparison getComparison Predicate getPredicate Contravariant contramap>$phantom$<>$<>$$<defaultComparisondefaultEquivalencecomparisonEquivalence$fContravariantProxy$fContravariantCompose$fContravariantConst$fContravariantProduct$fContravariantSum$fContravariant:+:$fContravariant:.:$fContravariant:*:$fContravariantK1$fContravariantU1$fContravariantV1$fContravariantComparison$fContravariantEquivalence $fFloatingOp$fFractionalOp$fNumOp$fContravariantOp$fCategoryTYPEOp$fSemigroupPredicate$fMonoidPredicate$fContravariantPredicate $fSemigroupOp $fMonoidOp$fSemigroupEquivalence$fMonoidEquivalence$fSemigroupComparison$fMonoidComparison$fContravariantM1$fContravariantRec1$fContravariantAltPicoE12NanoE9MicroE6MilliE3CentiE2DeciE1UniE0 HasResolution resolutionFixedMkFixeddiv'divMod'mod' showFixed $fEnumFixed $fDataFixed $fReadFixed $fShowFixed$fRealFracFixed$fFractionalFixed $fRealFixed $fNumFixed$fHasResolutionNatn$fHasResolutionTYPEE0$fHasResolutionTYPEE1$fHasResolutionTYPEE2$fHasResolutionTYPEE3$fHasResolutionTYPEE6$fHasResolutionTYPEE9$fHasResolutionTYPEE12 $fEqFixed $fOrdFixedComplex:+realPartimagPart conjugatemkPolarcispolar magnitudephase$fMonadComplex$fApplicativeComplex$fStorableComplex$fFloatingComplex$fFractionalComplex $fNumComplex $fEqComplex $fShowComplex $fReadComplex $fDataComplex$fGenericComplex$fGeneric1TYPEComplex$fFunctorComplex$fFoldableComplex$fTraversableComplexbigNatToNaturalBigNat nullBigNatdivInt#modInt#IPipSPECSPEC2TrNameTrNameSTrNameD compareWord# compareWord compareInt# compareInt GHC.Prim.ExtgetThreadAllocationCounter#INT64WORD64KindBndr mkInteger smallInteger integerToWord integerToInt plusInteger timesInteger minusInteger negateInteger eqInteger# neqInteger# absInteger signumInteger leInteger# gtInteger# ltInteger# geInteger#compareInteger quotInteger remInteger divInteger modInteger divModIntegerquotRemIntegerfloatFromIntegerdoubleFromIntegerencodeFloatIntegerencodeDoubleInteger andInteger orInteger xorIntegercomplementInteger shiftLInteger shiftRInteger wordToIntegerdecodeDoubleInteger bitIntegertestBitIntegerpopCountInteger geInteger gtInteger ltInteger leInteger eqInteger neqInteger hashIntegerArrsize$fApplicativeStateL$fFunctorStateL$fApplicativeStateR$fFunctorStateRStateR runStateRStateL runStateL#. $fShowUnique $fNumUniqueasInt UniqueSource newSource unsafeAt# unsafeAtA isBitSubTypeIntPSQElemMaskfindMinunsafeInsertNewlink deleteMinalter binShrinkLBinNil binShrinkR deleteViewminViewatMostmergeEvaluekeyprioPSQKeyPrio isPuncCharSingKind DemoteRepfromSingSingIsingSingD:R:UReckWordp0D:R:UReckIntp0D:R:UReckFloatp0D:R:UReckDoublep0D:R:UReckCharp0D:R:UReckPtrp0 Rep1_Down Rep1_(,,,,,,) Rep1_(,,,,,) Rep1_(,,,,) Rep1_(,,,) Rep1_(,,)Rep1_(,) Rep1_Proxy Rep1_Either Rep1_Maybe Rep1_NonEmptyRep1_[]Rep_FingerprintRep_GeneralCategory Rep_SrcLocRep_Down Rep_(,,,,,,) Rep_(,,,,,) Rep_(,,,,) Rep_(,,,)Rep_(,,)Rep_(,)Rep_() Rep_Proxy Rep_OrderingRep_Bool Rep_Either Rep_Maybe Rep_NonEmptyRep_[]Rep_M1Rep1_M1Rep_V1Rep1_V1Rep_U1Rep1_U1Rep_Par1 Rep1_Par1Rep_Rec1 Rep1_Rec1Rep_K1Rep1_K1Rep_:+:Rep1_:+:Rep_:*:Rep1_:*:Rep_:.:Rep1_:.:Rep_R:UReckWordpRep1_R:UReckWordpRep_R:UReckIntpRep1_R:UReckIntpRep1_R:UReckFloatpRep_R:UReckDoublepRep1_R:UReckDoublepRep_R:UReckCharpRep1_R:UReckCharpRep_R:UReckPtrpRep1_R:UReckPtrp Rep_FixityRep_AssociativityRep_SourceUnpackednessRep_SourceStrictnessRep_DecidedStrictness $fMonadDual$fApplicativeDual $fFunctorDual $fMonoidDual$fSemigroupDual $fMonoidEndo$fSemigroupEndo $fMonoidAll$fSemigroupAll $fMonoidAny$fSemigroupAny $fMonadSum$fApplicativeSum $fMonoidSum$fSemigroupSum$fMonoidProduct$fSemigroupProduct $fMonoidAlt$fSemigroupAlt $fReadAlt $fShowAlt$fEqAlt$fOrdAlt$fNumAlt $fEnumAlt $fMonadAlt$fMonadPlusAlt$fApplicativeAlt$fAlternativeAlt $fFunctorAlt$fBoundedProduct $fNumProduct $fBoundedSum$fNumSum$fEqAny$fOrdAny $fReadAny $fShowAny $fBoundedAny$fEqAll$fOrdAll $fReadAll $fShowAll $fBoundedAll$fEqDual $fOrdDual $fReadDual $fShowDual $fBoundedDualRep_AltRep1_Alt Rep_Product Rep1_ProductRep_SumRep1_SumRep_AnyRep_AllRep_EndoRep_Dual Rep1_Dual stimesList stimesMaybe stimesDefaultRep_ApRep1_ApRep_Last Rep1_Last Rep_First Rep1_FirstnonEmptySubsequences Rep_Const Rep1_ConsttypeNatTypeReptypeSymbolTypeRepmkTrFunGiftTrAppTrFunmkTrAppCheckedisTYPEmkTyCon#typeLitTypeRep$fShowSomeTypeRep $fOrdTypeRep $fEqTypeRepmkTyConFingerprintmkTrTypetypeRep#$fShowFileLockingNotSupportedMyWeak insertWithIntTable updateWithcopycopy' firstPowerOf2 duplicatecapacity unsafeRead unsafeWrite unsafeLoadensureCapacityuseAsPtrsnocclearremoveAtlockImpl unlockImplunrepresentableCharpeekEncodedCStringwithEncodedCStringnewEncodedCStringBackend_bePoll _beModifyFd_beModifyFdOnce EventLifetimeevtClose elSupremummodifyFd modifyFdOncethrowErrnoIfMinus1NoRetry $fMonoidEvent$fSemigroupEvent $fShowEvent$fMonoidLifetime$fSemigroupLifetime$fMonoidEventLifetime$fSemigroupEventLifetime$fShowEventLifetime$fEqEventLifetime$fShowLifetime $fEqLifetime $fEqEventForevereventIs eventLifetime elLifetimeelEventbackendpoll available epollOneShot$fStorableEvent$fShowEventType $fEqEventType$fNumEventType$fBitsEventType$fFiniteBitsEventTypeinitFileSystemEncodinginitForeignEncodingrecoveringEncode$fStorablePollFd $fShowPollFd $fNumEvent $fBitsEvent$fFiniteBitsEvent controlIsDead newControl closeControl$fEqControlMessage$fShowControlMessage controlReadFdcontrolWriteFdControlMessage CMsgWakeupCMsgDie CMsgSignal wakeupReadFdreadControlMessage sendWakeupsendDie TimeoutEdit TimeoutQueueshutdown wakeManager $fEqState $fShowState$fEqTimeoutKey emControlnewDefaultBackendnewWithfinishedcleanup registerFd_closeFd_ onFdEvent $fEqFdKey $fShowFdKeyFdDatacallbackTableVar ioManagerLock eventManagerblockedOnBadFDFLockl_pidl_lenl_startl_whencel_typec_fcntlc_flock Rep_Identity Rep1_Identity Rep1_Kleisli Rep_Kleisli Rep_ZipList Rep1_ZipListRep_WrappedArrowRep1_WrappedArrowRep_WrappedMonadRep1_WrappedMonad Rep_VersionreadSymbolicLinkcClockToIntegercTimeToIntegercsuSecondsToIntegergetCpuTimePrecision withTimespec makeStatic Rep_ByteOrdernoDup Rep_RTSStats Rep_GCDetailspeekCStringOpt Rep_RTSFlags Rep_ParFlagsRep_TickyFlagsRep_TraceFlags Rep_DoTrace Rep_ProfFlagsRep_DoHeapProfile Rep_CCFlagsRep_DoCostCentresRep_DebugFlags Rep_MiscFlags Rep_ConcFlags Rep_GCFlagsRep_GiveGCStatsSessionAddrChunk chunksList peekLocation locationSize showLocationMpQrQi mkPrimType Rep_Option Rep1_OptionRep_WrappedMonoidRep1_WrappedMonoidRep_ArgRep1_ArgRep_MaxRep1_MaxRep_MinRep1_MinRep_Void Rep_Compose Rep1_Compose Rep_Complex Rep1_Complex