h, LU {9      !"#$%& '() *+, -./ 0 1 2 3 4 5 6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` a b!c"d#e#f$g%hijklmnopq&rstu'vwxy(z{ |})~*+,-...../00$11112345566667789+..........................%0 ! ++0#0////0/0///0000:";33<88!= 0000.................#;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>>;;66??  1111116666;;;;;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@AAABB>>>>>>2>>>>>>>>>>>>>>>>>>>>>>>        CCC    CDDDDEEEE<<FEEGGGG99    <HIIJ   333333333))))KKK))))KKKKKKKKK)))KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK)LLLLLLLLLLLLLLLLLL    MM?NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN&OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPOOPPPPPQQQ4QQRR4QQQQQQ**S**ST*S*STTTTTTTTTTTTTTTTTTTTTTTT6666666666666666666666666666666666666666666666666666666666666666666666666666666SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS                  &&&&&&&&&&&&&&&&&&&&&&                     &   & &                                                                                           &&&&&&&&&        ###%0UUUUVVVVVVVVVVVVVVVVVVVVVVVVVVVWXWWWX<<<<<YY    JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ[[[[[[[[[[[[[[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\((((((((]]&(]](]]]]]]((((]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]&&&&&&&&&&&&&&&&&&777777777^^^^^^______________________``_abaaaaaaaaab_b:::::====cc8888888888888888((((OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO1111111111111111111111111111111111111111111111111111111111111111111111111111111ddddddddddddddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeffffffffffffffffff5555555555555555555555555555gggggggggggggggggghhhhhhhhhhhhhhhhhhh////////////////////////000000000000000000000000000000000000000000000000000iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!j!!!!!!k!k!k!k"k"k"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7"7".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l$l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%l%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%,%,%,%,%,%,%,%,%,%,%,%,%,%,%,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&m&D&D&D&D&D&D&D&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'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'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n''+'+'+'+'+'+'+'+'+'+''''+'+''o'+'+'+'+'+'+'+'+'+''+'+'+''p'p'p'p'"'p'p'p'"'p'p'p'p'q'q'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'''''''("("("("((((((("(E(E("((((("("("("("("("("("("("(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(((((E(E(E(E(E(E(s(( (s((((((<(4(<(R(R(<((<(<((<(t((<((())<)<))<)<)u)v)u)u)u)v)v)v)v)v)v)u)v)w)w)x)x)x)x)x)x)x)x)x)w)x)x)w)w)x)x)x)x)w)w)x)w)w)x)w)y)w)w)w)x)x)x)w)w)w)w)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z)z){){){){){){){){){){){){){){){){){){){){){){){){){){*{*{*{*{*{*{*{*{*|*|*|*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*}*~*~*~*~*~*~*~*~*~*~*~*~*F*F*F*F*F*F*F*F*F*F*F*********************************F*F*F*F***********++++++++F++++++++++++++++++++++++++++++++++++u+u+u+u+u+++++++++++++++s+ + + + + + + + + + + + + + + + + + + + + + + + + + ++++++++++++++++++++++++++++ + + + + + +++ + + +, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--------------------------------------------------------------------------------------------------------------------------------................................................................................................................................////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111_1_1_1_11111_1_1_1_1_1_1_1_1_1_11_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_111_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_111111111111111111111111111111111111111111111111111s1s1s1s1s1s1s1s1s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2s2a2a2a2a2a2a2a2a2a2t2t2t2t2t2422222222222222222222222222222222222222222222222222222222|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2H2H2H2H2H2H2H3H3H3H3H3H3H33333333333333333333333333333333F33F33333F33333333F3F3F3F3F3F3F33F3F3F33F333333333333333333333333F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F333333344444444444444444444444444444444444444444444444444444444444444444-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-44444I4I4I4I4I4I4I4I4I4I4c5c5c5 5 5 5 55555555555555555555555555555555555555555555555555555q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q5q55555555555555555W5W55555555555555555555555555666666666666666!6!6!6!6!6!6!6!6!6!6!6!6!6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666677777777777777777777777777777 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'88888888888888888888888888888888888888888888888888888888888888899999999999999999999999999999999999999999999999999999(c) The University of Glasgowsee libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthy "(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableUnsafev55;"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy&Extract the first component of a pair.'Extract the second component of a pair.4Convert an uncurried function to a curried function.Examples curry fst 1 214 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]Swap the components of a pair.   TrustworthyNone !@NoneUsed to implement (+) for the Num2 typeclass. This gives the sum of two integers.ExampleplusInteger 3 25(+) 3 25Used to implement (-) for the Num9 typeclass. This gives the difference of two integers.ExampleminusInteger 3 21(-) 3 21Used to implement (*) for the Num6 typeclass. This gives the product of two integers.ExampletimesInteger 3 26(*) 3 26Used to implement negate for the Num typeclass. This changes the sign of whatever integer is passed into it.ExamplenegateInteger (-6)6 negate (-6)6Used to implement abs for the Num typeclass. This gives the absolute value of whatever integer is passed into it.ExampleabsInteger (-6)6abs (-6)6Used to implement signum for the Num typeclass. This gives 1 for a positive integer, and -1 for a negative integer.ExamplesignumInteger 51signum 51Used to implement divMod for the Integral/ typeclass. This gives a tuple equivalent to (div x y, mod x y)ExampledivModInteger 10 2(5,0) divMod 10 2(5,0)Used to implement div for the Integral typeclass. This performs integer division on its two parameters, truncated towards negative infinity.Example10 `divInteger` 25 10 `div` 2Used to implement mod for the Integral= typeclass. This performs the modulo operation, satisfying $((x `div` y) * y) + (x `mod` y) == xExample7 `modInteger` 31 7 `mod` 31Used to implement quotRem for the Integral/ typeclass. This gives a tuple equivalent to (quot x y, mod x y)ExamplequotRemInteger 10 2(5,0) quotRem 10 2(5,0)Used to implement quot for the Integral typeclass. This performs integer division on its two parameters, truncated towards zero.ExamplequotInteger 10 25 quot 10 25Used to implement rem for the Integral typeclass. This gives the remainder after integer division of its two parameters, satisfying %((x `quot` y) * y) + (x `rem` y) == xExampleremInteger 3 21rem 3 21Used to implement (==) for the Eq typeclass. Outputs ) if two integers are equal to each other.Example6 `eqInteger` 6True6 == 6TrueUsed to implement (/=) for the Eq typeclass. Outputs - if two integers are not equal to each other.Example6 `neqInteger` 7True6 /= 7TrueUsed to implement (<=) for the Ord typeclass. Outputs ; if the first argument is less than or equal to the second.Example3 `leInteger` 5True3 <= 5TrueUsed to implement (>) for the Ord typeclass. Outputs 2 if the first argument is greater than the second.Example5 `gtInteger` 3True5 > 3TrueUsed to implement (<) for the Ord typeclass. Outputs / if the first argument is less than the second.Example3 `ltInteger` 5True3 < 5TrueUsed to implement (>=) for the Ord typeclass. Outputs > if the first argument is greater than or equal to the second.Example5 `geInteger` 3True5 >= 3TrueUsed to implement compare for the Integral typeclass. This takes two integers, and outputs whether the first is less than, equal to, or greater than the second.ExamplecompareInteger 2 10LT compare 2 10LT++ANoneoB Safe-Inferred7The 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  type.basebase> Trustworthy(;  Construct  value from list of s.base6Test whether all internal invariants are satisfied by  valueThis operation is mostly useful for test-suites and/or code which constructs  values directly. Addition subtraction. May t .base subtraction. Returns s for non-positive results. multiplication Compute greatest common divisor.Compute least common multiple.base base base Construct  from  value.baseTry downcasting  to  value. Returns  if value doesn't fit in .base" b e m" computes base b raised to exponent e modulo m."$2(C) 2014 Herbert Valerio Riedel, (C) 2011 Edward Kmettsee libraries/base/LICENSElibraries@haskell.org provisionalportable Trustworthy{$(c) Adam Gundry 2015-2016see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthy03f7Selector function to extract the field from the record.0Constraint 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.ffC"(c) The University of Glasgow 2015see libraries/ghc-prim/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy/0 `base  The empty .abase  Push a call-site onto the stack.(This function has no effect on a frozen .bases are a lightweight method of obtaining a partial call-stack at any point in the program..A function can request its call-site with the ( constraint. For example, we can define 9putStrLnWithCallStack :: HasCallStack => 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  .:{8putStrLnWithCallStack :: 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 :... in interactive:Ghci... 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.Freeze the stack at the given  CallStack?, preventing any further call-sites from being pushed onto it.base Request 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 .base Freeze a call-stack, preventing any further call-sites from being appended.pushCallStack callSite (freezeCallStack callStack) = freezeCallStack callStackbase `a`aG((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthy018/ stops execution and displays an error message.base  A variant of % that does not produce a stack trace.A 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.Used for compiler-generated error message; encoding saves bytes of string junk.((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions)Unsafe 012'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. appends 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.Performance considerationsThis function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of 1 to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs , but not (xs ++ ys) ++ zs. For the same reason  =   [] has linear performance, while   [] is prone to quadratic slowdownExamples[1, 2, 3] ++ [4, 5, 6] [1,2,3,4,5,6][] ++ [1, 2, 3][1,2,3][3, 2, 1] ++ [][3,2,1]'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., 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)...)This  equality predicate is used when desugaring pattern-matches against strings. is defined as the value /. It helps to make guards more readable. eg. - f x | x < 0 = ... | otherwise = ... #If the first argument evaluates to 9, then the result is the second argument. Otherwise an $ 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.+\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, ...]this means that  map id == idExamplesmap (+1) [1, 2, 3][2,3,4]map id [1, 2, 3][1,2,3]map (\n -> 3 * n + 1) [1, 2, 3][4,7,10],, is the function application operator. Applying , to a function f and an argument x# gives the same result as applying f to x* directly. The definition is akin to this: (($) :: (a -> b) -> a -> b ($) f x = f x This is  specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is the same as (a -> b) -> a -> b.On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell.2The order of operations is very different between ($) and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent: *expr = min 5 1 + 5 expr = ((min 5) 1) + 5 ($) has precedence 0 (the lowest) and associates to the right, so these are equivalent: ,expr = min 5 $ 1 + 5 expr = (min 5) (1 + 5) ExamplesA common use cases of ($)0 is to avoid parentheses in complex expressions.For example, instead of using nested parentheses in the following Haskell function: -- | Sum numbers in a string: strSum "100 5 -7" == 98 strSum ::  ->  strSum s = sum (3 ( (words s)) 0we can deploy the function application operator: -- | Sum numbers in a string: strSum "100 5 -7" == 98 strSum ::  ->  strSum s = sum , 3 ( , words s ($) is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument 5 to a list of functions: applyFive :: [Int] applyFive = map ($ 5) [(+1), (2^)] >>> [6, 32] .Technical Remark (Representation Polymorphism)($) is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers: fastMod :: Int -> Int -> Int fastMod (I# x) (I# m) = I# $ remInt# x m @Sequentially 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 An alternative name for this function is 'bind', but some people may refer to it as 'flatMap', which results from it being equivialent to \x f -> j (B, f x) :: Monad m => m a -> (a -> m b) -> m b+which can be seen as mapping a value with Monad m => m a -> m (m b) and then 'flattening' m (m b) to m b using j.ASequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.'as A bs' can be understood as the do expression  do as bs or in terms of @ as as >>= const bsBB% is used to apply a function of type (a -> b) to a value of type f a4, where f is a functor, to produce a value of type f b. Note that for any type constructor with more than one parameter (e.g., Either6), only the last type parameter can be modified with B (e.g., b in `Either a b`).:Some type constructors with two parameters or more have a  instance that allows both the last and the penultimate parameters to be mapped over.ExamplesConvert from a  Int to a  Maybe String using :fmap show NothingNothingfmap show (Just 3)Just "3"Convert from an  Int Int to an Either Int String using :fmap show (Left 17)Left 17fmap show (Right 17) Right "17"Double each element of a list:fmap (*2) [1,2,3][2,4,6]Apply ! to the second element of a pair:fmap even (2,2)(2,True)It may seem surprising that the function is only applied to the last element of the tuple compared to the list example above which applies it to every element in the list. To understand, remember that tuples are type constructors with multiple type parameters: a tuple of 3 elements (a,b,c) can also be written  (,,) a b c and its Functor instance is defined for Functor ((,,) a b) (i.e., only the third parameter is free to be mapped over with fmap).It explains why fmap can be used with tuples containing values of different types as in the following example:fmap even ("hello", 1.0, 4)("hello",1.0,True)C [4,5,6] [1,2,3,4,5,6] Just [1, 2, 3] <> Just [4, 5, 6]Just [1,2,3,4,5,6]%putStr "Hello, " <> putStrLn "World!" Hello, World!] Identity of ^Examples"Hello world" <> mempty "Hello world"mempty <> [1, 2, 3][1,2,3]^An associative operationNOTE?: This method is redundant and has the default implementation ^ = (\) since  base-4.11.0.0,. Should it be implemented manually, since ^ is a synonym for (\), it is expected that the two functions are defined the same way. In a future GHC release ^ will be removed from ._Fold 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!"jThe 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 Examples&join [[1, 2, 3], [4, 5, 6], [7, 8, 9]][1,2,3,4,5,6,7,8,9]join (Just (Just 3))Just 3A 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.kSequential application.,A few functors support an implementation of k. that is more efficient than the default one.ExampleUsed in combination with , k can be used to build a record.>data MyState = MyState {arg1 :: Foo, arg2 :: Bar, arg3 :: Baz}$produceFoo :: Applicative f => f Foo$produceBar :: Applicative f => f Bar$produceBaz :: Applicative f => f Baz%mkState :: Applicative f => f MyState>mkState = MyState <$> produceFoo <*> produceBar <*> produceBazl Lift a value into the Structure.Examplespure 1 :: Maybe IntJust 1pure 'z' :: [Char]"z""pure (pure ":D") :: Maybe [String] Just [":D"]m=Sequence actions, discarding the value of the first argument.Examples9If used in conjunction with the Applicative instance for , you can chain Maybe computations, with a possible "early return" in case of .Just 2 *> Just 3Just 3Nothing *> Just 3NothingOf course a more interesting use case would be to have effectful computations instead of just returning pure values.import Data.Char0import GHC.Internal.Text.ParserCombinators.ReadP5let p = string "my name is " *> munch1 isAlpha <* eofreadP_to_S p "my name is Simon"[("Simon","")]tThe 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 identityC a @ k = k aRight identitym @ C = m Associativitym @ (\x -> k x @ h) = (m @ k) @ hFurthermore, the t and % operations should relate as follows: l = C m1 k m2 = m1 @ (\x1 -> m2 @ (\x2 -> C (x1 x2)))The above laws imply: B f xs = xs @ C . f (A) = (m) and that l and (k') satisfy the applicative functor laws.The instances of t for ,  and  defined in the Prelude satisfy these laws.vA 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: IdentityB  ==  CompositionB (f . g) == B f . B gNote, that the second law follows from the free theorem of the type B and the first law, so you need only check that the former condition holds. See these articles by  :https://www.schoolofhaskell.com/user/edwardk/snippets/fmapSchool of Haskell or  https://github.com/quchen/articles/blob/master/second_functor_law.mdDavid Luposchainsky for an explanation.3A 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 B 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 = C m1 k m2 = m1 @ (\x1 -> m2 @ (\x2 -> C (x1 x2))) (m) = (A)(which implies that l and k' satisfy the applicative functor laws).base The class of semigroups (types with an associative binary operation).'Instances should satisfy the following:  Associativityx \ (y \ z) = (x \ y) \ zYou can alternatively define  instead of (\), in which case the laws are: Unit (l x) = xMultiplication (j xss) =  (B  xss)The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following: Right identityx \ ] = x Left identity] \ x = x Associativityx \ (y \ z) = (x \ y) \ z ( law) Concatenation_ =  (\) ]You can alternatively define _ instead of ], in which case the laws are: Unit_ (l x) = xMultiplication_ (j xss) = _ (B _ xss)Subclass_ (toList xs) =  xsThe 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.  and .NOTE:  is a superclass of  since  base-4.11.0.0.& is an alias for a list of characters./String constants in Haskell are values of type 1. That means if you write a string literal like  "hello world", it will have the type [Char], which is the same as String.Note: You can ask the compiler to automatically infer different types with the -XOverloadedStrings# language extension, for example "hello world" :: Text. See  for more information.Because String is just a list of characters, you can use normal list functions to do basic string manipulation. See  Data.List for operations on lists.Performance considerations[Char] is a relatively memory-inefficient type. It is a linked list of boxed word-size characters, internally it looks something like: JJJJJJJJJJJJJJ JJJJJJJJJJJJJJ JJJJJJJJJJJJJJ JJJJJJ J (:) J J JJJ>J (:) J J JJJ>J (:) J J JJJ>J [] J JJJJJJJJJJJJJJ JJJJJJJJJJJJJJ JJJJJJJJJJJJJJ JJJJJJ v v v 'a' 'b' 'c'The String "abc" will use  5*3+1 = 16 (in general 5n+1) words of space in memory.Furthermore, operations like  (string concatenation) are O(n) (in the left argument).For historical reasons, the base library uses String in a lot of places for the conceptual simplicity, but library code dealing with user-data should use the  (https://hackage.haskell.org/package/texttext( package for Unicode text, or the the  .https://hackage.haskell.org/package/bytestring bytestring package for binary data.baseUninhabited data typebase %Non-empty (and non-strict) list type.,Monads that also support choice and failure.The identity of '. It should also satisfy the equations +mzero >>= f = mzero v >> mzero = mzeroThe default definition is mzero =  3An associative operation. The default definition is  mplus = () !A monoid on applicative functors. If defined,  and 1 should be the least solutions of the equations:  v = (:)  v k  v  v =  v  l []ExamplesNothing <|> Just 42Just 42[1, 2] <|> [3, 4] [1,2,3,4]empty <|> print (2^15)32768The identity of  )empty <|> a == a a <|> empty == aAn associative binary operation One or more.Examplessome (putStr "la"))lalalalalalalalala... * goes on forever * some Nothingnothingtake 5 <$> some (Just 1)* hangs forever *Note that this function can be used with Parsers based on Applicatives. In that case  some parser will attempt to parse parser" one or more times until it fails. Zero or more.Examplesmany (putStr "la"))lalalalalalalalala... * goes on forever * many NothingJust []take 5 <$> many (Just 1)* hangs forever *Note that this function can be used with Parsers based on Applicatives. In that case  many parser will attempt to parse parser# zero or more times until it fails."Lift a binary function to actions.+Some functors support an implementation of  that is more efficient than the default one. In particular, if B8 is an expensive operation, it is likely better to use  than to B! 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 B.ExampleliftA2 (,) (Just 3) (Just 5) Just (3,5)liftA2 (+) [1, 2, 3] [4, 5, 6][5,6,7,6,7,8,7,8,9]>Sequence actions, discarding the value of the second argument.Replace all locations in the input with the same value. The default definition is B . <, but this may be overridden with a more efficient version.ExamplesPerform a computation with 8 and replace the result with a constant value if it is : 'a' <$ Just 2Just 'a''a' <$ NothingNothingReduce a non-empty list with \The default definition should be sufficient, but this can be overridden for efficiency.Examples8For the following examples, we will assume that we have:)import Data.List.NonEmpty (NonEmpty (..))*sconcat $ "Hello" :| [" ", "Haskell", "!"]"Hello Haskell!"5sconcat $ Just [1, 2, 3] :| [Nothing, Just [4, 5, 6]]Just [1,2,3,4,5,6].sconcat $ Left 1 :| [Right 2, Left 3, Right 4]Right 2Repeat a value n times.The default definition will raise an exception for a multiplier that is <= 0. This may be overridden with an implementation that is total. For monoids it is preferred to use  stimesMonoid.By making this a member of the class, idempotent semigroups and monoids can upgrade this to execute in \mathcal{O}(1) by picking  stimes =  or  stimes =  respectively.Examples stimes 4 [1] [1,1,1,1]stimes 5 (putStr "hi!")hi!hi!hi!hi!hi!stimes 3 (Right ":)") Right ":)"baseSince  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:}5baseIf  is uninhabited then any v! that holds only values of type 6 is holding no values. It is implemented in terms of  fmap absurd. A variant of k< with the types of the arguments reversed. It differs from  k in that the effects are resolved in the order the arguments are presented.Examples (<**>) (print 1) (id <$ print 2)12$flip (<*>) (print 1) (id <$ print 2)211ZipList [4, 5, 6] <**> ZipList [(+1), (*2), (/3)]%ZipList {getZipList = [5.0,10.0,2.0]}5Lift a function to actions. Equivalent to Functor's B but implemented using only  's methods:  f a = l f k a1As such this function may be used to implement a v instance from an  one.Examples)Using the Applicative instance for Lists:liftA (+1) [1, 2][2,3] Or the Applicative instance for liftA (+1) (Just 3)Just 4#Lift a ternary function to actions.Same as @&, but with the arguments interchanged. as >>= f == f =<< asConditional execution of  expressions. For example,Examples !when debug (putStrLn "Debugging")will output the string  Debugging if the Boolean value debug is , and otherwise do nothing.*putStr "pi:" >> when False (print 3.14159)pi:Evaluate each action in the sequence from left to right, and collect the results. f is equivalent to  . + f.6Promote a function to a monad. This is equivalent to B but specialised to Monads.Promote a function to a monad, scanning the monadic arguments from left to right.ExamplesliftM2 (+) [0,1] [0,2] [0,2,1,3]liftM2 (+) (Just 1) NothingNothingliftM2 (+) (+ 3) (* 2) 518Promote a function to a monad, scanning the monadic arguments from left to right (cf. ).Promote a function to a monad, scanning the monadic arguments from left to right (cf. ).Promote a function to a monad, scanning the monadic arguments from left to right (cf. ).In many situations, the ' operations can be replaced by uses of &, which promotes function application. !return f `ap` x1 `ap` ... `ap` xnis equivalent to liftM f x1 x2 ... xnExamples?pure (\x y z -> x + y * z) `ap` Just 1 `ap` Just 5 `ap` Just 10Just 51The  method restricted to the type .Identity function. id x = xThis function might seem useless at first glance, but it can be very useful in a higher order context.Examples,length $ filter id [True, True, False, True]3Just (Just 3) >>= idJust 3foldr id 0 [(^3), (*5), (+2)]1000 const x y always evaluates to x, ignoring its second argument. const x = \_ -> xThis function might seem useless at first glance, but it can be very useful in a higher order context.Examplesconst 42 "hello"42map (const 42) [0..3] [42,42,42,42]#Right to left function composition.(f . g) x = f (g x)f . id = f = id . fExamples(map ((*2) . length) [[], [0, 1, 2], [0]][0,6,2]!foldr (.) id [(+1), (*3), (^3)] 225(let (...) = (.).(.) in ((*2)...(+)) 5 1030 f9 takes its (first) two arguments in the reverse order of f.flip f x y = f y xflip . flip = idExamplesflip (++) "hello" "world" "worldhello"'let (.>) = flip (.) in (+1) .> show $ 5"6"Strict (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. p f yields the result of applying f until p holds.! 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.Returns the tag of a constructor application; this function was once used by the deriving code for Eq, Ord and Enum.Used to implement  for the s typeclass. This performs integer division on its two parameters, truncated towards zero.Example quotInt 10 25 quot 10 25Used to implement  for the s typeclass. This gives the remainder after integer division of its two parameters, satisfying %((x `quot` y) * y) + (x `rem` y) == xExample remInt 3 21rem 3 21Used to implement  for the s typeclass. This performs integer division on its two parameters, truncated towards negative infinity.Example 10 `divInt` 25 10 `div` 25Used to implement  for the s= typeclass. This performs the modulo operation, satisfying $((x `div` y) * y) + (x `mod` y) == xExample 7 `modInt` 31 7 `mod` 31Used to implement  for the s/ typeclass. This gives a tuple equivalent to (quot x y, mod x y)ExamplequotRemInt 10 2(5,0) quotRem 10 2(5,0)Used to implement  for the s/ typeclass. This gives a tuple equivalent to (div x y, mod x y)ExampledivModInt 10 2(5,0) divMod 10 2(5,0)This function is used to implement branchless shifts. If the number of bits to shift is greater than or equal to the type size in bits, then the shift must return 0. Instead of doing a test, we use a mask obtained via this function which is branchless too.shift_mask m b | b < m = 0xFF..FF | otherwise = 0Shift the argument left by the specified number of bits (which must be non-negative).Shift 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#)Shift the argument left by the specified number of bits (which must be non-negative).Shift 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)Shift 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)basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase Takes the first non-throwing  action's result.  throws an exception.base>Combines lists by concatenation, starting from the empty list.basePicks the leftmost  value, or, alternatively, .base Takes the first non-throwing  action's result.  throws an exception.base>Combines lists by concatenation, starting from the empty list.basePicks the leftmost  value, or, alternatively, .base base base base base base base base base base basebase base base base base base basebasebasebasebase 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 .basebasebasebasebasebasebasebasebasebase base basebase , j+$99*(9%.'  5                       !                     Y                                     "                               mklvBtA@C^_]\p=x>     tA@C vBj]_^,kml\+$p=x>  "!Y5 ,@A\km  TrustworthyQ5baseStop heap profiling.Note: This won't do anything unless you also specify a profiling mode on the command line using the normal RTS options.5baseStart heap profiling. This is called normally by the RTS on start-up, but can be disabled using the rts flag --no-automatic-heap-samples.Note: This won't do anything unless you also specify a profiling mode on the command line using the normal RTS options.5baseRequest a heap census on the next context switch. The census can be requested whether or not the heap profiling timer is running.Note: This won't do anything unless you also specify a profiling mode on the command line using the normal RTS options.5baseStart attributing ticks to cost centres. This is called by the RTS on startup but can be disabled using the rts flag --no-automatic-time-samples.5baseStop attributing ticks to cost centres. Allocations will still be attributed.5555555555(c) Adam Gundry 2015-2016see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions)None 1R5F5F'(c) The University of Glasgow 1994-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy[i 6Conversion from an . An integer literal represents the application of the function 6" to the appropriate value of type , so such literals have type (w a) => a.?Unary negation.wBasic 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 + x6 0 is the additive identityx + fromInteger 0 = x? gives the additive inverse x + negate x =  fromInteger 0Associativity of () (x * y) * z =  x * (y * z)6 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)Coherence with  toIntegerif the type also implements , then 6 is a left inverse for , i.e. fromInteger (toInteger i) == i 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  do.Absolute value.!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). the same as  (7).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.basebasebase999999999999999999999999999999999999999999999999999999999999999999999999:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::w76?:::::w76?7'(c) The University of Glasgow 1994-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafem!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!/WARNING: If you're looking for "a way to get a  from an 'IO String'", then 8 is not the way to go. Learn about do-notation and the <-# syntax element before you proceed.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 t cannot be used safely within . 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 . 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.Ensures 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."(c) The University of Glasgow 2012see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)NoneoHA monad that can execute GHCi statements by lifting them out of m into the IO monad. (e.g state monads)5"A monad that doesn't allow any IO.5base5base5base5base5baseT5T5L(c) Daniel Fischer 2010see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) TrustworthyoM(c) Daniel Fischer 2010see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthyq :&Number of trailing zero bits in a byteNoneq6::::::9(C) 2008-2014 Edward Kmett/BSD-style (see the file libraries/base/LICENSE)Edward Kmett  provisionalportable Trustworthyq"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy|An infix synonym for B.,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   to a   using :show <$> NothingNothingshow <$> Just 3Just "3"Convert from an    to an    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)base Flipped version of . () =  B ExamplesApply (+1) to a list, a  and a :Just 2 <&> (+1)Just 3[1,2,3] <&> (+1)[2,3,4]Right 3 <&> (+1)Right 4baseFlipped version of .ExamplesReplace the contents of a   with a constant :Nothing $> "foo"NothingJust 90210 $> "foo" Just "foo"Replace the contents of an    with a constant , resulting in an   :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")baseGeneralization of  Data.List..Examplesunzip (Just ("Hello", "World"))(Just "Hello",Just "World"),unzip [("I", "love"), ("really", "haskell")]#(["I","really"],["love","haskell"]) value discards or ignores the result of evaluation, such as the return value of an  action.ExamplesReplace the contents of a   with unit: void NothingNothing void (Just 3)Just ()Replace the contents of an    with unit, resulting in an   ():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]12vB vB"(c) The University of Glasgow 2005/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy}p=p="(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable TrustworthybaseCase analysis for the  type.  f t p evaluates to f when p is , and evaluates to t when p is .This is equivalent to if p then t else f; that is, one can think of it as an if-then-else construct with its arguments reordered.Examples Basic usage:bool "foo" "bar" True"bar"bool "foo" "bar" False"foo" Confirm that  f t p and if p then t else f are equivalent:"let p = True; f = "bar"; t = "foo" bool f t p == if p then t else fTrue let p = False bool f t p == if p then t else fTrueU4BSD-style (see the LICENSE file in the distribution)libraries@haskell.orgstable not portableSafe 01Vbase1Type-level "not". An injective type family since 4.10.0.0.Type-level "or"Type-level "and" Type-level If.  If True a b ==> a;  If False a b ==> b Nils Anders Danielsson 2006 , Alexander Berntsen 20144BSD-style (see the LICENSE file in the distribution)libraries@haskell.orgstableportable Trustworthy0 f* is the least fixed point of the function f, i.e. the least defined x such that f x = x.When f is strict, this means that because, by the definition of strictness, f E = E and such the least defined fixed point of any strict function is E.Examples=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 ,Instead 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.5fix (\rec n -> if n <= 1 then 1 else n * rec (n-1)) 5120Using , we can implement versions of  as   (:) and  as   (++)take 10 $ fix (0:)[0,0,0,0,0,0,0,0,0,0]map (fix (\rec n -> if n < 2 then n else rec (n - 1) + rec (n - 2))) [1..10][1,1,2,3,5,8,13,21,34,55]Implementation DetailsThe current implementation of  uses structural sharing  f = let x = f x in x>A more straightforward but non-sharing version would look like  f = f ( f) 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. (op `` f) x y = f x `op` f yExamples9sortBy (compare `on` length) [[0, 1, 2], [0, 1], [], [0]][[],[0],[0,1],[0,1,2]] ((+) `on` length) [1, 2, 3] [-1]4((,) `on` (*2)) 2 3(4,6)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 ,.This is a version of  , where  is specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is (a -> b) -> a -> b. flipping this yields a -> (a -> b) -> b which is the type signature of Examples5 & (+1) & show"6".sqrt $ [1 / n^2 | n <- [1..1000]] & sum & (*6)3.1406380562059946base applies a function to a value if a condition is true, otherwise, it returns the value unchanged.It is equivalent to  ( ).Examples,map (\x -> applyWhen (odd x) (*2) x) [1..10][2,2,6,4,10,6,14,8,18,10]map (\x -> applyWhen (length x > 6) ((++ "...") . take 3) x) ["Hi!", "This is amazing", "Hope you're doing well today!", ":D"]["Hi!","Thi...","Hop...",":D"]Algebraic properties  applyWhen  =   applyWhen  f =  , ,(C) 2015 David Luposchainsky, (C) 2015 Herbert Valerio Riedel BSD-style (see the file LICENSE)libraries@haskell.org provisionalportable Trustworthybase When 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 fail s should be an action that runs in the monad itself, not an exception (except in instances of MonadIO). In particular, fail' should not be implemented in terms of error.base base base EE3"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy The 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 GHC.Internal.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""The  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)TrueThe  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)FalseThe ( 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: Nothing...WARNING: This function is partial. You can use case-matching instead.The & function takes a default value and a  value. If the  is , it returns the default value; 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 GHC.Internal.Text.Read ( readMaybe )fromMaybe 0 (readMaybe "5")5fromMaybe 0 (readMaybe "")0The , 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 GHC.Internal.Text.Read ( readMaybe )!sum $ maybeToList (readMaybe "3")3 sum $ maybeToList (readMaybe "")0The  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]The  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 GHC.Internal.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]The  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 GHC.Internal.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/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthyw6Concatenate a list of lists.Examples concat [[1,2,3], [4,5], [6], []] [1,2,3,4,5,6] concat [][] concat [[42]][42]\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]Examplesfilter odd [1, 2, 3][1,3]9filter (\l -> length l > 3) ["Hello", ", ", "World", "!"]["Hello","World"]#filter (/= 3) [1, 2, 3, 4, 3, 2, 1] [1,2,4,2,1]\mathcal{O}(\min(m,n)). < takes two lists and returns a list of corresponding pairs. is right-lazy:zip [] undefined[]zip undefined [] *** Exception: Prelude.undefined... is capable of list fusion, but it is restricted to its first list argument and its resulting list.Exampleszip [1, 2, 3] ['a', 'b', 'c'][(1,'a'),(2,'b'),(3,'c')]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..] [][]\mathcal{O}(1)?. Extract the first element of a list, which must be non-empty.,To disable the warning about partiality put {-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-} at the top of the file. To disable it throughout a package put the same options into  ghc-options3 section of Cabal file. To disable it in GHCi put 3:set -Wno-x-partial -Wno-unrecognised-warning-flags into ~/.ghci config file. See also the  https://github.com/haskell/core-libraries-committee/blob/main/guides/warning-for-head-and-tail.mdmigration guide.Exampleshead [1, 2, 3]1 head [1..]1head []'*** Exception: Prelude.head: empty listbase\mathcal{O}(1). Decompose a list into its  and .If the list is empty, returns ."If the list is non-empty, returns  (x, xs) , where x is the  of the list and xs its .Examples uncons []Nothing uncons [1] Just (1,[])uncons [1, 2, 3]Just (1,[2,3])base\mathcal{O}(n). Decompose a list into  and .If the list is empty, returns ."If the list is non-empty, returns  (xs, x) , where xs is the ial part of the list and x is its  element. is dual to : for a finite list xs unsnoc xs = (\(hd, tl) -> (reverse tl, hd)) <$> uncons (reverse xs)Examples unsnoc []Nothing unsnoc [1] Just ([],1)unsnoc [1, 2, 3]Just ([1,2],3)Lazinessfst <$> unsnoc [undefined]Just []%head . fst <$> unsnoc (1 : undefined)%Just *** Exception: Prelude.undefined)head . fst <$> unsnoc (1 : 2 : undefined)Just 1\mathcal{O}(1). Extract the elements after the head of a list, which must be non-empty.,To disable the warning about partiality put {-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-} at the top of the file. To disable it throughout a package put the same options into  ghc-options3 section of Cabal file. To disable it in GHCi put 3:set -Wno-x-partial -Wno-unrecognised-warning-flags into ~/.ghci config file. See also the  https://github.com/haskell/core-libraries-committee/blob/main/guides/warning-for-head-and-tail.mdmigration guide.Examplestail [1, 2, 3][2,3]tail [1][]tail []'*** Exception: Prelude.tail: empty list\mathcal{O}(n). Extract the last element of a list, which must be finite and non-empty.2WARNING: This function is partial. Consider using  instead.Exampleslast [1, 2, 3]3 last [1..]* Hangs forever *last []'*** Exception: Prelude.last: empty list\mathcal{O}(n). Return all the elements of a list except the last one. The list must be non-empty.2WARNING: This function is partial. Consider using  instead.Examplesinit [1, 2, 3][1,2]init [1][]init []'*** Exception: Prelude.init: empty list\mathcal{O}(1). Test whether a list is empty.null []Truenull [1]False null [1..]False\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 *, 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 *A strict version of . 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 *A strict version of .The 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 *The ; 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 *\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 xsExamplesscanl (+) 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"]take 10 (scanl (+) 0 [1..])[0,1,3,6,10,15,21,28,36,45]&take 1 (scanl undefined 'a' undefined)"a"\mathcal{O}(n).  is a variant of & that has no starting value argument: .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]Examplesscanl1 (+) [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]take 10 (scanl1 (+) [1..])[1,3,6,10,15,21,28,36,45,55]+take 1 (scanl1 undefined ('a' : undefined))"a"\mathcal{O}(n). A strict version of . is a variant of  that begins list reduction from the last element and evaluates the accumulator strictly as it unwinds the stack back to the beginning of the list. The input list must be finite, otherwise  runs out of space (diverges).Note that if the function that combines the accumulated value with each element is strict in the accumulator, other than a possible improvement in the constant factor, you get the same \mathcal{O}(n) space cost as with just .If you want a strict right fold in constant space, you need a structure that supports faster than \mathcal{O}(n), access to the right-most element, such as Seq from the  containers package.(Use of this function is a hint that the [] structure may be a poor fit for the task at hand. If the order in which the elements are combined is not important, use  instead.)foldr' (+) [1..4] -- Use foldl' instead!10;foldr' (&&) [True, False, True, True] -- Use foldr instead!False nextChar : reversedString) "foo" ['a', 'b', 'c', 'd'])["abcdfoo","bcdfoo","cdfoo","dfoo","foo"]force $ scanr (+) 0 [1..]*** Exception: stack overflow\mathcal{O}(n).  is a variant of & that has no starting value argument.Examplesscanr1 (+) [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]force $ scanr1 (+) [1..]*** Exception: stack overflow 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 * 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 * f x7 returns an infinite list of repeated applications of f to x: %iterate f x == [x, f x, f (f x), ...]Laziness 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.take 1 $ iterate undefined 42[42]Examplestake 10 $ iterate not True8[True,False,True,False,True,False,True,False,True,False]take 10 $ iterate (+3) 42[42,45,48,51,54,57,60,63,66,69]iterate id == :take 10 $ iterate id 1[1,1,1,1,1,1,1,1,1,1] is the strict version of .It forces the result of each application of the function to weak head normal form (WHNF) before proceeding.take 1 $ iterate' undefined 42 *** Exception: Prelude.undefined x is an infinite list, with x the value of every element.Examplestake 10 $ repeat 17 [17,17,17,17,17,17,17,17,17, 17]repeat undefined![*** Exception: Prelude.undefined 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.Examplesreplicate 0 True[]replicate (-1) True[]replicate 4 True[True,True,True,True] ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.Examplescycle [](*** Exception: Prelude.cycle: empty listtake 10 (cycle [42])[42,42,42,42,42,42,42,42,42,42]take 10 (cycle [2, 5, 7])[2,5,7,2,5,7,2,5,7,2]take 1 (cycle (42 : undefined))[42], applied to a predicate p and a list xs2, returns the longest prefix (possibly empty) of xs of elements that satisfy p.Laziness!takeWhile (const False) undefined *** Exception: Prelude.undefined/takeWhile (const False) (undefined : undefined)[]/take 1 (takeWhile (const True) (1 : undefined))[1]Examples!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][] p xs$ returns the suffix remaining after  p xs.Examples!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] n, applied to a list xs, returns the prefix of xs of length n, or xs itself if n >=  xs.&It is an instance of the more general  , in which n may be of any integral type.Lazinesstake 0 undefined[]take 2 (1 : 2 : undefined)[1,2]Examplestake 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][] n xs returns the suffix of xs after the first n elements, or [] if n >=  xs.&It is an instance of the more general  , in which n may be of any integral type.Examplesdrop 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] n xs( returns a tuple where first element is xs prefix of length n1 and second element is the remainder of the list:$ is an instance of the more general  , in which n may be of any integral type.LazinessIt is equivalent to ( n xs,  n xs) unless n is _|_: splitAt _|_ xs = _|_, not  (_|_, _|_)).4The first component of the tuple is produced lazily:fst (splitAt 0 undefined)[])take 1 (fst (splitAt 10 (1 : undefined)))[1]ExamplessplitAt 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]), applied to a predicate p and a list xs, returns a tuple where first element is the longest prefix (possibly empty) of xs of elements that satisfy p1 and second element is the remainder of the list: p xs is equivalent to ( p xs,  p xs) , even if p is _|_.Lazinessspan undefined []([],[])"fst (span (const False) undefined) *** Exception: Prelude.undefined0fst (span (const False) (undefined : undefined))[]0take 1 (fst (span (const True) (1 : undefined)))[1]2 produces the first component of the tuple lazily:'take 10 (fst (span (const True) [1..]))[1,2,3,4,5,6,7,8,9,10]Examplesspan (< 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]), 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: p is equivalent to  ( . p) and consequently to ( ( . p) xs,  ( . p) xs) , even if p is _|_.Lazinessbreak undefined []([],[])"fst (break (const True) undefined) *** Exception: Prelude.undefined0fst (break (const True) (undefined : undefined))[]2take 1 (fst (break (const False) (1 : undefined)))[1]2 produces the first component of the tuple lazily:)take 10 (fst (break (const False) [1..]))[1,2,3,4,5,6,7,8,9,10]Examplesbreak (> 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],[])\mathcal{O}(n).  xs returns the elements of xs in reverse order. xs must be finite.Laziness is lazy in its elements.head (reverse [undefined, 1])1reverse (1 : 2 : undefined) *** Exception: Prelude.undefinedExamples reverse [][] reverse [42][42]reverse [2,5,7][7,5,2] reverse [1..]* Hangs forever * 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.Examplesand []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 * 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.Examplesor []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 *#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.Examples any (> 3) []Falseany (> 3) [1,2]Falseany (> 3) [1,2,3,4,5]Trueany (> 3) [1..]Trueany (> 3) [0, -1..]* Hangs forever *#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.Examples all (> 3) []Trueall (> 3) [1,2]Falseall (> 3) [1,2,3,4,5]Falseall (> 3) [1..]Falseall (> 3) [4..]* Hangs forever * 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.Examples 3 `elem` []False3 `elem` [1,2]False3 `elem` [1,2,3,4,5]True3 `elem` [1..]True3 `elem` [4..]* Hangs forever * is the negation of .Examples3 `notElem` []True3 `notElem` [1,2]True3 `notElem` [1,2,3,4,5]False3 `notElem` [1..]False3 `notElem` [4..]* Hangs forever *\mathcal{O}(n).   key assocs? looks up a key in an association list. For the result to be , the list must be finite.Examples lookup 2 []Nothinglookup 2 [(1, "first")]Nothing4lookup 2 [(1, "first"), (2, "second"), (3, "third")] Just "second"Map 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) xsExamplesconcatMap (\i -> [-i,i]) [][]#concatMap (\i -> [-i, i]) [1, 2, 3][-1,1,-2,2,-3,3]#concatMap ('replicate' 3) [0, 2, 4][0,0,0,2,2,2,4,4,4]List index (subscript) operator, starting from 0. It is an instance of the more general -, which takes an index of any integral type.WARNING: This function is partial, and should only be used if you are sure that the indexing will not fail. Otherwise, use .6WARNING: This function takes linear time in the index.Examples['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 index:List index (subscript) operator, starting from 0. Returns  if the index is out of bounds)This is the total variant of the partial  operator.6WARNING: This function takes linear time in the index.Examples['a', 'b', 'c'] !? 0Just 'a'['a', 'b', 'c'] !? 2Just 'c'['a', 'b', 'c'] !? 3Nothing['a', 'b', 'c'] !? (-1)Nothing 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.\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..] is right-lazy:let f = undefinedzipWith f [] undefined[] is capable of list fusion, but it is restricted to its first list argument and its resulting list.Examples  can be applied to two lists to produce the list of corresponding sums:zipWith (+) [1, 2, 3] [4, 5, 6][5,7,9]0zipWith (++) ["hello ", "foo"] ["world!", "bar"]["hello world!","foobar"]\mathcal{O}(\min(l,m,n)). The  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..]Examples0zipWith3 (\x y z -> [x, y, z]) "123" "abc" "xyz"["1ax","2by","3cz"]>zipWith3 (\x y z -> (x * y) + z) [1, 2, 3] [4, 5, 6] [7, 8, 9] [11,18,27] transforms a list of pairs into a list of first components and a list of second components.Examplesunzip []([],[])unzip [(1, 'a'), (2, 'b')] ([1,2],"ab")The  function takes a list of triples and returns three lists of the respective components, analogous to .Examples unzip3 [] ([],[],[])(unzip3 [(1, 'a', True), (2, 'b', False)]([1,2],"ab",[True,False])=+=+  K((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy72}!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)".Convert 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.A specialised variant of <, using precedence context zero, and returning an ordinary . 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.The shows7 functions return a function that prepends the output  to an existing . This allows constant-time concatenation of results using function composition.equivalent to  with a precedence of 0.utility function converting a  to a show function that simply prepends the character unchanged.utility function converting a ? to a show function that simply prepends the string unchanged.utility function that surrounds the inner show function with parentheses when the  parameter is .Convert a character to a string using only printable characters, using Haskell source-language escape conventions. For example: !showLitChar '\n' s = "\\n" ++ sSame 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-quotesLike  (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""] Convert an  in the range 0..15$ to the corresponding single digit . This function fails on other inputs, and generates lower-case hexadecimal digits.basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase base base basebasebasebasebasebase base base base basebase base basebasebasebasebasebasethe operator precedence of the enclosing context (a number from 0 to 11(). Function application has precedence 10.the value to be converted to a }}Q((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafe  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 4).It serves to keep the internal states of different invocations of 3 separate from each other and from invocations of 4.The @ and A operations are strict in the state (though not in values stored in the state). For example,  (writeSTRef _|_ v >>= f) = _|_ 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.2Return 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.basebase base basebasebase  X((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafea 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" Build a new  in the current state threadRead the value of an Write a new value into an basePointer equality.W"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable$non-portable (uses Control.Monad.ST) Trustworthy")5Mutate the contents of an .:{ runST (do ref <- newSTRef ""# modifySTRef ref (const "world") modifySTRef ref (++ "!")" modifySTRef ref ("Hello, " ++) readSTRef ref ):}"Hello, world!"Be warned that 5 does not apply the function strictly. This means if the program calls 5 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 GHC.Internal.Control.Monad (replicateM_):{print (runST (do ref <- newSTRef 0+ replicateM_ 1000 $ modifySTRef ref (+1) readSTRef ref )):}1000To avoid this problem, use 5 instead.5baseStrict version of 55555"(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#55 Trustworthy#w:base:base:base:base:::;;;? Trustworthy#The  method restricted to the type .N((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthy743,9!Used in Haskell's translation of [n..] with [n..] = enumFrom n%, a possible implementation being "enumFrom n = n : enumFrom (succ n).Examples 'enumFrom 4 :: [Integer] = [4,5,6,7,...] 3enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound :: Int]:!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 Examples -enumFromThen 4 6 :: [Integer] = [4,6,8,10...] ;enumFromThen 6 2 :: [Int] = [6,2,-2,-6,...,minBound :: Int];!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 = [] Examples 'enumFromTo 6 10 :: [Int] = [6,7,8,9,10] !enumFromTo 42 1 :: [Integer] = []<!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 = [] Examples 5enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6] "enumFromThenTo 6 8 2 :: [Int] = []nThe 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.oClass 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.9 and :3 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 = minBound)Successor of a value. For numeric types,  adds 1.+Predecessor of a value. For numeric types,  subtracts 1.Convert from an .Convert to an '. It is implementation-dependent what  returns when applied to a value that is too large to fit in an .basebasebasebasebasebasebasebasebasebasebasebase base base base basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebaseno9:<;no;<:9((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEghc-devs@haskell.orgstablenon-portable (GHC extensions) Safe-Inferred5? no9:<;no;<:9((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) TrustworthyP18Conversion from a  (that is  4). A floating literal stands for an application of 8 to a value of type , so such literals have type (r a) => a.OGeneral coercion from s types.WARNING: This function performs silent truncation if the result type is not at least as big as the argument's type.PGeneral coercion to r types.(WARNING: This function goes through the & type, which does not have values for NaN1 for example. This means it does not round-trip.For 1 it also behaves differently with or without -O0: Prelude> realToFrac nan -- With -O0 -Infinity Prelude> realToFrac nan NaNQConversion to .R=Rational equivalent of its real argument with full precision.r-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 Totality of RR is totalCoherence with Rif the type also implements z, then 8 is a left inverse for R, i.e. fromRational (toRational i) = i Note that it isn't/ customarily expected that a type instance of r. implement a field. However, all instances in base do.s.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 / and /, 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 's instance, is . In addition,  toInteger should be total, and 6( should be a left inverse for it, i.e. fromInteger (toInteger i) = i.z Real numbers.'The Haskell report defines no laws for z , however z instances are customarily expected to adhere to the following law: Coherence with 8if the type also implements r, then 8 is a left inverse for R, i.e. fromRational (toRational i) = iThe law does not hold for , , , , etc., because these types contain non-finite values, which cannot be roundtripped through .|#Extracting components of fractions.9Rational 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.Arbitrary-precision rational numbers, represented as a ratio of two : values. A rational number may be constructed using the  operator.'Integer division truncated toward zero.WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.Integer remainder, satisfying !(x `quot` y)*y + (x `rem` y) == xWARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.4Integer division truncated toward negative infinity.WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.Integer modulus, satisfying  (x `div` y)*y + (x `mod` y) == xWARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base. Simultaneous  and .WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base. simultaneous  and .WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in 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 . x returns the integer nearest x between zero and x x returns the nearest integer to x; the even integer if x$ is equidistant between two integers x) returns the least integer not less than x x/ returns the greatest integer not greater than xFractional division.Reciprocal fraction. is a subsidiary function used only in this module. It normalises a ratio by dividing both numerator and denominator by their greatest common divisor.(Forms the ratio of two integral numbers.Extract the numerator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.Extract the denominator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.Converts a possibly-negative z value to a string./raise a number to a non-negative integral power#raise a number to an integral power 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. x y, is the smallest positive integer that both x and y divide.basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase(a function that can show unsigned values'the precedence of the enclosing contextthe value to show >OihPr8sQzR|zRsQr8|OPhiT((c) The University of Glasgow, 1994-2000see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions)NoneX~The ~ 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))  >The list of values in the subrange defined by a bounding pair.,The position of a subscript in the subrange.Like 2, but without checking that the value is in range.Returns  the given subscript lies in the range defined the bounding pair.4The size of the subrange defined by a bounding pair.like 9, but without checking that the upper bound is in range.basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase~ ~*"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable TrustworthyX~~V TrustworthyZ baseA state transformer monad parameterized by the state and inner monad. The implementation is copied from the transformers package with the return tuple swapped.basebase basebase basebasebasebasebasebasebaseS((c) The University of Glasgow, 1994-2000see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions)Unsafep)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.The type of immutable non-strict (boxed) arrays with indices in i and elements in e.Construct 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.Construct an array from a pair of bounds and a list of values in index order.)The value at the given index in an array. (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.Constructs 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. a -> Maybe b toIntegral x | toInteger x == toInteger y = Just y | otherwise = Nothing where y = fromIntegral 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 O+, which is itself optimized with rules for base types but may go through  for some type pairs.); if the size of a is <= the size of b, where size is measured by  and .basebasebase Interpret  as 1-bit bit-fieldbasebasebasebasebase.  Trustworthy;;;;)"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafeShow a list (using square brackets and commas), given a function for showing elements. } }% Trustworthy01c g(Prove anything within a context with an  constraint.This is useful for filling in instance methods when there is an ( constraint in the instance head, e.g.: instance Unsatisfiable (Text "No Eq instance for functions") => Eq (a -> b) where(==) = unsatisfiablesince base-4.19.0.0.(An unsatisfiable constraint. Similar to  when used at the 7 kind, but reports errors in a more predictable manner. See also the g function.since base-4.19.0.0.base The 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 Show 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.") Show the text as is.4Put two pieces of error message next to each other.8Stack two pieces of error message on top of each other.Pretty print the type. ShowType :: k -> ErrorMessagebaseA type-level assert function.If the first argument evaluates to true, then the empty constraint is returned, otherwise the second argument (which is intended to be something which reduces to  is used).-For example, given some type level predicate P' :: Type -> Bool+, it is possible to write the type synonym 'type P a = Assert (P' a) (NotPError a) where  NotPError reduces to a  TypeError+ which is reported if the assertion fails.%A description of a custom type error. g g((c) The University of Glasgow, 1994-2000see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthy1base0Comparison of type-level symbols, as a function.base$Comparison of type-level characters. Trustworthy13base1Comparison of type-level naturals, as a function.(c) 2020 Andrew Lelechenko (c) 2020 Composewell Technologies BSD-3-Clausestreamly@composewell.cominternalnon-portable (GHC extensions)None;lookup64 addr index& looks up the bit stored at bit index index) using a bitmap starting at the address addr. Looks up the 64-bit word containing the bit and then the bit in that word. The caller must make sure that the 64-bit word at the byte address (addr + index / 64) * 8 is legally accessible memory.;baselookupIntN addr index looks up for the index-th 8%-bits word in the bitmap starting at addr, then convert it to an Int.The caller must make sure that:ceiling (addr + (n * 8)) is legally accessible Word8.;Bitmap address Word indexResulting word as ;;2(c) 2020 Composewell Technologies and Contributors BSD-3-Clausestreamly@composewell.cominternalNone;;2(c) 2020 Composewell Technologies and Contributors BSD-3-Clausestreamly@composewell.cominternalNone;2(c) 2020 Composewell Technologies and Contributors BSD-3-Clausestreamly@composewell.cominternalNone%;2(c) 2020 Composewell Technologies and Contributors BSD-3-Clausestreamly@composewell.cominternalNone;2(c) 2020 Composewell Technologies and Contributors BSD-3-Clausestreamly@composewell.cominternalNone3;2(c) 2020 Composewell Technologies and Contributors BSD-3-Clausestreamly@composewell.cominternalNone:base$Version of Unicode standard used by base:  /https://www.unicode.org/versions/Unicode15.1.0/15.1.0.J#(c) The University of Glasgow, 2003see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) TrustworthyƼ;Unicode 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 GHC.Internal.Data.Ix ( index )&index (OtherLetter,Control) FinalQuote12"index (OtherLetter,Control) Format#*** Exception: Error in array indexLu: Letter, UppercaseLl: Letter, LowercaseLt: Letter, TitlecaseLm: Letter, ModifierLo: Letter, OtherMn: Mark, Non-SpacingMc: Mark, Spacing CombiningMe: Mark, EnclosingNd: Number, DecimalNl: Number, LetterNo: Number, OtherPc: Punctuation, ConnectorPd: Punctuation, DashPs: Punctuation, OpenPe: Punctuation, ClosePi: Punctuation, Initial quotePf: Punctuation, Final quotePo: Punctuation, OtherSm: Symbol, MathSc: Symbol, CurrencySk: Symbol, ModifierSo: Symbol, OtherZs: Separator, SpaceZl: Separator, LineZp: Separator, ParagraphCc: Other, ControlCf: Other, FormatCs: Other, SurrogateCo: Other, Private UseCn: Other, Not AssignedThe 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 ' 'SpaceSelects the first 128 characters of the Unicode character set, corresponding to the ASCII character set.Selects the first 256 characters of the Unicode character set, corresponding to the ISO 8859-1 (Latin-1) character set.Selects ASCII lower-case letters, i.e. characters satisfying both  and .Selects ASCII upper-case letters, i.e. characters satisfying both  and .Selects control characters, which are the non-printing characters of the Latin-1 subset of Unicode.Selects printable Unicode characters (letters, numbers, marks, punctuation, symbols and spaces).This function returns + if its argument has one of the following s, or  otherwise:Returns > for any Unicode space character, and the control characters \t, \n, \r, \f, \v.Selects 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.Note: this predicate does not+ work for letter-like characters such as: 'I' (U+24B6& circled Latin capital letter A) and 'B' (U+2163 Roman numeral four). This is due to selecting only characters with the   or .See 3 for a more intuitive predicate. Note that unlike ,  does select  title-case characters such as '' (U+01C5< Latin capital letter d with small letter z with caron) or '?' (U+1FAF Greek capital letter omega with dasia and perispomeni and prosgegrammeni).base2Selects upper-case Unicode letter-like characters.Note:> this predicate selects characters with the Unicode property  Uppercase1, which include letter-like characters such as: 'I' (U+24B6& circled Latin capital letter A) and 'B' (U+2163 Roman numeral four).See - for the legacy predicate. Note that unlike ,  does select  title-case characters such as '' (U+01C5< Latin capital letter d with small letter z with caron) or '?' (U+1FAF Greek capital letter omega with dasia and perispomeni and prosgegrammeni).;Selects lower-case alphabetic Unicode characters (letters).Note: this predicate does not+ work for letter-like characters such as: 'I' (U+24D0$ circled Latin small letter a) and 'B' (U+2173 small Roman numeral four). This is due to selecting only characters with the  .See  for a more intuitive predicate.base2Selects lower-case Unicode letter-like characters.Note:> this predicate selects characters with the Unicode property  Lowercase2, which includes letter-like characters such as: 'I' (U+24D0$ circled Latin small letter a) and 'B' (U+2173 small Roman numeral four).See  for the legacy predicate.Selects alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function is equivalent to .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".1Selects 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, e.g., Roman numerals like V, full-width digits like '' (aka '65297').This function returns + if its argument has one of the following s, or  otherwise:Selects ASCII digits, i.e. '0'..'9'.!Selects ASCII octal digits, i.e. '0'..'7'.(Selects ASCII hexadecimal digits, i.e. '0'..'9', 'a'..'f', 'A'..'F'.Selects 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 '@'TrueSelects 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 '-'FalseConvert a letter to the corresponding upper-case letter, if any. Any other character is returned unchanged.Convert a letter to the corresponding lower-case letter, if any. Any other character is returned unchanged.Convert 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.basebasebasebasebasebase66Z"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional-non-portable (local universal quantification) Trustworthy:%.A 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 ).Consumes and returns the next character. Fails if there is no input left.Look-ahead: returns the part of the input that is left, without consuming it. Always fails.Symmetric choice.Local, exclusive, left-biased choice: If left parser locally produces any result at all, then right parser is not used.Transforms 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.Consumes and returns the next character, if it satisfies the specified predicate.+Parses and returns the specified character.'Succeeds iff we are at the end of input(Parses and returns the specified string.Parses 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))Parses 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))+Combines all parsers in the specified list.Skips all whitespace. count n p parses n occurrences of p/ in sequence. A list of results is returned.between open close p parses open, followed by p and finally close. Only the value of p is returned. option x p will either parse p or return x without consuming any input. optional p optionally parses p and always returns ().4Parses zero or more occurrences of the given parser.3Parses one or more occurrences of the given parser.Like , but discards the result.Like , but discards the result. sepBy p sep$ parses zero or more occurrences of p, separated by sep*. Returns a list of values returned by p. sepBy1 p sep# parses one or more occurrences of p, separated by sep*. Returns a list of values returned by p. endBy p sep$ parses zero or more occurrences of p, separated and ended by sep. endBy p sep# parses one or more occurrences of p, separated and ended by sep. 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. 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.Like (, but parses one or more occurrences of p.Like (, but parses one or more occurrences of p.manyTill p end$ parses zero or more occurrences of p, until end3 succeeds. Returns a list of values returned by p.Converts 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)] Converts a Haskell ReadS-style function into a parser. Warning: This introduces local backtracking in the resulting parser, and therefore a possible inefficiency.basebase basebasebasebasebasebase basebasebasebase##["(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional0non-portable (uses Text.ParserCombinators.ReadP) TrustworthybaseCharacter literal(String literal, with escapes interpreted%Punctuation or reserved symbol, e.g. (, ::Haskell identifier, e.g. foo, BazHaskell symbol, e.g. >>, :%base;; b is C () if b is , and  if b is .Haskell lexemes.basebasebasebasebase?Haskell lexer: returns the lexed string, rather than the lexeme;The special2 character class as defined in the Haskell Report.basebasebasebase\"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional0non-portable (uses Text.ParserCombinators.ReadP) TrustworthyNLift a precedence-insensitive  to a .(Increases the precedence context by one.&Resets the precedence context to zero. (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.Consumes and returns the next character. Fails if there is no input left.Look-ahead: returns the part of the input that is left, without consuming it.Symmetric choice.Local, exclusive, left-biased choice: If left parser locally produces any result at all, then right parser is not used. Always fails.+Combines all parsers in the specified list.basebasebase basebasebase#Unsafe )*01eHighly, 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.This 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 ". You probably don't want to use  in an expression, but you might conceivably want to pattern-match on it. Use d to create one of these. coerces a value from one type to another, bypassing the type-checker.)There are several legitimate ways to use :  To coerce a lifted type such as Int to Any, put it in a list of Any), 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. (superseded) The "reflection trick", which takes advantage 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. It is now preferred to use  in GHC.Magic.Dict, which is type-safe. See Note [withDict] in GHC.Tc.Instance.Class for details.(superseded) Casting between two types which have exactly the same structure: between a newtype of T and T, or between types which differ only in "phantom" type parameters. It is now preferred to use 5 from  Data.Coerce, which is type-safe.Other uses of 5 are undefined. In particular, you should not use  to cast a T to an algebraic data type D, unless T is also an algebraic data type. For example, do not cast -> to  , even if you later cast that  back to -> before applying it. The reasons have to do with GHC's internal representation details (for the cognoscenti, data values can be entered but function closures cannot). If you want a safe type to cast things to, use &, which is not an algebraic data type.eddesee libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy 1o5Create a new mutable array of arrays with the specified number of elements, in the specified state thread, with each element recursively referring to the newly created array.5:Make a mutable array of arrays immutable, without copying.5+Return the number of elements in the array.5+Return the number of elements in the array.5Copy a range of the 5 to the specified region in the 5. Both arrays must fully contain the specified ranges, but this is not checked. The two arrays must not be the same array in different states, but this is not checked either.5Copy a range of the first MutableArrayArray# to the specified region in the second MutableArrayArray#. Both arrays must fully contain the specified ranges, but this is not checked. The regions are allowed to overlap, although this is only possible when the same array is provided as both the source and the destination.58Compare the underlying pointers of two arrays of arrays.5Compare the underlying pointers of two mutable arrays of arrays.555555555555555555555555555555555555555555556((c) The University of Glasgow, 1997-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy78-bit unsigned integer type16-bit unsigned integer type32-bit unsigned integer type64-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 .basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase11 (c) The University of Glasgow 1994-2002 Portions obtained from hbc (c) Lennart Augusstsonsee libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy 2/Convert an Integer to a Float#0Convert an Integer to a Double#1Convert a Natural to a Float#2*Encode a Natural (mantissa) into a Double#q=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{Efficient, machine-independent access to the components of a floating-point number.a constant function, returning the radix of the representation (often 2)8a constant function, returning the number of digits of  in the significanda constant function, returning the lowest and highest values the exponent may assume 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 . 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.( 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.The 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.multiplies a floating-point number by an integer power of the radix6 if the argument is an IEEE "not-a-number" (NaN) value9 if the argument is an IEEE infinity or negative infinity if the argument is too small to be represented in normalized format) if the argument is an IEEE negative zero1 if the argument is an IEEE floating point numbera 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 .Default implementation for  requiring x to test against a threshold to decide which implementation variant to use.Show 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.! 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-16Converts a positive integer to a floating-point value.The value nearest to the argument will be returned. If there are two such values, the one with an even significand will be returned (i.e. IEEE roundTiesToEven).,The argument must be strictly positive, and floatRadix (undefined :: a) must be 2. Converts a  value into any type in class {.base Used to prevent exponent over/underflow when encoding floating point numbers. This is also the same as \(x,y) -> max (-x) (min x y)Example clamp (-10) 510base  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.base  f does a bit-for-bit copy from a floating-point value to an integral value.base? just truncates its argument, beware of all sorts of overflows.?List generators have extremely peculiar behavior, mandated by  https://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1310006.3.4Haskell Report 2010:[0..1.5] [0.0,1.0,2.0]base? just truncates its argument, beware of all sorts of overflows.?List generators have extremely peculiar behavior, mandated by  https://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1310006.3.4Haskell Report 2010:[0..1.5 :: Float] [0.0,1.0,2.0]basebase9Beware that results for non-finite arguments are garbage:[ f x | f <- [round, floor, ceiling], x <- [-1/0, 0/0, 1/0] ] :: [Int][0,0,0,0,0,0,0,0,0]6map properFraction [-1/0, 0/0, 1/0] :: [(Int, Double)][(0,0.0),(0,0.0),(0,0.0)].and get even more non-sensical if you ask for  instead of .baseThis instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero.0 == (-0 :: Double)Truerecip 0 == recip (-0 :: Double)Falsemap (/ 0) [-1, 0, 1][-Infinity,NaN,Infinity] map (* 0) $ map (/ 0) [-1, 0, 1] [NaN,NaN,NaN]base Beware that R, generates garbage for non-finite arguments:toRational (1/0)&179769313 (and 300 more digits...) % 1toRational (0/0)&269653970 (and 300 more digits...) % 1baseThis instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero. Neither addition nor multiplication are associative or distributive:&(0.1 + 0.1) + 0.4 == 0.1 + (0.1 + 0.4)False*(0.1 + 0.2) * 0.3 == 0.1 * 0.3 + 0.2 * 0.3False&(0.1 * 0.1) * 0.3 == 0.1 * (0.1 * 0.3)Falsebasebase9Beware that results for non-finite arguments are garbage:[ f x | f <- [round, floor, ceiling], x <- [-1/0, 0/0, 1/0 :: Float] ] :: [Int][0,0,0,0,0,0,0,0,0]5map properFraction [-1/0, 0/0, 1/0] :: [(Int, Float)][(0,0.0),(0,0.0),(0,0.0)].and get even more non-sensical if you ask for  instead of .baseThis instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero.0 == (-0 :: Float)Truerecip 0 == recip (-0 :: Float)Falsemap (/ 0) [-1, 0, 1 :: Float][-Infinity,NaN,Infinity])map (* 0) $ map (/ 0) [-1, 0, 1 :: Float] [NaN,NaN,NaN]base Beware that R, generates garbage for non-finite arguments:toRational (1/0 :: Float)+340282366920938463463374607431768211456 % 1toRational (0/0 :: Float)+510423550381407695195061911147652317184 % 1baseThis instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero. Neither addition nor multiplication are associative or distributive:/(0.1 + 0.1 :: Float) + 0.5 == 0.1 + (0.1 + 0.5)False3(0.1 + 0.2 :: Float) * 0.9 == 0.1 * 0.9 + 0.2 * 0.9False/(0.1 * 0.1 :: Float) * 0.9 == 0.1 * (0.1 * 0.9)Falsebasebasebasebase(a function that can show unsigned values'the precedence of the enclosing contextthe value to show 0/2143q{q{/13024]((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy7Av9y 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  = ...  =  attempts 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. 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  are expected to use double quotes, rather than square brackets.Proposed replacement for $ using new-style parsers (GHC only).Proposed replacement for  using new-style parsers (GHC only). The default definition uses . Instances that define  should also define  as .  p parses what p* parses, but surrounded with parentheses.  p parses what p5 parses, but optionally surrounded with parentheses.*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 .*A possible replacement definition for the  method, defined using  (GHC only).The  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 properlyRead a string representation of a character, using Haskell source-language escape conventions. For example: -lexLitChar "\\nHello" = [("\\n", "Hello")]Read 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")]+Reads a non-empty string of decimal digits.Parse a single lexeme (paren p) parses "(P0)" where p' parses "P0" in precedence context zero (parens p)0 parses "P", "(P0)", "((P0))", etc, where p parses "P" in the current precedence context and parses "P0" in precedence context zero(list p)# parses a list of things parsed by p), using the usual square-bracket syntax.Parse 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 (:~:)y( 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.y( 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.y/ 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.basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase Reading a - value is always a parse error, considering % as a data type with no constructors.base basethe operator precedence of the enclosing context (a number from 0 to 11(). Function application has precedence 10.yyk((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable TrustworthyB!See !base!base!base!base"base"base!!!!!!!!!!54BSD-style (see the LICENSE file in the distribution)libraries@haskell.orgstable not portable Trustworthy)*017J*A type family to compute Boolean equality.This class contains types where you can learn the equality of two types from information contained in terms.The result should be  Just Refl% if and only if the types applied to f are equal: 6testEquality (x :: f a) (y :: f b) = Just Refl O a = bTypically, only singleton types should inhabit this class. In that case type argument equality coincides with term equality: >testEquality (x :: f a) (y :: f b) = Just Refl O a = b O x = y "isJust (testEquality x y) = x == ySingleton types are not required, however, and so the latter two would-be laws are not in fact valid in general.$Conditionally prove the equality of a and b.base 0Kind 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.Symmetry of equalityTransitivity of equality,Type-safe cast, using propositional equality?Generalized form of type-safe cast using propositional equality+Apply one equality to another, respectivelyExtract equality of the arguments from an equality of applied typesExtract equality of type constructors from an equality of applied typesbasebase base basebase base base base base basebasebasebasebaseg4BSD-style (see the LICENSE file in the distribution)libraries@haskell.orgstable not portableNone)*07OThis 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.5Conditionally 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 5 to apply it./Type-safe cast, using representational equalitybase Generalized form of type-safe cast using representational equality%Symmetry of representational equality)Transitivity of representational equalityConvert propositional (nominal) equality to representational equalitybasebasebase basebasebasebasebasebase  (c) Ashley Yakeley 20074BSD-style (see the LICENSE file in the distribution)ashley@semantic.orgstableportable Trustworthy)*0R0 59A class for categories. Instances should satisfy the laws Right identityf 5 5 = f Left identity5 5 f = f Associativityf 5 (g 5 h) = (f 5 g) 5 h5the identity morphism5morphism composition5Right-to-left composition6Left-to-right composition6base6base 6base6base56555555565 56h4BSD-style (see the LICENSE file in the distribution)libraries@haskell.orgstableportable Trustworthy0XA concrete, promotable proxy type, for use at the kind level. There are no instances for this because it is intended at the kind level only 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 complicatedStructureProxy! 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 GHC.Internal.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 GHC.Internal.Word3:type asProxyTypeOf 123 (Just (undefined :: Word8))6asProxyTypeOf 123 (Just (undefined :: Word8)) :: Word8base basebase basebasebasebase basebasebasebasebasebasebase8"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy01oThe  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 B 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"Case 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) n6Extracts 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"]Extracts 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]Partitions 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)SUCCESSbase Return the contents of a $-value or a default value otherwise.Examples Basic usage:fromLeft 1 (Left 3)3fromLeft 1 (Right "foo")1base Return the contents of a $-value or a default value otherwise.Examples Basic usage:fromRight 1 (Right 3)3fromRight 1 (Left "foo")1basebasebase basebasebasebasebase  ("(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional0non-portable (uses Text.ParserCombinators.ReadP) TrustworthytHequivalent 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 IntNothingThe  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)yyO"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy|.base,Monoid under bitwise 'equality'; defined as 1' if the corresponding bits match, and 0 otherwise.&getIff (Iff 0xab <> Iff 0x12) :: Word870baseMonoid under bitwise XOR.&getXor (Xor 0xab <> Xor 0x12) :: Word8185base"Monoid under bitwise inclusive OR.&getIor (Ior 0xab <> Ior 0x12) :: Word8187baseMonoid under bitwise AND.&getAnd (And 0xab <> And 0x12) :: Word82baseA more concise version of complement zeroBits.2complement (zeroBits :: Word) == (oneBits :: Word)True2complement (oneBits :: Word) == (zeroBits :: Word)TrueNoteThe constraint on : is arguably too strong. However, as some types (such as Natural) have undefined  , this is the only safe choice.baseInfix version of .baseInfix version of .baseInfix version of .baseInfix version of .baseInfix version of .baseThis constraint is arguably too strong. However, as some types (such as Natural) have undefined  , this is the only safe choice.basebasebasebasebasebaseThis constraint is arguably too strong. However, as some types (such as Natural) have undefined , this is the only safe choice.baseThis constraint is arguably too strong. However, as some types (such as Natural) have undefined , this is the only safe choice.basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase11'(c) The University of Glasgow 1997-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy48-bit signed integer type16-bit signed integer type32-bit signed integer type64-bit signed integer typebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase--&"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy Reads an unsigned% integral value in an arbitrary base.+Read an unsigned number in binary notation.readBin "10011" [(19,"")]*Read an unsigned number in octal notation.readOct "0644" [(420,"")],Read an unsigned number in decimal notation.readDec "0644" [(644,"")]Read an unsigned number in hexadecimal notation. Both upper or lower case letters are allowed.readHex "deadbeef"[(3735928559,"")] Reads an unsigned |2 value, expressed in decimal scientific notation.Note that this function takes time linear in the magnitude of its input which can scale exponentially with input size (e.g.  "1e100000000" is a very large number while having a very small textual form). For this reason, users should take care to avoid using this function on untrusted input. Users needing to parse floating point values (e.g.  ) are encouraged to instead use read), which does not suffer from this issue.Reads a signed z- value, given a reader for an unsigned value.Show  non-negative s numbers in base 10.Show 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.Show 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.Show 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.base Show 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"Shows a  non-negative s number using the base specified by the first argument, and the character representation specified by the second.Show  non-negative s numbers in base 16.Show  non-negative s numbers in base 8.Show  non-negative s numbers in base 2.the base4a predicate distinguishing valid digits in this base4a function converting a valid digit character to an .q7q^!(c) The FFI Task Force, 2000-2002see libraries/base/LICENSEffi@haskell.orginternalnon-portable (GHC Extensions)UnsafeA 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  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.A 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. , , , , , , , , , , , , ,  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 -> IntFunction The constant # contains a distinguished value of 6 that is not associated with a valid memory location.The 3 function casts a pointer from one type to another.8Advances the given address by the given offset in bytes.9Given 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.Computes the offset required to get from the second to the first argument. We have %p2 == p1 `plusPtr` (p2 `minusPtr` p1) The constant $ contains a distinguished value of 6 that is not associated with a valid memory location.Casts a  to a  of a different type.Casts 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.Casts 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  `((c) The University of Glasgow, 1992-2004see libraries/base/LICENSEffi@haskell.orginternalnon-portable (GHC Extensions)Unsafe=Create a stable pointer referring to the given Haskell value.A 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.The  StablePtr5 0 is reserved for representing NULL in foreign code.A value of type  StablePtr a5 is a stable pointer to a Haskell expression of type a.Dissolve 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  () value returned by 8, in this case, is undefined (in particular, it may be 7). Nevertheless, the call to  is guaranteed not to diverge.Obtain 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.Coerce 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 might not refer to an accessible memory location and any attempt to pass it to the member functions of the class  leads to undefined behaviour.The 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 .based!(c) The FFI task force, 2000-2002see libraries/base/LICENSEffi@haskell.orginternalnon-portable (GHC Extensions) Trustworthy  b"(c) The University of Glasgow 2008see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafe An  (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. Create an  which is initially empty. Create an # which contains the supplied value.Return 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.#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. The runtime guarantees that all woken threads complete their  operation.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 Put 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.A 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.A 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.Check 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.Add a finalizer to an  (GHC only). See Foreign.ForeignPtr and System.Mem.Weak for more about finalizers.Make a ' 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.base!Compares the underlying pointers."(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable TrustworthyU'(c) The University of Glasgow 1997-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafe6666:(c) GHC Developers/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy=baseA pointer with the C const/ qualifier. For instance, an argument of type  ConstPtr CInt would be marshalled as  const int*.While const$-ness generally does not matter for ccall imports (since const and non-const pointers typically have equivalent calling conventions), it does matter for capi imports. See GHC #22043.=((c) The University of Glasgow, 1994-2023see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthybasebasebasee(c) The FFI task force 2001see libraries/base/LICENSEffi@haskell.org provisionalportable Trustworthy7The 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 .Computes the storage requirements (in bytes) of the argument. The value of the argument is not used.Computes the alignment constraint of the argument. An alignment constraint x+ is fulfilled by any address divisible by x. The alignment must be a power of two if this instance is to be used with alloca or  allocaArray*. The value of the argument is not used.Read 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.Write 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)) xRead a value from a memory location given by a base address and offset. The following equality holds: 0peekByteOff addr off = peek (addr `plusPtr` off)Write 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) x,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.Write the given value to the given memory location. Alignment restrictions might apply; see .basebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebasebase  7(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy;"A 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."An 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.".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."casts a Ptr to a WordPtr"casts a WordPtr to a Ptr"casts a Ptr to an IntPtr" casts an IntPtr to a Ptr""""""""""""""""""i(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthys Haskell type representing the C jmp_buf type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C fpos_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.) 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.) Haskell type representing the C time_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C clock_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C  sig_atomic_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.), See Note [Lack of signals on wasm32-wasi]. Haskell type representing the C wchar_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C size_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C  ptrdiff_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C double type. (The concrete types of Foreign.C.Types#platform are platform-specific.) 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.) Haskell type representing the C unsigned long long type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C  long long type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C  unsigned long type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C long type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C  unsigned int type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C int type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C unsigned short type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C short type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C  unsigned char type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C  signed char type. (The concrete types of Foreign.C.Types#platform are platform-specific.) Haskell type representing the C char type. (The concrete types of Foreign.C.Types#platform are platform-specific.)77j"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalnon-portable (requires POSIX) Trustworthy basebasebase base base base base base base base =="(c) The University of Glasgow 2005/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable TrustworthybaseThe  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  x.compare True FalseGT compare (Down True) (Down False)LTIf a has a n instance then the wrapped instance also respects the reversed ordering by exchanging the values of  and .minBound :: Int-9223372036854775808minBound :: Down IntDown 9223372036854775807All other instances of  a behave as they do for a.base %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 *clamp (low, high) a = min high (max a low) Function for ensuring the value a* is within the inclusive bounds given by low and high . If it is, a1 is returned unchanged. The result is otherwise low if a <= low, or high if  high <= a.When clamp is used at Double and Float, it has NaN propagating semantics in its second argument. That is, clamp (l,h) NaN = NaN, but clamp (NaN, NaN) x = x.clamp (0, 10) 22clamp ('a', 'm') 'x''m'base base base baseSwaps  and  of the underlying type.baseSwaps  and  of the underlying type.basebaseThis 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 removedbasebase base base basebasebasebasebasebasebasebasebasex>x>f4BSD-style (see the LICENSE file in the distribution)libraries@haskell.orgstable not portable Trustworthy )*/017 baseA case statement on .OrdCond c l e g is l when c ~ LT, e when c ~ EQ, and g when c ~ GT.base%Minimum between two comparable types.base%Maximum between two comparable types.base2Comparison (>) of comparable types, as a function.base2Comparison (<) of comparable types, as a function.base3Comparison (>=) of comparable types, as a function.base3Comparison (<=) of comparable types, as a function.base4Comparison (>) of comparable types, as a constraint.base4Comparison (<) of comparable types, as a constraint.base5Comparison (>=) of comparable types, as a constraint.base5Comparison (<=) of comparable types, as a constraint.baseOrdering data type for type literals that provides proof of their ordering.base= branches on the kind of its arguments to either compare by  or Nat./ Trustworthy()*/01baseThis 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.base#Subtraction of type-level naturals.base +Division (round down) of natural numbers. Div x 0+ is undefined (i.e., it cannot be reduced).base Modulus 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).baseA value-level witness for a type-level natural number. This is commonly referred to as a  singleton type, as for each n2, there is a single value that inhabits the type  n (aside from bottom).The definition of . is intentionally left abstract. To obtain an " value, use one of the following: The  method of .The SNat pattern synonym.The  function, which creates an  from a  number.base 8This type represents unknown type-level natural numbers.baseA type synonym for .Previously, this was an opaque data type, but it was changed to a type synonym.base7A explicitly bidirectional pattern synonym relating an  to a  constraint.As an  expression: Constructs an explicit  n value from an implicit  n constraint:  SNat @n ::  n =>  n As a pattern: Matches on an explicit  n value bringing an implicit  n constraint into scope: f :: , n -> .. f SNat = {- KnownNat n in scope -} base base base 6Convert an integer into an unknown type-level natural.baseWe either get evidence that this function was instantiated with the same type-level numbers, or .baseWe either get evidence that this function was instantiated with the same type-level numbers, or that the type-level numbers are distinct.baseLike , but if the numbers aren't equal, this additionally provides proof of LT or GT.base Return the  number corresponding to n in an  n value.baseConvert an explicit  n value into an implicit  n constraint.base Convert a  number into an  n value, where n' is a fresh type-level natural number.basebasebasebasebasebasebasebasebase0 Trustworthy()*/010baseThis class gives the string associated with a type-level symbol. There are instances of the class for every concrete literal: "hello", etc.basebase $Concatenation of type-level symbols.base9Extending a type-level symbol with a type-level characterbase#This type family yields type-level  storing the first character of a symbol and its tail if it is defined and  otherwise.base3Convert a character to its Unicode code point (cf. )base1Convert a Unicode code point to a character (cf. )baseA value-level witness for a type-level character. This is commonly referred to as a  singleton type, as for each c2, there is a single value that inhabits the type  c (aside from bottom).The definition of / is intentionally left abstract. To obtain an ! value, use one of the following: The  method of .The SChar pattern synonym.The  function, which creates an  from a .baseA value-level witness for a type-level symbol. This is commonly referred to as a  singleton type, as for each s2, there is a single value that inhabits the type  s (aside from bottom).The definition of / is intentionally left abstract. To obtain an ! value, use one of the following: The  method of .The SSymbol pattern synonym.The  function, which creates an  from a .0This type represents unknown type-level symbols.basebase7A explicitly bidirectional pattern synonym relating an  to a  constraint.As an  expression: Constructs an explicit  c value from an implicit  c constraint:  SChar @c ::  c =>  c As a pattern: Matches on an explicit  c value bringing an implicit  c constraint into scope: f :: . c -> .. f SChar = {- KnownChar c in scope -} base7A explicitly bidirectional pattern synonym relating an  to a  constraint.As an  expression: Constructs an explicit  s value from an implicit  s constraint: SSymbol @s ::  s =>  s As a pattern: Matches on an explicit  s value bringing an implicit  s constraint into scope: f :: 2 s -> .. f SSymbol = {- KnownSymbol s in scope -} basebasebasebasebase6Convert an integer into an unknown type-level natural.base3Convert a string into an unknown type-level symbol.base4Convert a character into an unknown type-level char.baseWe either get evidence that this function was instantiated with the same type-level symbols, or .baseWe either get evidence that this function was instantiated with the same type-level symbols, or that the type-level symbols are distinct.baseWe either get evidence that this function was instantiated with the same type-level characters, or .baseWe either get evidence that this function was instantiated with the same type-level characters, or that the type-level characters are distinct.baseLike , but if the symbols aren't equal, this additionally provides proof of LT or GT.baseLike , but if the Chars aren't equal, this additionally provides proof of LT or GT.base Return the  corresponding to n in an SNat n value. The returned  is always non-negative..For a version of this function that returns a Natural instead of an , see  in  GHC.TypeNats.baseAttempt to convert an  into an SNat n value, where n/ is a fresh type-level natural number. If the 9 argument is non-negative, invoke the continuation with Just sn, where sn is the SNat n value. If the 5 argument is negative, invoke the continuation with .;For a version of this function where the continuation uses 'SNat n instead of  (SNat n)@, see  in  GHC.TypeNats.base#Return the String corresponding to s in an  s value.baseConvert an explicit  s value into an implicit  s constraint.base Convert a  into an  s value, where s is a fresh type-level symbol.base Return the  corresponding to c in an  c value.baseConvert an explicit  c value into an implicit  c constraint.base Convert a  into an  c value, where c" is a fresh type-level character.basebasebasebasebasebasebasebasebasebasebasebasebasebase.(c) Universiteit Utrecht 2010-2011, University of Oxford 2012-2014see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy)*0137:=DRepresentable types of kind *+. This class is derivable in GHC with the  DeriveGeneric flag on.A * instance must satisfy the following laws: " . " D  " . " D  Representable 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  ,Class for datatypes that represent datatypes4Class for datatypes that represent data constructors*Class for datatypes that represent records-Void: used for datatypes without constructors-Unit: used for constructors without arguments-Used for marking occurrences of the parameterRecursive calls of kind * -> * (or kind k -> *, when  PolyKinds is enabled)7Constants, additional parameters and recursion of kind **Meta-information (constructor names, etc.)(Sums: encode choice between constructors3Products: encode multiple arguments to constructorsComposition of functorsTag for K1: recursion (of kind Type)Tag for M1: datatypeTag for M1: constructorTag for M1: record selector-Type synonym for encoding recursion (of kind Type)8Type synonym for encoding meta-information for datatypes;Type synonym for encoding meta-information for constructors?Type synonym for encoding meta-information for record selectorsGeneric representation typeGeneric representation typebase Constants of unlifted kindsbase Type synonym for  base Type synonym for  base Type synonym for  base Type synonym for  base Type synonym for  base Type synonym for  ;The ; 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.;Get a base type from a proxy for the promoted kind. For example, DemoteRep Bool will be the type Bool.;-Convert a singleton to its unrefined version.;A ;: constraint is essentially an implicitly-passed singleton.;;Produce the singleton explicitly. You will likely need the ScopedTypeVariables0 extension to use this method the way you want.;'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;A type whose instances are defined generically, using the  representation. " is a higher-kinded version of " that uses . V4 a pure a = V4 a a a a liftA2 :: (a -> b -> c) -> (V4 a -> V4 b -> V4 c) liftA2 () (V4 a1 b1 c1 d1) (V4 a2 b2 c2 d2) = V4 (a1  a2) (b1  b2) (c1  c2) (d1  d2) Historically this required modifying the type class to include generic method definitions (-XDefaultSignatures) and deriving it with the anyclass strategy (-XDeriveAnyClass). Having a /via type/ like "- decouples the instance from the type class."base?A datatype whose instances are defined generically, using the  representation. " is a higher-kinded version of " that uses .%Generic instances can be derived via " A using  -XDerivingVia. {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DerivingVia #-} import GHC.Generics (Generic) data V4 a = V4 a a a a deriving stock Generic deriving (Semigroup, Monoid) via Generically (V4 a) This corresponds to  and ) instances defined by pointwise lifting: instance Semigroup a => Semigroup (V4 a) where (<>) :: V4 a -> V4 a -> V4 a V4 a1 b1 c1 d1 <> V4 a2 b2 c2 d2 = V4 (a1 <> a2) (b1 <> b2) (c1 <> c2) (d1 <> d2) instance Monoid a => Monoid (V4 a) where mempty :: V4 a mempty = V4 mempty mempty mempty mempty Historically this required modifying the type class to include generic method definitions (-XDefaultSignatures) and deriving it with the anyclass strategy (-XDeriveAnyClass). Having a /via type/ like "- decouples the instance from the type class."/Convert from the datatype to its representation"/Convert from the representation to the datatype"/Convert from the datatype to its representation"/Convert from the representation to the datatype"The 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"base The 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."base The 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."base The 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."8Datatype to represent the associativity of a constructor"base This variant of " appears at the type level."Datatype to represent the fixity of a constructor. An infix | declaration directly corresponds to an application of "."The name of the constructor"The fixity of the constructor"%Marks if this constructor is a record"&The name of the datatype (unqualified)"The fully-qualified name of the module where the type is declared"base 9The package name of the module where the type is declared"base+Marks if the datatype is actually a newtype"%Get the precedence of a fixity value.;base  Used for marking occurrences of ;base  Used for marking occurrences of ;base  Used for marking occurrences of ;base  Used for marking occurrences of ;base  Used for marking occurrences of ;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 "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 #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 #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 $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;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;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 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""lNone0=S$base Monoid under . Alt l <> Alt r == Alt (l <|> r)ExamplesAlt (Just 12) <> Alt (Just 24)Alt {getAlt = Just 12}Alt Nothing <> Alt (Just 24)Alt {getAlt = Just 24}$Monoid under multiplication. )Product x <> Product y == Product (x * y)Examples Product 3 <> Product 4 <> memptyProduct {getProduct = 12}%mconcat [ Product n | n <- [2 .. 10]]Product {getProduct = 3628800}$Monoid under addition. Sum a <> Sum b = Sum (a + b)ExamplesSum 1 <> Sum 2 <> memptySum {getSum = 3} mconcat [ Sum n | n <- [3 .. 9]]Sum {getSum = 42}$!Boolean monoid under disjunction . Any x <> Any y = Any (x || y)ExamplesAny True <> mempty <> Any FalseAny {getAny = True}.mconcat (map (\x -> Any (even x)) [2,4,6,7,8])Any {getAny = True}Any False <> memptyAny {getAny = False}$!Boolean monoid under conjunction . All x <> All y = All (x && y)Examples All True <> mempty <> All False)All {getAll = False}.mconcat (map (\x -> All (even x)) [2,4,6,7,8])All {getAll = False}All True <> memptyAll {getAll = True}$.The monoid of endomorphisms under composition.  Endo f <> Endo g == Endo (f . g)Examples6let computation = Endo ("Hello, " ++) <> Endo (++ "!")appEndo computation "Haskell""Hello, Haskell!"(let computation = Endo (*3) <> Endo (+1)appEndo computation 16$The dual of a (, obtained by swapping the arguments of \. !Dual a <> Dual b == Dual (b <> a)ExamplesDual "Hello" <> Dual "World"Dual {getDual = "WorldHello"}*Dual (Dual "Hello") <> Dual (Dual "World").Dual {getDual = Dual {getDual = "HelloWorld"}}$This 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).$This 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)$This 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.$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%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) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy0=_e*%base *This data type witnesses the lifting of a  into an  pointwise.Examples!Ap (Just [1, 2, 3]) <> Ap NothingAp {getAp = Nothing}(Ap [Sum 10, Sum 20] <> Ap [Sum 1, Sum 2]Ap {getAp = [Sum {getSum = 11},Sum {getSum = 12},Sum {getSum = 21},Sum {getSum = 22}]}%)Maybe monoid returning the rightmost non- value.% a is isomorphic to $ (% a), and thus to $ ($  a)Data.Semigroup.". The former returns the last non-, so !x <> Data.Monoid.Last Nothing = x2. The latter simply returns the last value, thus >x <> Data.Semigroup.Last Nothing = Data.Semigroup.Last Nothing.Examples:Last (Just "hello") <> Last Nothing <> Last (Just "world")Last {getLast = Just "world"}Last Nothing <> memptyLast {getLast = Nothing}%(Maybe monoid returning the leftmost non- value.% a is isomorphic to $  a , but precedes it historically. Beware that  Data.Monoid.% is different from Data.Semigroup.#. The former returns the first non-, so "Data.Monoid.First Nothing <> x = x3. The latter simply returns the first value, thus Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing.Examples=First (Just "hello") <> First Nothing <> First (Just "world")First {getFirst = Just "hello"}First Nothing <> memptyFirst {getFirst = Nothing}%base%base %base%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 %base %base%base%base%base%base%base%base%base%base%base%base%base%base%base;base ;base <base<base<base<base#^_]\%%%%%%%%%$$$$$$$$$$$$$$$$$$$$$&]_^\$$$$$$$$$$$$$$$$$$%%%%%%$$$%%%D((c) The University of Glasgow, 1994-2000see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthy=a Byte ordering./most-significant-byte occurs in lowest address.0least-significant-byte occurs in lowest address.(The byte ordering of the target machine.&base &base &base &base &base &base <baser"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy:(baseThe ( function drops the largest suffix of a list in which the given predicate holds for all elements.LazinessThis function is lazy in spine, but strict in elements, which makes it different from    p  , which is strict in spine, but lazy in elements. For instance:+take 1 (dropWhileEnd (< 0) (1 : undefined))[1] 10) [1..20][1,2,3,4,5,6,7,8,9,10](\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.ExamplesstripPrefix "foo" "foobar" Just "bar"stripPrefix "foo" "foo"Just ""stripPrefix "foo" "barfoo"NothingstripPrefix "foo" "barfoobaz"Nothing(The ( function returns the index of the first element in the given list which is equal (by =) to the query element, or 4 if there is no such element. For the result to be , the list must be finite.ExampleselemIndex 4 [0..]Just 4elemIndex 'o' "haskell"NothingelemIndex 0 [1..]* hangs forever *(The ( function extends (, by returning the indices of all elements equal to the query element, in ascending order.ExampleselemIndices 'o' "Hello World"[4,7] elemIndices 1 [1, 2, 3, 1, 2, 3][0,3](The ( function takes a predicate and a list and returns the first element in the list matching the predicate, or 5 if there is no such element. For the result to be , the list must be finite.Examplesfind (> 4) [1..]Just 5find (< 0) [1..10]Nothing,find ('a' `elem`) ["john", "marcus", "paul"] Just "marcus"(The ( function takes a predicate and a list and returns the index of the first element in the list satisfying the predicate, or 4 if there is no such element. For the result to be , the list must be finite.Examples findIndex isSpace "Hello World!"Just 5findIndex odd [0, 2, 4, 6]NothingfindIndex even [1..]Just 1findIndex odd [0, 2 ..]* hangs forever *(The ( function extends (, by returning the indices of all elements satisfying the predicate, in ascending order.Examples+findIndices (`elem` "aeiou") "Hello World!"[1,4,7]findIndices (\l -> length l > 3) ["a", "bcde", "fgh", "ijklmnop"][1,3](\mathcal{O}(\min(m,n)). The (' function takes two lists and returns . iff the first list is a prefix of the second.Examples#"Hello" `isPrefixOf` "Hello World!"True#"Hello" `isPrefixOf` "Wello Horld!"FalseFor the result to be ", the first list must be finite; %, however, results from any mismatch:[0..] `isPrefixOf` [1..]False[0..] `isPrefixOf` [0..99]False[0..99] `isPrefixOf` [0..]True[0..] `isPrefixOf` [0..]* Hangs forever *(, shortcuts when the first argument is empty:isPrefixOf [] undefinedTrue(The (& function takes two lists and returns / iff the first list is a suffix of the second.Examples!"ld!" `isSuffixOf` "Hello World!"True#"World" `isSuffixOf` "Hello World!"FalseThe second list must be finite; however the first list may be infinite:[0..] `isSuffixOf` [0..99]False[0..99] `isSuffixOf` [0..]* Hangs forever *(The (& function takes two lists and returns  iff the first list is contained, wholly and intact, anywhere within the second.Examples,isInfixOf "Haskell" "I really like Haskell."True(isInfixOf "Ial" "I really like Haskell."FalseFor the result to be 7, the first list must be finite; for the result to be !, the second list must be finite:[20..50] `isInfixOf` [0..]True[0..] `isInfixOf` [20..50]False[0..] `isInfixOf` [0..]* Hangs forever *(\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.If there exists instance Ord a, it's faster to use nubOrd from the  containers package ( https://hackage.haskell.org/package/containers/docs/Data-Containers-ListUtils.html#v:nubOrd'link to the latest online documentation), which takes only \mathcal{O}(n \log d) time where d1 is the number of distinct elements in the list.Another approach to speed up ( is to use + Data.List.NonEmpty. . Data.List.NonEmpty. . (, which takes \mathcal{O}(n \log n) time, requires instance Ord a! and doesn't preserve the order.Examplesnub [1,2,3,4,3,2,1,2,4,3,5] [1,2,3,4,5]nub "hello, world!" "helo, wrd!"(The ( function behaves just like (, except it uses a user-supplied equality predicate instead of the overloaded = function.Examples.nubBy (\x y -> mod x 3 == mod y 3) [1,2,4,5,6][1,2,6])nubBy (/=) [2, 7, 1, 8, 2, 8, 1, 8, 2, 8][2,2,2](nubBy (>) [1, 2, 3, 2, 1, 5, 4, 5, 3, 2] [1,2,3,5,5](\mathcal{O}(n). ( x! removes the first occurrence of x from its list argument.It is a special case of (, which allows the programmer to supply their own equality test.Examplesdelete 'a' "banana""bnana"0delete "not" ["haskell", "is", "not", "awesome"]["haskell","is","awesome"](\mathcal{O}(n). The ( function behaves like (0, but takes a user-supplied equality predicate.ExamplesdeleteBy (<=) 4 [1..10][1,2,3,5,6,7,8,9,10]"deleteBy (/=) 5 [5, 5, 4, 3, 5, 2] [5,5,3,5,2](The ( 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.It is a special case of (, which allows the programmer to supply their own equality test.Examples"Hello World!" \\ "ell W" "Hoorld!">The second list must be finite, but the first may be infinite.take 5 ([0..] \\ [2..4]) [0,1,5,6,7]take 5 ([0..] \\ [2..])* Hangs forever *(The ( function returns the list union of the two lists. It is a special case of (, which allows the programmer to supply their own equality test.Examples"dog" `union` "cow""dogcw"If equal elements are present in both lists, an element from the first list will be used. If the second list contains equal elements, only the first one will be retained:import Data.Semigroup(Arg(..))#union [Arg () "dog"] [Arg () "cow"][Arg () "dog"]%union [] [Arg () "dog", Arg () "cow"][Arg () "dog"]However if the first list contains duplicates, so will the result:"coot" `union` "duck" "cootduk""duck" `union` "coot""duckot"(3 is productive even if both arguments are infinite.[0, 2 ..] `union` [1, 3 ..][0,2,4,6,8,10,12..(The (+ function is the non-overloaded version of (". Both arguments may be infinite.Examples(unionBy (>) [3, 4, 5] [1, 2, 3, 4, 5, 6] [3,4,5,4,5,6]import Data.Semigroup (Arg(..))+unionBy (/=) [Arg () "Saul"] [Arg () "Kim"][Arg () "Saul", Arg () "Kim"](The ( function takes the list intersection of two lists. It is a special case of (, which allows the programmer to supply their own equality test.Examples[1,2,3,4] `intersect` [2,4,6,8][2,4]If equal elements are present in both lists, an element from the first list will be used, and all duplicates from the second list quashed:import Data.Semigroup5intersect [Arg () "dog"] [Arg () "cow", Arg () "cat"][Arg () "dog"]However if the first list contains duplicates, so will the result."coot" `intersect` "heron""oo""heron" `intersect` "coot""o" If the second list is infinite, ( either hangs or returns its first argument in full. Otherwise if the first list is infinite, ( might be productive:intersect [100..] [0..][100,101,102,103...intersect [0] [1..]* Hangs forever *intersect [1..] [0]* Hangs forever *intersect (cycle [1..3]) [2] [2,2,2,2...(The (+ function is the non-overloaded version of (. It is productive for infinite arguments only if the first one is a subset of the second.(\mathcal{O}(n). The ( function takes an element and a list and `intersperses' that element between the elements of the list.Laziness( has the following properties0take 1 (intersperse undefined ('a' : undefined))"a"*take 2 (intersperse ',' ('a' : undefined))""a*** Exception: Prelude.undefinedExamplesintersperse ',' "abcde" "a,b,c,d,e"intersperse 1 [3, 4, 5] [3,1,4,1,5](( xs xss is equivalent to ( (( xs xss)). It inserts the list xs in between the lists in xss and concatenates the result.Laziness( has the following properties:4take 5 (intercalate undefined ("Lorem" : undefined))"Lorem"/take 6 (intercalate ", " ("Lorem" : undefined))&"Lorem*** Exception: Prelude.undefinedExamples,intercalate ", " ["Lorem", "ipsum", "dolor"]"Lorem, ipsum, dolor"*intercalate [0, 1] [[2, 3], [4, 5, 6], []][2,3,0,1,4,5,6,0,1]intercalate [1, 2, 3] [[], []][1,2,3](The (: function transposes the rows and columns of its argument.Laziness( is lazy in its elements5take 1 (transpose ['a' : undefined, 'b' : undefined])["ab"]Examplestranspose [[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]]9For this reason the outer list must be finite; otherwise ( hangs:transpose (repeat [])* Hangs forever *(The ( function takes a predicate and 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)Examples)partition (`elem` "aeiou") "Hello World!"("eoo","Hll Wrld!")partition even [1..10]([2,4,6,8,10],[1,3,5,7,9])partition (< 5) [1..10]([1,2,3,4],[5,6,7,8,9,10])(The (( 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.(, does not force accumulator if it is unused:take 1 (snd (mapAccumL (\_ x -> (undefined, x)) undefined ('a' : undefined)))"a"(The (( 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.(\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.Examplesinsert (-1) [1, 2, 3] [-1,1,2,3]insert 'd' "abcefg" "abcdefg"insert 4 [1, 2, 3, 5, 6, 7][1,2,3,4,5,6,7](\mathcal{O}(n) . The non-overloaded version of (.ExamplesinsertBy (\x y -> compare (length x) (length y)) [1, 2] [[1], [1, 2, 3], [1, 2, 3, 4]][[1],[1,2],[1,2,3],[1,2,3,4]](The (+ function is the non-overloaded version of , which 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.Examples4We can use this to find the longest entry of a list:maximumBy (\x y -> compare (length x) (length y)) ["Hello", "World", "!", "Longest", "bar"] "Longest"minimumBy (\(a, b) (c, d) -> compare (abs (a - b)) (abs (c - d))) [(10, 15), (1, 2), (3, 5)](10, 15)(The (+ function is the non-overloaded version of , which 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.Examples5We can use this to find the shortest entry of a list:minimumBy (\x y -> compare (length x) (length y)) ["Hello", "World", "!", "Longest", "bar"]"!"minimumBy (\(a, b) (c, d) -> compare (abs (a - b)) (abs (c - d))) [(10, 15), (1, 2), (3, 5)](1, 2)(\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 .ExamplesgenericLength [1, 2, 3] :: Int3 genericLength [1, 2, 3] :: Float3.0Users should take care to pick a return type that is wide enough to contain the full length of the list. If the width is insufficient, the overflow behaviour will depend on the (+) implementation in the selected w instance. The following example overflows because the actual list length of 200 lies outside of the Int8 range of  -128..127.genericLength [1..200] :: Int8-56(The (& function is an overloaded version of , which accepts any s) value as the number of elements to take.(The (& function is an overloaded version of , which accepts any s) value as the number of elements to drop.(The (& function is an overloaded version of , which accepts any s) value as the position at which to split.(The (& function is an overloaded version of , which accepts any s value as the index.(The (& function is an overloaded version of , which accepts any s, value as the number of repetitions to make.(The ( 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.(The ( 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.(The ( 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.(The ( 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.(The ( 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.(The ( 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.(The ( 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.(The ( 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.(The ( function takes a list of quadruples and returns four lists, analogous to .(The ( function takes a list of five-tuples and returns five lists, analogous to .(The ( function takes a list of six-tuples and returns six lists, analogous to .(The ( function takes a list of seven-tuples and returns seven lists, analogous to .(The ( function takes a predicate and two lists and returns the first list with the first occurrence of each element of the second list removed. This is the non-overloaded version of (. (\\) == deleteFirstsBy (==)>The second list must be finite, but the first may be infinite.Examples$deleteFirstsBy (>) [1..10] [3, 4, 5][4,5,6,7,8,9,10]%deleteFirstsBy (/=) [1..10] [1, 3, 5][4,5,6,7,8,9,10](The ( 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 is non-empty, all elements are equal to the first one, and consecutive equal elements of the input end up in the same element of the output list.( is a special case of (, which allows the programmer to supply their own equality test.It's often preferable to use Data.List.NonEmpty., which provides type-level guarantees of non-emptiness of inner lists. A common idiom to squash repeating elements +   ( is better served by + Data.List.NonEmpty.  Data.List.NonEmpty.& because it avoids partial functions.Examplesgroup "Mississippi"$["M","i","ss","i","ss","i","pp","i"]!group [1, 1, 1, 2, 2, 3, 4, 5, 5][[1,1,1],[2,2],[3],[4],[5,5]](The (+ function is the non-overloaded version of (.When a supplied relation is not transitive, it is important to remember that equality is checked against the first element in the group, not against the nearest neighbour:#groupBy (\a b -> b - a < 5) [0..19];[[0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14],[15,16,17,18,19]]It's often preferable to use Data.List.NonEmpty., which provides type-level guarantees of non-emptiness of inner lists.Examples(groupBy (/=) [1, 1, 1, 2, 3, 1, 4, 4, 5][[1],[1],[1,2,3],[1,4,4,5]]'groupBy (>) [1, 3, 5, 1, 4, 2, 6, 5, 4][[1],[3],[5,1,4,2],[6,5,4]]groupBy (const not) [True, False, True, False, False, False, True].[[True,False],[True,False,False,False],[True]](The ( function returns all initial segments of the argument, shortest first.( is semantically equivalent to +  .  ( (:)) []8, but under the hood uses a queue to amortize costs of .Laziness Note that () has the following strictness property: #inits (xs ++ _|_) = inits xs ++ _|_In particular, inits _|_ = [] : _|_Examples inits "abc"["","a","ab","abc"]inits [][[]]&inits is productive on infinite lists:take 5 $ inits [1..] [[],[1],[1,2],[1,2,3],[1,2,3,4]](\mathcal{O}(n). The ( function returns all final segments of the argument, longest first.Laziness Note that () has the following strictness property: tails _|_ = _|_ : _|_tails undefined![*** Exception: Prelude.undefined drop 1 (tails [undefined, 1, 2])[[1, 2], [2], []]Examples tails "abc"["abc","bc","c",""]tails [1, 2, 3][[1,2,3],[2,3],[3],[]]tails [][[]](The (? function returns the list of all subsequences of the argument.Laziness($ does not look ahead unless it must:take 1 (subsequences undefined)[[]]'take 2 (subsequences ('a' : undefined))["","a"]Examplessubsequences "abc"%["","a","b","ab","c","ac","bc","abc"]/This function is productive on infinite inputs:take 8 $ subsequences ['a'..]%["","a","b","ab","c","ac","bc","abc"]<The < function returns the list of all subsequences of the argument, except for the empty list.nonEmptySubsequences "abc""["a","b","ab","c","ac","bc","abc"](The (? function returns the list of all permutations of the argument.Note that the order of permutations is not lexicographic. It satisfies the following property: map (take n) (take (product [1..n]) (permutations ([1..n] ++ undefined))) == permutations [1..n]LazinessThe (' function is maximally lazy: for each n, the value of ( xs. starts with those permutations that permute  n xs and keep  n xs.Examplespermutations "abc"%["abc","bac","cba","bca","cab","acb"]permutations [1, 2] [[1,2],[2,1]]permutations [][[]]/This function is productive on infinite inputs:,take 6 $ map (take 3) $ permutations ['a'..]%["abc","bac","cba","bca","cab","acb"](The ( 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.The argument must be finite.Examplessort [1,6,4,3,2,5] [1,2,3,4,5,6]sort "haskell" "aehklls"import Data.Semigroup(Arg(..))sort [Arg ":)" 0, Arg ":D" 0, Arg ":)" 1, Arg ":3" 0, Arg ":D" 1]8[Arg ":)" 0,Arg ":)" 1,Arg ":3" 0,Arg ":D" 0,Arg ":D" 1](The (+ function is the non-overloaded version of (. The argument must be finite.The supplied comparison relation is supposed to be reflexive and antisymmetric, otherwise, e. g., for  _ _ -> GT, the ordered list simply does not exist. The relation is also expected to be transitive: if it is not then (? might fail to find an ordered permutation, even if it exists.ExamplessortBy (\(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. ( f is equivalent to ( ( 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  3https://en.wikipedia.org/wiki/Schwartzian_transformSchwartzian transform.Elements are arranged from lowest to highest, keeping duplicates in the order they appeared in the input.The argument must be finite.Examples1sortOn fst [(2, "world"), (4, "!"), (1, "Hello")]![(1,"Hello"),(2,"world"),(4,"!")]sortOn length ["jim", "creed", "pam", "michael", "dwight", "kevin"]0["jim","pam","creed","kevin","dwight","michael"]Performance notesThis function minimises the projections performed, by materialising the projections in an intermediate list.1For trivial projections, you should prefer using ( with , for example:/sortBy (comparing fst) [(3, 1), (2, 2), (1, 3)][(1,3),(2,2),(3,1)]Or, for the exact same API as (#, you can use `sortBy . comparing`:1(sortBy . comparing) fst [(3, 1), (2, 2), (1, 3)][(1,3),(2,2),(3,1)](base'Construct a list from a single element.Examplessingleton True[True]singleton [1, 2, 3] [[1,2,3]] singleton 'c'"c"(The ( 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 = NothingLaziness0take 1 (unfoldr (\x -> Just (x, undefined)) 'a')"a"Examples if b == 0 then Nothing else Just (b, b-1)) 10[10,9,8,7,6,5,4,3,2,1]:take 10 $ unfoldr (\(x, y) -> Just (x, (y, x + y))) (0, 1)[0,1,1,2,3,5,8,13,21,54](#Splits the argument into a list of lines stripped of their terminating \n characters. The \n terminator is optional in a final non-empty line of the argument string.0When the argument string is empty, or ends in a \n: character, it can be recovered by passing the result of ( to the ( function. Otherwise, (! appends the missing terminating \n. This makes unlines . lines  idempotent: 9(unlines . lines) . (unlines . lines) = (unlines . lines)Examples3lines "" -- empty input contains no lines[]'lines "\n" -- single empty line[""].lines "one" -- single unterminated line["one"]+lines "one\n" -- single non-empty line["one"]*lines "one\n\n" -- second line is empty ["one",""]1lines "one\ntwo" -- second line is unterminated ["one","two"])lines "one\ntwo\n" -- two non-empty lines ["one","two"]( Appends a \n character to each input string, then concatenates the results. Equivalent to foldMap (s -> s  "\n").Examplesunlines ["Hello", "World", "!"]"Hello\nWorld\n!\n" Note that (  (   when the input is not \n -terminated:unlines . lines $ "foo\nbar" "foo\nbar\n"(( breaks a string up into a list of words, which were delimited by white space (as defined by ). This function trims any white spaces at the beginning and at the end.Exampleswords "Lorem ipsum\ndolor"["Lorem","ipsum","dolor"]words " foo bar " ["foo","bar"]((3 joins words with separating spaces (U+0020 SPACE).(& is neither left nor right inverse of (:words (unwords [" "])[]unwords (words "foo\nbar") "foo bar"Examples#unwords ["Lorem", "ipsum", "dolor"]"Lorem ipsum dolor"!unwords ["foo", "bar", "", "baz"]"foo bar baz"+((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((+(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((,Ross Paterson 20054BSD-style (see the LICENSE file in the distribution)libraries@haskell.orgstableportable Trustworthy7<$TThe Foldable class represents data structures that can be reduced to a summary value one element at a time. Strict left-associative folds are a good fit for space-efficient reduction, while lazy right-associative folds are a good fit for corecursive iteration, or for folds that short-circuit after processing an initial subsequence of the structure's elements.7Instances can be derived automatically by enabling the DeriveFoldable extension. For example, a derived instance for a binary tree might be: {-# LANGUAGE DeriveFoldable #-} data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a) deriving Foldable0A more detailed description can be found in the Overview section of Data.Foldable#overview.For the class laws see the Laws section of Data.Foldable#laws.%0Given a structure with elements whose type is a !, combine them via the monoid's (\) operator. This fold is right-associative and lazy in the accumulator. When you need a strict left-associative fold, use % instead, with  as the map.Examples Basic usage:!fold [[1, 2, 3], [4, 5], [6], []] [1,2,3,4,5,6]1fold $ Node (Leaf (Sum 1)) (Sum 3) (Leaf (Sum 5))Sum {getSum = 9}Folds of unbounded structures do not terminate when the monoid's (\) operator is strict:fold (repeat Nothing)* Hangs forever *8Lazy corecursive folds of unbounded structures are fine:+take 12 $ fold $ map (\i -> [i..i+2]) [0..][0,1,2,1,2,3,2,3,4,3,4,5]6sum $ take 4000000 $ fold $ map (\i -> [i..i+2]) [0..] 2666668666666%Map each element of the structure into a monoid, and combine the results with (\). This fold is right-associative and lazy in the accumulator. For strict left-associative folds consider % instead.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]When a Monoid's (\)! is lazy in its second argument, % can return a result even from an unbounded structure. For example, lazy accumulation enables Data.ByteString.Builder to efficiently serialise large data structures and produce the output incrementally:*import qualified Data.ByteString.Lazy as L-import qualified Data.ByteString.Builder as B?let bld :: Int -> B.Builder; bld i = B.intDec i <> B.word8 0x200let lbs = B.toLazyByteString $ foldMap bld [0..] L.take 64 lbs"0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24"%base A left-associative variant of % that is strict in the accumulator. Use this method for strict reduction when partial results are merged via (\).Examples Define a  over finite bit strings under xor#. Use it to strictly compute the xor of a list of  values. !:set -XGeneralizedNewtypeDeriving2import Data.Bits (Bits, FiniteBits, xor, zeroBits)import Data.Foldable (foldMap')import Numeric (showHex)newtype X a = X a deriving (Eq, Bounded, Enum, Bits, FiniteBits)instance Bits a => Semigroup (X a) where X a <> X b = X (a `xor` b)instance Bits a => Monoid (X a) where mempty = X zeroBitslet bits :: [Int]; bits = [0xcafe, 0xfeed, 0xdeaf, 0xbeef, 0x5411]?(\ (X a) -> showString "0x" . showHex a $ "") $ foldMap' X bits"0x42"%?Right-associative fold of a structure, lazy in the accumulator.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, given an operator lazy in its right argument, %> can produce a terminating expression from an unbounded 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 []False7foldr (\c acc -> acc ++ [c]) "foo" ['a', 'b', 'c', 'd'] "foodcba"Infinite structures M Applying %2 to infinite structures usually doesn't terminate.=It may still terminate under one of the following conditions:(the folding function is short-circuiting3the folding function is lazy on its second argumentShort-circuiting() short-circuits on 9 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 operator is lazy in its second argument (the initial accumulator is never used in this case, and so could be left , but [] is more clear)::take 5 $ foldr (\i acc -> i : fmap (+3) acc) [] (repeat 1) [1,4,7,10,13]%base% is a variant of % that performs strict reduction from right to left, i.e. starting with the right-most element. The input structure must be finite, otherwise % runs out of space (diverges).If you want a strict right fold in constant space, you need a structure that supports faster than O(n), access to the right-most element, such as Seq from the  containers package.This method does not run in constant space for structures such as lists that don't support efficient right-to-left iteration and so require O(n) space to perform right-to-left reduction. Use of this method with such a structure is a hint that the chosen structure may be a poor fit for the task at hand. If the order in which the elements are combined is not important, use % instead.%Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.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. Like all left-associative folds, ( will diverge if given an infinite list.If you want an efficient strict left-fold, you probably want to use % instead of >. The reason for this is that the 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 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 . %ExamplesThe first example is a strict fold, which in practice is best performed with %.foldl (+) 42 [1,2,3,4]52Though the result below is lazy, the input is reversed before prepending it to the initial accumulator, so corecursion begins only after traversing the entire input string.'foldl (\acc c -> c : acc) "abcd" "efgh" "hgfeabcd"A left fold of a structure that is infinite on the right cannot terminate, even when for any finite input the fold just returns the initial accumulator:foldl (\a _ -> a) 0 $ repeat 1* Hangs forever *?WARNING: When it comes to lists, you always want to use either % or % instead.%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 structure to a single strict result (e.g. &).For a general 5 structure this should be semantically identical to,  foldl' f z =  f z . %% A variant of % that has no base case, and thus may only be applied to non-empty structures.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 *% A variant of % that has no base case, and thus may only be applied to non-empty structures.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 *%baseList of elements of a structure, from left to right. If the entire list is intended to be reduced via a fold, just fold the structure directly bypassing the list.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 Left-associative and lazy in both the initial element and the accumulator. Thus optimised for structures where the first element can be accessed in constant time. Structures where this is not the case should have a non-default implementation.Examples Basic usage:null []Truenull [1]False% is expected to terminate even for infinite structures. The default implementation terminates provided the structure is bounded on the left (there is a leftmost element). null [1..]False%base4Returns the size/length of a finite structure as an . The default implementation just counts elements starting with the leftmost. Instances for structures that can compute the element count faster than via element-by-element counting, should provide a specialised implementation.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]True7For infinite structures, the default implementation of % terminates if the sought-after 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.This function is non-total and will raise a runtime exception if the structure happens to be empty. A structure that supports random access and maintains its elements in order should provide a specialised implementation to return the maximum in faster than linear time.Examples Basic usage:maximum [1..10]10 maximum []**** Exception: Prelude.maximum: empty listmaximum Nothing'*** Exception: maximum: empty structureWARNING: This function is partial for possibly-empty structures like lists.%base+The least element of a non-empty structure.This function is non-total and will raise a runtime exception if the structure happens to be empty. A structure that supports random access and maintains its elements in order should provide a specialised implementation to return the minimum in faster than linear time.Examples Basic usage:minimum [1..10]1 minimum []**** Exception: Prelude.minimum: empty listminimum Nothing'*** Exception: minimum: empty structureWARNING: This function is partial for possibly-empty structures like lists.&baseThe &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 *& m b and f2 :: b -> m c, their Kleisli composition (f1 >=> f2) :: a -> m c is defined by: (f1 >=> f2) a = f1 a >>= f2Another way of thinking about foldrM* is that it amounts to an application to z of a Kleisli composition: 6foldrM f z t = f y >=> f x >=> ... >=> f b >=> f a $ zThe monadic effects of foldrM are sequenced from right to left, and e.g. folds of infinite lists will diverge."If at some step the bind operator (@)! short-circuits (as with, e.g.,  in a ), the evaluated effects will be from a tail of the element sequence. If you want to evaluate the monadic effects in left-to-right order, or perhaps be able to short-circuit after an initial sequence of elements, you'll need to use & instead.If the monadic effects don't short-circuit, the outermost application of f is to the leftmost element a, so that, ignoring effects, the result looks like a right fold: .a `f` (b `f` (c `f` (... (x `f` (y `f` z))))).Examples Basic usage:/let f i acc = do { print i ; return $ i : acc }foldrM f [] [0..3]3210 [0,1,2,3]& m b and f2 :: b -> m c, their Kleisli composition (f1 >=> f2) :: a -> m c is defined by: (f1 >=> f2) a = f1 a >>= f2Another way of thinking about foldlM* is that it amounts to an application to z of a Kleisli composition: foldlM f z t = flip f a >=> flip f b >=> ... >=> flip f x >=> flip f y $ zThe monadic effects of foldlM" are sequenced from left to right."If at some step the bind operator (@)! short-circuits (as with, e.g.,  in a ), the evaluated effects will be from an initial segment of the element sequence. If you want to evaluate the monadic effects in right-to-left order, or perhaps be able to short-circuit after processing a tail of the sequence of elements, you'll need to use & instead.If the monadic effects don't short-circuit, the outermost application of f is to the rightmost element y, so that, ignoring effects, the result looks like a left fold: +((((z `f` a) `f` b) ... `f` w) `f` x) `f` yExamples Basic usage:+let f a e = do { print e ; return $ e : a }foldlM f [] [0..3]0123 [3,2,1,0]&&Map 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 .& is just like &, but generalised to  actions.Examples Basic usage:'traverse_ print ["Hello", "world", "!"]"Hello""world""!"&& is & with its arguments flipped. For a version that doesn't ignore the results see  . This is & generalised to  actions.& is just like &, but generalised to  actions.Examples Basic usage:for_ [1..4] print1234&Map 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 .& is just like &%, but specialised to monadic actions.&& is & with its arguments flipped. For a version that doesn't ignore the results see .& is just like &%, but specialised to monadic actions.&Evaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see .& is just like &, but generalised to  actions.Examples Basic usage:4sequenceA_ [print "Hello", print "world", print "!"]"Hello""world""!"&Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see .& is just like &&, but specialised to monadic actions.&)The sum of a collection of actions using , generalizing &.& is just like &, but generalised to .Examples Basic usage:*asum [Just "Hello", Nothing, Just "World"] Just "Hello"&)The sum of a collection of actions using , generalizing &.& is just like &, but specialised to .ExamplesBasic usage, using the  instance for :*msum [Just "Hello", Nothing, Just "World"] Just "Hello"&>The concatenation of all the elements of a container of lists.Examples Basic usage:concat (Just [1, 2, 3])[1,2,3]concat (Left 42)[]#concat [[1, 2, 3], [4, 5], [6], []] [1,2,3,4,5,6]&Map 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]concatMap (take 3) (Just [1..])[1,2,3]&& 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,...Falseand (repeat True)* Hangs forever *&& 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,...Trueor (repeat False)* Hangs forever *&Determines 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 *&Determines 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 *&The 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"WARNING: This function is partial for possibly-empty structures like lists.&The 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"]"!"WARNING: This function is partial for possibly-empty structures like lists.&& 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 *&The & 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 45find (> 12) [1..7]Nothing&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&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%%%%%%%%%%%&&%7%%%%%%%%&&%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&n Safe-Inferred=&& ghc-internal7Enum representing closure types This is a mirror of: rtsincludertsstorageClosureTypes.h&'''''''''''&&&&&&&'&&&&&&&''&''''''''''''''''''''''&&&&&&&&'''''''&'&&&&&&&&&&&&&&&&&&&&&&&''''''''''''''''''''''''''''''''''''''''''m$Conor McBride and Ross Paterson 20054BSD-style (see the LICENSE file in the distribution)libraries@haskell.orgstableportable Trustworthy0=+&The & functor.Examples!fmap (++ "World") (Const "Hello") Const "Hello"/Because we ignore the second type parameter to &(, the Applicative instance, which has k: :: Monoid m => Const m (a -> b) -> Const m a -> Const m b essentially turns into Monoid m => m -> m -> m , which is \#Const [1, 2, 3] <*> Const [4, 5, 6]Const [1,2,3,4,5,6]&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 &&&&&& Trustworthy4<A priority search queue with Int keys and priorities of type p and values of type v.. It is strict in keys, priorities and values.<E k p binds the key k with the priority p.<We store masks as the index of the bit that determines the branching.<O(1) True if the queue is empty.<O(n), The number of elements stored in the queue.< O(min(n,W))+ The priority and value of a given key, or  if the key is not bound.<O(1)& The element with the lowest priority.<O(1) The empty queue.<O(1) Build a queue with one element.< O(min(n,W))> Insert a new key that is *not* present in the priority queue.<Link< 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.< 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.< O(min(n,W)) The expression alter f k queue alters the value x at k, or absence thereof. < can be used to insert, delete, or update a value in a queue. It also allows you to calculate an additional value b.<Smart constructor for a <, node whose left subtree could have become <.<Smart constructor for a <- node whose right subtree could have become <.<O(n) Convert a queue to a list of (key, priority, value) tuples. The order of the list is not specified.< 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.< O(min(n,W)) Retrieve the binding with the least priority, and the rest of the queue stripped of that binding.<Return 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.<-Internal function that merges two *disjoint* <#s that share the same prefix mask.<<<<<<<<<<<<<<<<<<<<<(c) Tamar Christina 2018/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable non-portableNone8p<4A type alias for timeouts, specified in nanoseconds.<A pair of an event and lifetimeHere we encode the event in the bottom three bits and the lifetime in the fourth bit.2base&The lifetime of an event registration.23the registration will be active for only one event2,the registration will trigger multiple times2 An I/O event.2Data is available to be read.2/The file descriptor is ready to accept a write.<*Another thread closed the file descriptor.<The longer of two lifetimes.<base<base <base<basemappend# takes the longer of two lifetimes.<base <base<base <base<base<base<base<base<base<<<<<<222<222<<<-(c) The University of Glasgow, CWI 2001--2011/BSD-style (see the file libraries/base/LICENSE) Trustworthy ()*/015K&ZConstruct 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.<Construct a representation for a type application that may be a saturated arrow type. This is renamed to mkTrApp in Type.Reflection.Unsafe<Used to make ` instance for things of kind Nat<Used to make `# instance for things of kind Symbol<Used to make `! instance for things of kind Char<For compiler use. The class > allows a concrete representation of a type to be calculated.?TypeRep is a concrete representation of a (monomorphic) type.  supports reasonably efficient equality. See Note [Grand plan for Typeable] in GHC.Tc.Instance.Typeable"A non-indexed type representation.<A < wraps up a  instance for explicit handling. For internal use: for defining  pattern.<:Invariant: Saturated arrow types (e.g. things of the form a -> b) are represented with < a b, not TrApp (TrApp funTyCon a) b.<TrFun fpr m a b represents a function type  a % m -> b. We use this for the sake of efficiency as functions are quite ubiquitous. A TrFun can represent `t1 -> t2` or `t1 -= t2`; but not (a => b) or (a ==> b). See Note [No Typeable for polytypes or qualified types] in GHC.Tc.Instance.Class and Note [Function type constructors and FunTy] in GHC.Builtin.Types.Prim We do not represent the function TyCon (i.e. (->) vs (-=>)) explicitly; instead, the TyCon is implicit in the kinds of the arguments.'Pattern 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 '#Pattern match on a type constructor'A 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).'The function type constructor. For instance, >typeRep @(Int -> Char) === Fun (typeRep @Int) (typeRep @Char) 'baseA explicitly bidirectional pattern synonym to construct a concrete representation of a type.As an  expression: Constructs a singleton  TypeRep a+ given a implicit 'Typeable a' constraint: &TypeRep @a :: Typeable a => TypeRep a As a pattern: Matches on an explicit  TypeRep a witness bringing an implicit  Typeable a constraint into scope. ;f :: TypeRep a -> .. f TypeRep = {- Typeable a in scope -} 'baseHelper to fully evaluate  for use as  NFData(rnf) implementation<Get a reified  instance from an explicit .For internal use: for defining  pattern.'base Observe the  of a type representation<Construct a representation for a type application that is NOT a saturated arrow type. This is not checked!'Use a  as  evidence.The  pattern synonym brings a 4 constraint into scope and can be used in place of '. f :: TypeRep a -> .. f rep = withTypeable {- Typeable a in scope -} f :: TypeRep a -> .. f TypeRep = {- Typeable a in scope -} 'Observe the type constructor of a quantified type representation.'5Observe the type constructor of a type representation'base  Type equality'baseType equality decision'Observe the kind of a type.<Is a type of the form TYPE rep?'baseTakes a value of type a5 and returns a concrete representation of that type.<2See Note [Small Ints parsing] in GHC.Builtin.Types'baseHelper to fully evaluate  for use as  NFData(rnf) implementation'base Helper to fully evaluate  for use as  NFData(rnf) implementation<Exquisitely unsafe.'Exquisitely unsafe.<An internal function, to make representations for type literals.<base <base<base< package name module name the name of the type constructornumber of kind variableskind representation A unique  object' package name module name the name of the type constructornumber of kind variableskind representation A unique  object Used when the strings are dynamically allocated, eg from binary deserialisation< package name module name tycon name>'''''''<RcbaseAn  containing no annotations.'Exception context represents a list of 's. These are attached to  SomeExceptions via  and can be used to capture various ad-hoc metadata about the exception including backtraces and application-specific context.,s can be merged via concatenation using the  instance or '.Note that GHC will automatically solve implicit constraints of type  with c.'base'.s are types which can decorate exceptions as .'.Render the annotation for display to the user.'baseConstruct a singleton  from an '.'base Retrieve all 's of the given type from an .'base Merge two s via concatenation'baseRender  to a human-readable .' ''c'''''''' 'c''''''''''o-(c) The University of Glasgow, CWI 2001--2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy )*/0X'!A quantified type representation.'6Observe a type representation for the type of a value.'baseTakes a value of type a5 and returns a concrete representation of that type.'Show a type representation'The type-safe cast operation'base*Extract a witness of equality of two types'baseDecide an equality of two types'base8Extract a witness of heterogeneous equality of two types'base+Decide heterogeneous equality of two types.'8A flexible variation parameterised in a type constructor' Cast over k1 -> k2' Cast over k1 -> k2 -> k3',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.'Build a function type.'Splits a type constructor application. Note that if the type constructor is polymorphic, this will not return the kinds that were used.'3Observe the argument types of a type representation'Observe the type constructor of a quantified type representation.'baseTakes a value of type a5 and returns a concrete representation of that type.'Force a ' to normal form.(''''''''''''''''''''''''''''''''(''''''''''''''''''''''''''''''''"((c) The University of Glasgow, 1998-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthy/iThe  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.'Arithmetic exceptions.'base(*Wraps a particular exception exposing its . Intended to be used when catching exceptions in cases where access to the context is desired.(Any 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 ( toException should produce a  with no attached .(base7Render this exception value in a human-friendly manner.Default implementation: .( View the  of a .( Add more  to a .(baseThis drops any attached .(base( ghc-internal(base(base(base(base((((c'(((''''''''((((((((((("(((((((((((((((('c'(('''''''E((c) The University of Glasgow, 1998-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthy 01l(#This is thrown when the user calls  . The first String is the argument given to  , second String is the location.(Throw an exception. Exceptions may be thrown from purely functional code, but may only be caught within the  monad.WARNING: You may want to use throwIO6 instead so that your pure code stays exception-free.(base(base(base(base(base+(((((((('''''''((((((0((((((((((((('''''''(((((((c) Tamar Christina 2019see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafet<An < is a synchronising variable, used for communication between concurrent threads, where one of the threads is controlled by an external state. e.g. by an I/O action that is serviced by the runtime. It can be thought of as a box, which may be empty or full.(It is mostly similar to the behavior of  except < doesn't block if the variable is full and the GC won't forcibly release the lock if it thinks there's a deadlock.The properties of IOPorts are: * Writing to an empty IOPort will not block. * Writing to an full IOPort will not block. It might throw an exception. * Reading from an IOPort for the second time might throw an exception. * Reading from a full IOPort will not block, return the value and empty the port. * Reading from an empty IOPort will block until a write. * Reusing an IOPort (that is, reading or writing twice) is not supported and might throw an exception. Even if reads and writes are interleaved.This type is very much GHC internal. It might be changed or removed without notice in future releases.< Create an < which is initially empty.< Create an <# which contains the supplied value.<$Atomically read the contents of the < . If the < is currently empty, <' will wait until it is full. After a <, the < is left empty.#There is one important property of <:+Only a single threads can be blocked on an <.<Put a value into an < . If the < is currently full, < will throw an exception.#There is one important property of <:*Only a single thread can be blocked on an <.<base<<<<<<< Safe-Inferredu+2Indicates a mode in which a file should be locked.+base Exception thrown by hLock. on non-Windows platforms that don't support flock.<base +++++<'(c) The University of Glasgow 1994-2023see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafe(Describes the behaviour of a thread when an asynchronous exception is received.(7asynchronous exceptions are unmasked (the normal state)(the state during (: asynchronous exceptions are masked, but blocking operations may still be interrupted(the state during ): asynchronous exceptions are masked, and blocking operations may not be interrupted(,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.("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 .( 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 .( Convert an  action to an  action. This relies on  and  having the same representation modulo the constraint on the state thread type parameter.( 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.html(Catch 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.(This 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 the opposite behaviour. This is ok, because ( is an  computation.( 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 Execute an  action, adding the given ExceptionContext' to any thrown synchronous exceptions.( 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:  throw e throwIO e `seq` () ===> ()+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. We say that (" throws *precise* exceptions and (, 5, etc. all throw *imprecise* exceptions. For example throw e + error "boom" ===> error "boom" throw e + error "boom" ===> throw eare both valid reductions and the compiler may pick any (loop, even), whereas (throwIO e >> error "boom" ===> throwIO ewill always throw e when executed.See also the  https://gitlab.haskell.org/ghc/ghc/-/wikis/exceptions/precise-exceptions#GHC wiki page on precise exceptions for a more technical introduction to how GHC optimises around precise vs. imprecise exceptions.(base 7Allow 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.( Returns the ( for the current thread.(Like (, but does not pass a restore action to the argument.(9Executes an IO computation with asynchronous exceptions masked. That is, any thread which attempts to raise an exception in the current thread with t 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 t& 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 .(Like ), but does not pass a restore action to the argument.)Like (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.)/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 C  x', analogous to the difference between ( and (. If the lazy value x throws an exception, C  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 C  x.)base)base(The computation to run+Handler to invoke if an exception is raised)-computation to run first ("acquire resource"),computation to run last ("release resource")computation to run in-between)computation to run first?computation to run afterward (even if an exception was raised)$()((())((((((((()((((((((($((((((((((((()((((((((()))"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable non-portable Trustworthy6An 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 6 may return a different 6 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.6Makes a 6 for an arbitrary object. The object passed as the first argument is not evaluated by 6.6 Convert a 6 to an . The . returned is not necessarily unique; several 6s may map to the same  (in practice however, the chances of this are small, so the result of 6 makes a good hash key).6base Equality on 6> that does not require that the types of the arguments match.6base6666666666"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable non-portableSafe66666666v"(c) The University of Glasgow 2008see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafe )A mutable variable in the  monad. import GHC.Internal.Data.IORefr <- newIORef 0 readIORef r0writeIORef r 1 readIORef r1atomicWriteIORef r 2 readIORef r2modifyIORef' r (+ 1) readIORef r3(atomicModifyIORef' r (\a -> (a + 1, ())) readIORef r4 See also  and .) Build a new ))Read the value of an ).Beware that the CPU executing a thread can reorder reads or writes to independent locations. See Data.IORef#memmodel for more details.)Write a new value into an ).This function does not create a memory barrier and can be reordered with other independent reads and writes within a thread, which may cause issues for multithreaded execution. In these cases, consider using u instead. See Data.IORef#memmodel for more details.)2Atomically apply a function to the contents of an )), installing its first component in the ) and returning the old contents and the result of applying the function. The result of the function application (the pair) is not forced. As a result, this can lead to memory leaks. It is generally better to use ).)2Atomically apply a function to the contents of an )), installing its first component in the ) and returning the old contents and the result of applying the function. The result of the function application (the pair) is forced, but neither of its components is.) A version of u0 that forces the (pair) result of the function.)3Atomically 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 ).)3Atomically apply a function to the contents of an ) and return the old and new values. The result of the function is forced.)&Atomically replace the contents of an ), returning the old contents.)baseA strict version of u-. This forces both the value stored in the ) and the value returned. Conceptually, ?atomicModifyIORef' ref f = do -- Begin atomic block old <- )) ref let r = f old new = fst r ) ref new -- End atomic block case r of (!_new, !res) -> pure res The actions in the "atomic block" are not subject to interference by other threads. In particular, the value in the ) cannot change between the ) and ) invocations."The new value is installed in the )# before either value is forced. So .atomicModifyIORef' ref (x -> (x+1, undefined))will increment the )4 and then throw an exception in the calling thread. ,atomicModifyIORef' ref (x -> (undefined, x))and 'atomicModifyIORef' ref (_ -> undefined)=will each raise an exception in the calling thread, but will also% install the bottoming value in the )), where it may be read by other threads.This function imposes a memory barrier, preventing reordering around the "atomic block"; see Data.IORef#memmodel for details.)basePointer equality. )))))))))))) ))))))))))))x((c) The University of Glasgow, 1992-2003see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions)Unsafew!<+A box around Weak#, private to this module.)A 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 either use the ccall or the capi calling convention.)Controls 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 | +------------+-----------------+)The 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].))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()5 any ancillary *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)))The 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.)Functions called when a ) is finalized. Note that C finalizers and Haskell finalizers cannot be mixed.)No 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.)Finalizers are all C functions.)%Finalizers are all Haskell functions.) 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 .)Turns a plain memory reference into a foreign object by associating a finalizer - given by the monadic operation - with the reference.When finalization is triggered by GC, 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 for GC-triggered finalization.5When finalization is triggered by explicitly calling finalizeForeignPtr, the finalizer will run immediately on the current Haskell thread.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.)"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 w with a finalizer.)This function is similar to ), except that the size of the memory required is given explicitly as a number of bytes.)This function is similar to ), except that the size and alignment of the memory required is given explicitly as numbers of bytes.)"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.)This 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.)This 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.)This 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.)Like ) but the finalizer is passed an additional environment parameter.),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 finalization is triggered by GC, the finalizer will run in a new thread. When finalization is triggered by explicitly calling finalizeForeignPtr, the finalizer will run immediately on the current Haskell 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 ).)Turns a plain memory reference into a foreign pointer that may be associated with finalizers by using ).)This 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.)This is similar to ) but comes with an important caveat: the user must guarantee that the continuation does not diverge (e.g. loop or throw an exception). In exchange for this loss of generality, this function offers the ability of GHC to optimise more aggressively.)Specifically, applications of the form:  unsafeWithForeignPtr fptr ( something) See GHC issue #17760 for more information about the unsoundness behavior that this function can result in.)This function ensures that the foreign object in question is alive at the given place in the sequence of IO actions. However, this comes with a significant caveat: the contract above does not hold if GHC can demonstrate that the code preceding touchForeignPtr diverges (e.g. by looping infinitely or throwing an exception). For this reason, you are strongly advised to use instead ) where possible.Also, 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.)This 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 w rather than combinations of ) and ). However, the latter routines are occasionally preferred in tool generated marshalling code.)This function casts a ). parameterised by one type into another type.)base 8Advances 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.)Causes the finalizers associated with a foreign pointer to be run immediately. The foreign pointer must not be used again after this function is called. If the foreign pointer does not support finalizers, this is a no-op.)base)base)base))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableUnsafef)Turns 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.)This 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 ).)This 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 .)This 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 .))))))))))))))))))))))))))))))))))))y"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableUnsafeG))w"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy))))))))))))))))))))))))))))))))))z"(c) The University of Glasgow 2008see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthyv)A 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.On Posix systems the I/O manager has an implicit reliance on doing a file read moving the file pointer. However on Windows async operations the kernel object representing a file does not use the file pointer offset. Logically this makes sense since operations can be performed in any arbitrary order. OVERLAPPED operations don't respect the file pointer offset as their intention is to support arbitrary async reads to anywhere at a much lower level. As such we should explicitly keep track of the file offsets of the target in the buffer. Any operation to seek should also update this entry.In order to keep us sane we try to uphold the invariant that any function being passed a Handle is responsible for updating the handles offset unless other behaviour is documented.)2slides the contents of the buffer to the beginning)base,)))))))))))))))))))))))))))))))))))))))))))),)))))))))))))))))))))))))))))))))))))))))))){((c) The University of Glasgow, 2008-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy(e)base)Stopped because the input contains insufficient available elements, or all of the input sequence has been successfully translated.)>Stopped because the output contains insufficient free elements)Stopped 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)A ) 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 .)Creates a means of encode characters into bytes: the result must not be shared between several character sequences or simultaneously across threads)Creates a means of decoding bytes into characters: the result must not be shared between several byte sequences or simultaneously across threads)a string that can be passed to  to create an equivalent ).)&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.)Resources associated with the encoding may now be released. The encode1 function may not be called again after calling close.)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.)The 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.*base*base*base)))*)*)*)*)*))))))))))))))))))) ))*****)))))))))))))))))))))))))"(c) The University of Glasgow 2008see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafe+An +. 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.+ Build a new ++Read a value from an ++Write a new value into an ++Read a value from an ++Write a new value into an ++base++++++++++++++++}((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthyr$*%A mode that determines the effect of   hdl mode i.*the position of hdl is set to i.*the position of hdl is set to offset i from the current position.*the position of hdl is set to offset i from the end of the file.*-Type of a device that can be used to back a  (see also F/). 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:*The 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).*A duplex communications channel (results in creation of a duplex ?). The standard libraries use this device type when creating s for open sockets.*>A file that may be read or written, and also may be seekable.*A "raw" (disk) device which supports block binary read and write operations and may be seekable only to positions of certain granularity (block- aligned).*+I/O operations required for implementing a .*ready 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.*closes the device. Further operations on the device should produce exceptions.*returns ( if the device is a terminal or console.*returns  if the device supports * operations.*+seek to the specified position in the data.*(return the current position in the data.*return the size of the data.*change the size of the data.*for terminal devices, changes whether characters are echoed on the device.*#returns the current echoing status.*some devices (e.g. terminals) support a "raw" mode where characters entered are immediately made available to the program. If available, this operation enables raw mode.* returns the * corresponding to this device.*duplicates the device, if possible. The new device is expected to share a file pointer with the original device (like Unix dup).*dup2 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).*A low-level I/O provider where the data is bytes in memory. The Word64 offsets currently have no effect on POSIX system or consoles where the implicit behaviour of the C runtime is assumed to move the file pointer on every read/write without needing an explicit seek.*Read up to the specified number of bytes starting from a specified offset, 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.*Read up to the specified number of bytes starting from a specified offset, returning the number of bytes actually read, or , if the end of the stream has been reached.*?Write the specified number of bytes starting at a given offset.*Write up to the specified number of bytes without blocking starting at a given offset. Returns the actual number of bytes written.*base*base*base*base*base*base*base ****************************************(****************************************~"(c) The University of Glasgow 2008see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy*The 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 *.*allocate 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.*reads 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.*reads bytes into the buffer without blocking. Returns the number of bytes read (Nothing indicates end-of-file), and the new buffer.*Prepares 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 *.*Flush all the data from the supplied write buffer out to the device. The returned buffer should be empty, and ready for writing.*Flush 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 Trustworthy0UHaskell 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 = only to itself; no attempt is made to compare the internal state of different handles for equality.*Specifies 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.*(the representation of newlines on output*'the representation of newlines on input*?The representation of a newline in the external file or stream.* '\n'* '\r\n'*Three 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.*"buffering is disabled if possible.*-line-buffering should be enabled if possible.*block-buffering should be enabled if possible. The size of the buffer is n items if the argument is  n+ and is otherwise implementation-dependent.*?The byte buffer just before we did our last batch of decoding.*>= writeFile might yield a different file. universalNewlineMode = NewlineMode { inputNL = CRLF, outputNL = nativeNewline }*>Use the native newline representation on both input and output nativeNewlineMode = NewlineMode { inputNL = nativeNewline outputNL = nativeNewline }*!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+base>**********)))*)*)*)*)*)**************************************?*************************************))*****)))))))***********None1<No-op implementation.<No-op implementation.<< #(c) The University of Glasgow, 2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy=B>(,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 .(In Haskell 2010, this is an opaque type.(Exceptions 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.( 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)+;An abstract type that contains a value for each variant of (.+filename the error is related to (some libraries may assume different encodings when constructing this field from e.g.  ByteString or other types)+$errno leading to this error, if any.+ error type specific information.+ location.+ what it was.+4the handle used by the action flagging the error.+1Defines the exit codes that a program can return.+!indicates successful termination;+indicates 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).+base Convert a Boolean in numeric representation to a Haskell value,=Allocate storage and marshal a storable value wrapped into a the  is used to represent , Converts a withXXX9 combinator into one marshalling a value wrapped into a , using  to represent .,/Convert a peek combinator into a one returning  if applied to a , Replicates a withXXX combinator over a list of objects, yielding a list of marshalled objects,Copies the given number of bytes from the second area (source) into the first (destination); the copied areas may not overlap,Copies 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., DestinationSource Size in bytes, DestinationSource Size in bytes ,,,,,,,,,,, ,,,,,,,,,,,(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthyn,Allocate storage for the given number of elements of a storable type (like , but for multiple elements).,Like ,, but add an extra position to hold a special termination element.,Like ,:, but allocated memory is filled with bytes of value zero.,Like ,;, but allocated memory is filled with bytes of value zero.,Temporarily allocate space for the given number of elements (like , but for multiple elements).,Like ,, but add an extra position to hold a special termination element.,Adjust the size of an array,Adjust the size of an array including an extra position for the end marker.,Convert an array of given length into a Haskell list. The implementation is tail-recursive and so uses constant stack space.,Convert an array terminated by the given end marker into a Haskell list,/Write the list elements consecutive into memory,Write the list elements consecutive into memory and terminate them with the given marker element,Write a list of storable elements into a newly allocated, consecutive sequence of storable values (like , but for multiple elements).,Write a list of storable elements into a newly allocated, consecutive sequence of storable values, where the end is fixed by the given end marker,=Temporarily store a list of storable values in memory (like , but for multiple elements).,Like ,, but the action gets the number of values as an additional parameter,Like ,1, but a terminator indicates where the array ends,Like ,1, but a terminator indicates where the array ends,Copy the given number of elements from the second array (source) into the first array (destination); the copied areas may not overlap,Copy the given number of elements from the second array (source) into the first array (destination); the copied areas may overlap,Return the number of elements in an array, excluding the terminator,?Advance a pointer into an array by the given number of elements,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,(c) The FFI task force 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableUnsafer*6Sometimes 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.66"(c) The University of Glasgow 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisional#non-portable (requires concurrency) Trustworthyyq6Turns a plain memory reference into a foreign object by associating a finalizer - given by the monadic operation - with the reference.When finalization is triggered by GC, 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 for GC-triggered finalization.5When finalization is triggered by explicitly calling finalizeForeignPtr, the finalizer will run immediately on the current Haskell thread.Note that references from a finalizer do not necessarily prevent another object from being finalized. If A's finalizer refers to B (perhaps using w, 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 w for more on finalizer ordering.6,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 w', 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 ).6666((c) The University of Glasgow, 2008-2011see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy -A string with explicit length information in bytes instead of a terminating NUL (allowing NUL characters in the middle of the string).-A C string is a reference to an array of C characters terminated by NUL.-8Marshal a NUL terminated C string into a Haskell string.->Marshal a C string with explicit length into a Haskell string.-8Marshal 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 .-Marshal a Haskell string into a C string (ie, character array) with explicit length information.;Note that this does not NUL terminate the resulting string.new storage is allocated for the C string and must be explicitly freed using  or .-Marshal 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.-Marshal a Haskell string into a C string (ie, character array) in temporary storage, with explicit length information.;Note that this does not NUL terminate the resulting string.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 Haskell string into a NUL-terminated 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 (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.-Marshal 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.-?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.<Encoding of CStringString in Haskell terms<Encoding of CString to createNull-terminate?String to encode/Worker that can safely use the allocated memory<Encoding of CString to createNull-terminate?String to encode ------------ ------------(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy-Marshal a C string with explicit length into a Haskell string.-8Marshal 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 .-Marshal 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 .-Marshal 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.-Marshal 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.-Convert a C byte, representing a Latin-1 character, to the corresponding Haskell character.-Convert a Haskell character to a C character. This function is only safe on the first 256 characters.- Convert a C  unsigned char, representing a Latin-1 character, to the corresponding Haskell character.-#Convert a Haskell character to a C  unsigned char:. This function is only safe on the first 256 characters.- Convert a C  signed char, representing a Latin-1 character, to the corresponding Haskell character.-#Convert a Haskell character to a C  signed char:. This function is only safe on the first 256 characters.-8Marshal a NUL terminated C string into a Haskell string.->Marshal a C string with explicit length into a Haskell string.-8Marshal 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 .-Marshal 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 .-Marshal 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.-Marshal 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.-=Marshal a NUL terminated C wide string into a Haskell string.-Marshal a C wide string with explicit length into a Haskell string.-=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 .-Marshal 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 .-Marshal 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.-Marshal 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 University of Glasgow, 1994-2000see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions)None=-base Parameters of the runtime system-base7Parameters pertaining to Haskell program coverage (HPC)-Controls whether the  program.tix< file should be written after the execution of the program.-base$Parameters pertaining to parallelism-base-Parameters pertaining to ticky-ticky profiler-base&Parameters pertaining to event tracing--trace user events (emitted from Haskell code)-"trace spark events 100% accurately-&trace spark events by a sampled method-&trace nonmoving GC heap census samples-trace GC events-trace scheduler events-show timestamp in stderr output-baseIs event tracing enabled?- no tracing-$send tracing events to the event log-send tracing events to stderr-base&Parameters of the cost-center profiler-base- ghc-internal-base-ticks between samples (derived)-time between samples-base,What sort of heap profile are we collecting?-base-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.. r.c coverage.z# stack squeezing & lazy blackholing. m. a.l the object linker. p. t. S. b. n. g. G. w. i. s.baseMiscellaneous parameters.:address to ask the OS for memory for the linker, 0 ==> off.base'Parameters concerning context switching.base$Parameters of the garbage collector.. address to ask the OS for memory.use "mostly mark-sweep" instead of copying for the oldest generation.True  = "compact all the time".base (The I/O SubSystem to use in the program..Use a POSIX I/O Sub-System.Use platform native Sub-System. For unix OSes this is the same as IoPOSIX, but on Windows this means use the Windows native APIs for I/O, including IOCP and RIO..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<Read a NUL terminated string. Return Nothing in case of a NULL pointer..Needed to optimize support for different IO Managers on Windows. See Note [The need for getIoManagerFlag].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............-----......................---------------------....................................---.................-------------------------------------------.--------------.------------........................................................................--------------------------------------------------------------------------...............#(c) The University of Glasgow, 2017see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy\.Conditionally execute an action depending on the configured I/O subsystem. On POSIX systems always execute the first action. On Windows execute the second action if WINIO as active, otherwise fall back to the first action..Infix version of . . posix  !% windows == conditional posix windows ../////... ////...../.(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy/Haskell representation for errno values. The implementation is deliberately exposed, to allow users to add their own definitions of / values./base/Yield  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 /./Get 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./Reset the current thread's errno value to /./ Throw an (' corresponding to the current value of /./ Throw an (' corresponding to the current value of / if the result value of the " action meets the given predicate./as /!, but discards the result of the  action after error handling./as /, but retry the ' action when it yields the error code / - this amounts to the standard retry loop for interrupted POSIX system calls./as /;, but additionally if the operation yields the error code / or /5, an alternative action is executed before retrying./as /, but discards the result./as /, but discards the result./ Throw an (' corresponding to the current value of / if the  action returns a result of -1./as /, but discards the result./ Throw an (' corresponding to the current value of / if the  action returns a result of -13, but retries in case of an interrupted operation./as /, but discards the result./as /-, but checks for operations that would block./as /, but discards the result./ Throw an (' corresponding to the current value of / if the  action returns ./ Throw an (' corresponding to the current value of / if the  action returns 1, but retry in case of an interrupted operation./as /-, but checks for operations that would block./as /9, but exceptions include the given path when appropriate./as /<, but exceptions include the given path when appropriate.0as /<, but exceptions include the given path when appropriate.0as /<, but exceptions include the given path when appropriate.0as /<, but exceptions include the given path when appropriate.0as /<, but exceptions include the given path when appropriate.0 Construct an ( based on the given / value. The optional information can be used to improve the accuracy of error messages.0base/)textual description of the error location//predicate to apply to the result value of the  operation#textual description of the locationthe  operation to be executed//predicate to apply to the result value of the  operation#textual description of the locationthe  operation to be executedaction to execute before retrying if an immediate retry would block0%the location where the error occurredthe error number)optional handle associated with the error+optional filename associated with the error////////////////////////////////////////////////////////////////////////////////////////////////////0/////////////////////0000///////////////////////////////////////////////////////////////////////////////////////////////////////////0//////////////////0000((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (requires POSIX) Trustworthy F0base0base0Return a known device type or throw an exception if the device type is unknown.0baseUnlike  statGetType, statGetType_maybe will not throw an exception if the CStat refers to a unknown device type.0Check an encoded ( for internal NUL octets as these are disallowed in POSIX filepaths. See #13660.0base The same as 0 , but an interruptible operation as described in Control.Exception @it respects ) but not (.We want to be able to interrupt an openFile call if it's expensive (NFS, FUSE, etc.), and we especially need to be able to interrupt a blocking open call. See #17912.0base/Consult the RTS to find whether it is threaded.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011100000000000000000000000100000((c) The University of Glasgow, 2008-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy1Construct 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.111111Unsafe-<Event notification backend.<Register interest in new events on a given file descriptor, set to be deactivated after the first event.<Register, modify, or unregister interest in the given events on the given file descriptor.<Poll backend for new events. The provided callback is called once per file descriptor with new events.<Returns ) if the modification succeeded. Returns  if this backend does not support event notifications on this type of file.<Returns ) if the modification succeeded. Returns  if this backend does not support event notifications on this type of file.< 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.<exchangePtr pptr x! swaps the pointer pointed to by pptr with the value x, returning the old value.<<<<<<<<<<<<<22<2<222<<< Trustworthy ƈ<=(c) Tamar Christina 2018/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable non-portableNone+A timeout registration cookie.+An edit to apply to a +.+Warning: since the + is called from the I/O manager, it must not throw an exception or block for a long period of time. In particular, be wary of t and : if the target thread is making a foreign call, these functions will block until the call completes.+5A priority search queue, with timeouts as priorities.++++++++++((c) The University of Glasgow, 1994-2023see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions)Noneʦ=Decode a single codepoint from a byte buffer indexed by the given indexing function.+'Decode a single character at the given .+0Decode a single codepoint starting at the given .+Decode a single codepoint starting at the given byte offset into a . ++++++++++ ++++++++++Unsafe͇=The label we use for finalization threads. We manually float this to the top-level to ensure that the ByteArray# can be shared.+Run a batch of finalizers from the garbage collector. We're given an array of finalizers and the length of the array, and we just call each one in turn.+baseGet the global action called to report exceptions thrown by weak pointer finalizers to the user.+baseSet the global action called to report exceptions thrown by weak pointer finalizers to the user.+baseAn exception handler for 2 finalization that prints the error to the given , but doesn't rethrow it.++++++++((c) The University of Glasgow, 1998-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafe+A 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 resurrect 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, MVar, and TVar. However, to place a finalizer on one of these types, you should use the specific operation provided for that type, e.g.  mkWeakIORef,  mkWeakMVar and  mkWeakTVar respectively. 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.+Establishes a weak pointer to k , with value v and a finalizer.?This is the most general interface for building a weak pointer.+>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.+Causes a the finalizer associated with a weak pointer to be run immediately.+keyvalue finalizerreturns: a weak pointer object++++++++++++++++u"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy+Make a + pointer to an )8, using the second argument as a finalizer to run when ) is garbage-collected+Mutate the contents of an ) , combining ) and )0. This is not an atomic update, consider using +0 when operating in a multithreaded environment.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 +0. This is not an atomic update, consider using )0 when operating in a multithreaded environment.+'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  instead is a good idea. Conceptually, >atomicModifyIORef ref f = do -- Begin atomic block old <- )) ref let r = f old new = fst r ) ref new -- End atomic block case r of (_new, res) -> pure res The actions in the section labeled "atomic block" are not subject to interference from other threads. In particular, it is impossible for the value in the ) to change between the ) and ) invocations.The user-supplied function is applied to the value stored in the )(, yielding a new value to store in the ) and a value to return. After the new value is (lazily) stored in the ), atomicModifyIORef forces the result pair, but does not force either component of the result. To force both components, use ). Note that &atomicModifyIORef ref (_ -> undefined)8will raise an exception in the calling thread, but will also% install the bottoming value in the )), where it may be read by other threads.This function imposes a memory barrier, preventing reordering around the "atomic block"; see Data.IORef#memmodel for details.+base Variant of ). The prefix "atomic" relates to a fact that it imposes a reordering barrier, similar to +. Such a write will not be reordered with other reads or writes even on CPUs with weak memory model. +++++))))) ))))+++)++|((c) The University of Glasgow, 2008-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy**base*The Unicode encoding of the current locale*baseThe encoding of the current locale, but allowing arbitrary undecodable bytes to be round-tripped through it.Do not expect the encoding to be Unicode-compatible: it could appear to be ASCII or anything else.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.String2The 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 2# encoding will result in an error.2The UTF-8 Unicode encoding2The UTF-8 Unicode encoding, with a byte-order-mark (BOM; the byte sequence 0xEF 0xBB 0xBF). This encoding behaves like 2, 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.2The UTF-16 Unicode encoding (a byte-order-mark should be used to indicate endianness).2+The UTF-16 Unicode encoding (little-endian)2(The UTF-16 Unicode encoding (big-endian)2The UTF-32 Unicode encoding (a byte-order-mark should be used to indicate endianness).2+The UTF-32 Unicode encoding (little-endian)2(The UTF-32 Unicode encoding (big-endian)2base>Set locale encoding for your program. The locale affects how s are encoded and decoded when serialized to bytes: e. g., when you read or write files (, !) or use standard input/output (, ). For instance, if your program prints non-ASCII characters, it is prudent to execute setLocaleEncoding utf8This is necessary, but not enough on Windows, where console is a stateful device, which needs to be configured using 'System.Win32.Console.setConsoleOutputCP and restored back afterwards. These intricacies are covered by  -https://hackage.haskell.org/package/code-page code-page( package, which offers a crossplatform System.IO.CodePage.withCodePage bracket.Wrong locale encoding typically causes error messages like "invalid argument (cannot decode byte sequence starting from ...)" or "invalid argument (cannot encode character ...)".2base2base2base=base=base2Internal encoding of argv2baseAn 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.22Look up the named Unicode encoding. May fail withs 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 criterion, 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".-22***2222222222222222)))*)*)*)*)*)))))))))))).))*****))))))))))))))))))222222222222***222222H"(c) The University of Glasgow 2011see libraries/base/LICENSEghc-devs@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.2.A cost-centre from GHC's cost-center profiler.24A cost-centre stack from GHC's cost-center profiler.2Returns the current 2 (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).2Get the 2! associated with the given value.2Run 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.2Get the 2 at the head of a 2.2Get the tail of a 2.3Get the label of a 2.3Get the module of a 2.3Get the source span of a 2.3 Format a 2 as a list of lines.3base*Get the stack trace attached to an object.33322322233223222222233333 "(c) The University of Glasgow 2011see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy%& ghc-internal Pretty print a . ghc-internal Pretty print a .5baseLike the function , but appends a stack trace to the error message if one is available.5base &Pop the most recent call-site off the .This function, like a, has no effect on a frozen .5base Return the current .$Does *not* include the call-site of 5.5base ;Perform some computation without adding new entries to the .%555533322322233`a22%535`5a5222222233333 Trustworthy5base5555555555555555555555555555555555"(c) The University of Glasgow 2011see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy 6baseGet information about where a value originated from. This information is stored statically in a binary when -finfo-table-map is enabled. The source positions will be greatly improved by also enabled debug information with -g3. Finally you can enable -fdistinct-constructor-tables to get more precise information about data constructor allocations.The information is collect by looking at the info table address of a specific closure and then consulting a specially generated map (by -finfo-table-map) to find out where we think the best source position to describe that info table arose from.655555555555555555555555556555 Trustworthy w6 Computation 6 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).66 Trustworthy%&=insertWith 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.=.Used to undo the effect of a prior insertWith.=Remove the given key from the table and return its associated value.======= Trustworthy=;Precondition: continuation must not diverge due to use of ).=Reads n elements from the pointer and copies them into the array.=Copy part of the source array into the destination array. The destination array is resized if not large enough.=Copy part of the source array into the destination array. The destination array is resized if not large enough.=Computes 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.==================== Trustworthy =Create a new epoll backend.=Change the set of events we are interested in for a given file descriptor.=Select 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.=Create 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 finished=base=base=base=base=base=base=statetimeout in milliseconds I/O callback=="(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable non-portable Trustworthy6,An abstract unique object. Objects of type 6< may be compared for equality and ordering and hashed into .:{do x <- newUnique print (x == x) y <- newUnique print (x == y):}TrueFalse6Creates a new object of type 6. The value returned will not compare equal to any other value of type 6 returned by previous calls to 6-. There is no limit on the number of times 6 may be called.6 Hashes a 6 into an . Two 6s may hash to the same value, although in practice this is unlikely. The ! returned makes a good hash key.666666(c) Sven Panne 2002-2004/BSD-style (see the file libraries/base/LICENSE)sven.panne@aedion.de provisionalportable Trustworthy6A memory pool.6Allocate a fresh memory pool.6Deallocate a memory pool and everything which has been allocated in the pool itself.6Execute an action with a fresh memory pool, which gets automatically deallocated (including its contents) after the action has finished.6Allocate 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.6:Allocate the given number of bytes of storage in the pool.6Adjust the storage area for an element in the pool to the given size of the required type.6Adjust the storage area for an element in the pool to the given size. Note that the previously allocated space is still retained in the same 6) and will only be freed when the entire 6 is freed.6Allocate storage for the given number of elements of a storable type in the pool.6Allocate 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.6.Adjust the size of an array in the given pool.6Adjust the size of an array with an end marker in the given pool.6Allocate storage for a value in the given pool and marshal the value into this storage.6Allocate consecutive storage for a list of values in the given pool and marshal these values into it.6Allocate consecutive storage for a list of values in the given pool and marshal these values into it, terminating the end with the given marker.666666666666666666666666666666(c) The FFI task force 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafe,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,66666666666666666666,,,,,,,,,,,6"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy)*%[3Converts 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)+A 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 [).}ing a value of type + returns a pretty-printed representation of the object's type; useful for debugging.+ Converts a + object back into an ordinary Haskell value of the correct type. See also +.+ Converts a + object back into an ordinary Haskell value of the correct type. See also +.+base+base+the dynamically-typed objecta default valuereturns: the value of the first argument, if it has the correct type, otherwise the value of the second argument.+the dynamically-typed object returns:  a=, if the dynamically-typed object has the correct type (and a is its value), or  otherwise. +++++[++ ++[+++++_((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions)Unsafe iThe current status of a thread+the thread is currently runnable or runningthe thread has finished&the thread is blocked on some resource)the thread received an uncaught exception blocked on 6blocked on a computation in progress by another thread blocked in 1 blocked in 1 in an STM transactioncurrently in a foreign call)blocked on some other resource. Without  -threaded , I/O and  show up as , with  -threaded they show up as .Shared memory locations that support atomic memory transactions.A 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 would be difficult to correct while continuing to support .base sets the label of a thread to the given UTF-8 encoded string contained in a ./Query the current execution status of a thread. Returns the " of the calling thread (GHC only). 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 ).The newly created thread has an exception handler that discards the exceptions +, +, and +, and passes all other exceptions to the uncaught exception handler.WARNING: Exceptions in the new thread will not be rethrown in the thread that created it. This means that you might be completely unaware of the problem if/when this happens. You may want to use the  )https://hackage.haskell.org/package/asyncasync library instead.1.A monad supporting atomic memory transactions.1baseMap a thread to an integer identifier which is unique within the current process.1baseEvery thread has an allocation counter that tracks how much memory has been allocated by the thread. The counter is initialized to zero, and 1 sets the current value. The allocation counter counts *down*, so in the absence of a call to 1 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 1.!Use it as a resource limit. See 1.8Allocation accounting is accurate only to about 4Kbytes.1baseReturn the current value of the allocation counter for the current thread.1baseEnables 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.1base;Disable allocation limit processing for the current thread.1baseLike , 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.1baseLike , but lets you specify on which capability the thread should run. Unlike a  thread, a thread created by 1; will stay on the same capability for its entire lifetime ( threads can migrate between capabilities according to the scheduling policy). 1 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 1). Typically capabilities correspond to physical processors, but the exact behaviour is implementation-dependent. The value passed to 1 is interpreted modulo the total number of capabilities as returned by 1.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).1baseLike 1<, but the child thread is pinned to the given CPU, as with 1.1the 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 1<, because the number of capabilities might vary at runtime.1baseReturns the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. To change this value, use 1.1baseSet the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. The number passed to 1 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.1base/Returns the number of CPUs that the machine has1>Returns the number of sparks currently in the local spark pool11 raises the +* exception in the given thread (GHC only). )killThread tid = throwTo tid ThreadKilled11? raises an arbitrary exception in the target thread (GHC only).Exception delivery synchronizes between the source and target thread: 1 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 1 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 1 will cause the RTS to attempt to cause the call to return; see the GHC documentation for more details.!Important note: the behaviour of 1 differs from that described in the paper "Asynchronous exceptions in Haskell" ( =http://research.microsoft.com/~simonpj/Papers/asynch-exns.htm). In the paper, 1 is non-blocking; but the library implementation adopts a more synchronous design in which 1 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, 1 is therefore interruptible (see Section 5.3 of the paper). Unlike other interruptible operations, however, 1 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 1.If the target of 1: is the calling thread, then the behaviour is the same as t, 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 1 is called with the current thread as the target, the exception will be thrown even if the thread is currently inside ( or ).1The 1 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.11 stores a string as identifier for this thread. 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). It also emits an event to the RTS eventlog.10Internal function used by the RTS to run sparks.1base0List the Haskell threads of the current process.1baseReturns 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.1base%Query the label of thread, returning ) if the thread's label has not been set.1baseMake 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 1. 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.1Unsafely 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 1, 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 1 can expose it.1+Perform a series of STM actions atomically.Using 1 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 1 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: 1, , , , , and .Using  inside of 13 is also dangerous but for different reasons. See 1 for more on this.1Retry 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)1/Compose two alternative STM actions (GHC only).If the first action completes without retrying then it forms the result of the 1. Otherwise, if the first action retries, then the second action is tried in its place. If both actions retry then the 1 as a whole retries.1 A variant of (" that can only be used within the 1 monad.Throwing an exception in STM aborts the transaction and propagates the exception. If the exception is caught via 1, only the changes enclosed by the catch are rolled back; changes made outside of 1 persist.-If the exception is not caught inside of the 1, it is re-thrown by 1, and the entire 1 is rolled back. Although 1/ 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, 1 will only cause an exception to be raised when it is used within the 1 monad. The 1) variant should be used in preference to (# to raise an exception within the 1= monad because it guarantees ordering with respect to other 1 operations, whereas ( does not.1&Exception handling within STM actions.1 m f! catches any exception thrown by m using 1, 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.1 Create a new  holding a value supplied1IO version of 1*. This is useful for creating top-level s using , because using 1 inside  isn't possible.1%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 .1%Return the current value stored in a .1 Write the supplied value into a .1 Provide an % action with the current value of an . The < will be empty for the duration that the action is running.1Modify the value of an .1base1base1base1baseTakes the first non-1ing 1 action.1baseTakes the first non-1ing 1 action.1base1base1base1base1base1base1base1base1base1base1base1base11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthyl5base/Triggers an immediate minor garbage collection.5baseTriggers an immediate major garbage collection, ensuring that collection finishes before returning.5base/Triggers an immediate major garbage collection.5/Triggers an immediate major garbage collection.1111555555551111None p5Representation for the source location where a return frame was pushed on the stack. This happens every time when a  case ... of scrutinee is evaluated.5base5A frozen snapshot of the state of an execution stack.5base'Clone the stack of the executing thread5base.Clone the stack of a thread identified by its 5base Decode a 5 to a stacktrace (a list of 5). The stack trace is created from return frames with according  InfoProvEnt. entries. To generate them, use the GHC flag -finfo-table-map. If there are no  InfoProvEnt$ entries, an empty list is returned. Please note: To gather 55 from libraries, these have to be compiled with -finfo-table-map, too.Due to optimizations by GHC (e.g. inlining) the stacktrace may change with different GHC parameters and versions.The stack trace is empty (by design) if there are no return frames on the stack. (These are pushed every time when a  case ... of scrutinee is evaluated.) 555555555555 555555555555((c) The University of Glasgow, 1994-2001see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy%&wj 3Add a finalizer to a 4. Specifically, the finalizer will be added to the % of a file handle or the write-side 7 of a duplex handle. See Handle Finalizers for details.= Just like *, but interleaves calls to * with calls to *. in order to make as much progress as possible3syncs 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.34flushes the Char buffer only. Works on all Handles.=Make an  * for use in a . This function does not install a finalizer; that must be done by the caller.3 makes a new  without a finalizer.3 makes a new 3like 3, 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.3like 3, 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.3This function exists temporarily to avoid an unused import warning in  bytestring.3.the underlying IO device, which must support *, * and a string describing the :, e.g. the file path for a file. Used in error messages.3.the underlying IO device, which must support *, * and a string describing the :, e.g. the file path for a file. Used in error messages.-333333333333333333333333333333333333333333333-333333333333333333333333333333333333333333333"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable"non-portable (extended exceptions) Trustworthy9&1baseThrown when the program attempts a continuation capture, but no prompt with the given prompt tag exists in the current continuation.1)Thrown when the program attempts to call  atomically , from the stm" package, inside another call to  atomically.1Thrown 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.1base An 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.1A 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.1A 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.1,An uninitialised record field was used. The String gives information about the source location where the record was constructed.1A 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.1A pattern match failed. The String= gives information about the source location of the pattern.1 The function 1 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 (, 1, etc.1 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)) $ ...1 A version of 1) with the arguments swapped around (see 1).1This function maps one exception into another as proposed in the paper "A semantics for imprecise exceptions".1 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)1 A variant of 1 that takes an exception predicate to select which exceptions are caught (c.f. 1). If the exception does not match the predicate, it is re-thrown.1Like 1, but only performs the final action if there was an exception raised by the computation.1When you want to acquire a resource, do some work with it, and then release the resource, it is a good idea to use 1 , because 1 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 1= 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 1< are in this order so that we can partially apply it, e.g.: 8withFile name mode = bracket (openFile name mode) hClose&Bracket wraps the release action with (, which is sufficient to ensure that the release action executes to completion when it does not invoke any interruptible actions, even in the presence of asynchronous exceptions. For example, hClose is uninterruptible when it is not racing other uses of the handle. Similarly, closing a socket (from "network" package) is also uninterruptible under similar conditions. An example of an interruptible action is 1. Completion of interruptible release actions can be ensured by wrapping them in (7, but this risks making the program non-responsive to  Control-C, or timeouts. Another option is to run the release action asynchronously in its own thread: 1void $ uninterruptibleMask_ $ forkIO $ do { ... }The resource will be released as soon as possible, but the thread that invoked bracket will not block in an uninterruptible state.1A specialised variant of 1+ with just a computation to run afterward.1 A variant of 1 where the return value from the first computation is not required.1Like 1, but only performs the final action if there was an exception raised by the in-between computation.1base1base1base1base1base1base1base1base1base1base1base 1base 1base1base1base1base1base1base1Predicate to select exceptionsComputation to runHandler1-computation to run first ("acquire resource"),computation to run last ("release resource")computation to run in-between1computation to run first?computation to run afterward (even if an exception was raised)1-computation to run first ("acquire resource"),computation to run last ("release resource")computation to run in-between 111111111111111(()(((()(+++  111111111111111111((('''''''((((((((((++++++++++++++++++++++(++((((((((((('''''''++++++++++++++1111++++++++++++1111111111((((1111((+1(111111)1(()(((((( 1111  111s"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy 1baseThe construct 1 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 t from Control.Exception.1 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.1An error indicating that an ? operation failed because one of its arguments already exists.1An error indicating that an ? operation failed because one of its arguments does not exist.1An 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).1An error indicating that an . operation failed because the device is full.1An error indicating that an < operation failed because the end of file has been reached.1An error indicating that an  operation failed because the operation was not possible. Any computation which returns an  result may fail with 1. In some cases, an implementation will not be able to distinguish between the possible error causes. In this case it should fail with 1.1An error indicating that an  operation failed because the user does not have sufficient operating system privilege to perform that operation.23A programmer-defined error value constructed using (.2baseAn error indicating that the operation failed because the resource vanished. See 2.2I/O error where the operation failed because one of its arguments already exists.2I/O error where the operation failed because one of its arguments does not exist.2I/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.2I/O error where the operation failed because the device is full.2I/O error where the operation failed because the end of file has been reached.2.I/O error where the operation is not possible.2I/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.2%I/O error that is programmer-defined.2baseI/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.2I/O error where the operation failed because one of its arguments already exists.2I/O error where the operation failed because one of its arguments does not exist.2I/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.2I/O error where the operation failed because the device is full.2I/O error where the operation failed because the end of file has been reached.2.I/O error where the operation is not possible.2I/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.2%I/O error that is programmer-defined.2baseI/O error where the operation failed because the resource vanished. See 2.2 Catch any (> that occurs in the computation and throw a modified version.2Adds 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.2baseThe 23 function establishes a handler that receives any (# raised in the action protected by 2. 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. s ) 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 t from Control.Exception..+(222222222222222222121212121212122222122212(+.((121111111222222222222+222222222222222222+212R"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable:non-portable (requires universal quantification for runST)Unsafe2Allow the result of an 9 computation to be used (lazily) inside the computation. Note that if f is strict, 2 f = _|_. 2((( 2(((4"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable:non-portable (requires universal quantification for runST) Trustworthy2(2(t"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable"non-portable (extended exceptions) Trustworthyc2You need this when using 2.2Sometimes 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 2, which would be used thus: f = expr `catches` [Handler (\ (ex :: ArithException) -> handleArith ex), Handler (\ (ex :: IOException) -> handleIO ex)]2baseWhen 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.2base 12211111111111(()((((()(+++221111111111111111((('''''''((((((((((++++++++++++++++++++(++((((((((((('''''''++++++++++++++1111++++++++++1111111111((((11((+1(22211111)1(()(((((((2 11111((c) The University of Glasgow, 1992-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy%&^  The same as 3, but adds a newline character.3 Computation 3 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 3 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:1% 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.3 Computation 3 hdl8 reads a character from the file or channel managed by hdl*, blocking until a character is available.This operation may fail with:1% if the end of file has been reached.3 Computation 3 hdl3 reads a line from the file or channel managed by hdl. 33 does not return the newline as part of the result.-A line is separated by the newline set with  or * by default. The read newline character(s) are not returned as part of the result.If 3 encounters end-of-file at any point while reading in the middle of a line, it is treated as a line terminator and the (partial) line is returned.This operation may fail with:18 if the end of file is encountered when reading the first character of the line.Examples8withFile "/home/user/foo" ReadMode hGetLine >>= putStrLn%this is the first line of the file :O, as it closes all of its control resources when it finishes.=To 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.=Register 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.2registerFd 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 2.=Wake up the event manager.2Drop a previous file descriptor registration, without waking the event manager thread. The return value indicates whether the event manager ought to be woken.2-Drop a previous file descriptor registration.2Close a file descriptor in a race-safe way. It might block, although for a very short time; and thus it is interruptible by asynchronous exceptions.=Close 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.=>Call the callbacks corresponding to the given file descriptor.=base=base=base=base22==2===2==2===22=22222==222Y Trustworthybase Return monotonic time in nanoseconds, since some unspecified starting pointbase Return monotonic time in seconds, since some unspecified starting point Trustworthy 2The event manager state.=Create a new event manager.=8Asynchronously shuts down the event manager, if running.=Start handling events. This function loops until told to stop, using =.Note%: This loop can only be run once per 2>, as it closes all of its control resources when it finishes.=Wake up the event manager.2Register 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.Be careful not to exceed maxBound :: Int, which on 32-bit machines is only 2147483647 s, less than 36 minutes.2Unregister an active timeout.2Update an active timeout to fire in the given number of microseconds.Be careful not to exceed maxBound :: Int, which on 32-bit machines is only 2147483647 s, less than 36 minutes.=base=base======2==22=++2= Trustworthy =Suspends 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.Be careful not to exceed maxBound :: Int, which on 32-bit machines is only 2147483647 s, less than 36 minutes.=Set the value of returned TVar to True after a given number of microseconds. The caveats associated with threadDelay also apply.Be careful not to exceed maxBound :: Int, which on 32-bit machines is only 2147483647 s, less than 36 minutes.=Block 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 =, use =.=Block 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 =, use =.=2Close a file descriptor in a concurrency-safe way.9Any threads that are blocked on the file descriptor via = or =3 will be unblocked by having IO exceptions thrown.=Allows 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 =, use =.=Allows 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 =, use =.2Retrieve 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.=The ioManagerLock protects the = value: Only one thread at a time can start or shutdown event managers.=Action that performs the close.File descriptor to close. ===22=======((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthy2baseInterrupts the current wait of the I/O manager if it is currently blocked. This instructs it to re-read how much it should wait and to process any pending events.2Block 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 2.2Block 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 2.2Returns 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.2Returns 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.2Close a file descriptor in a concurrency-safe way (GHC only). If you are using 2 or 2 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 2 or 23 will be unblocked by having IO exceptions thrown.2Suspends 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.Be careful not to exceed maxBound :: Int, which on 32-bit machines is only 2147483647 s, less than 36 minutes. Consider using %Control.Concurrent.Thread.Delay.delay from unbounded-delays package.2Switch the value of returned  from initial value  to  after a given number of microseconds. The caveats associated with 2 also apply.Be careful not to exceed maxBound :: Int, which on 32-bit machines is only 2147483647 s, less than 36 minutes.2.Low-level action that performs the real close.File descriptor to close. 2222222222 2222222222((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy2%On Unix we need to know whether this 2 has  O_NONBLOCK set. If it has, then we can use more efficient routines (namely, unsafe FFI) to read/write to it. Otherwise safe FFI is used. O_NONBLOCK has no effect on regular files and block devices at the moment, thus this flag should be off for them. While reading from a file cannot block indefinitely (as opposed to reading from a socket or a pipe), it can block the entire runtime for a "brief" moment of time: you cannot read a file from a floppy drive or network share without delay.2Open a file and make an 23 for it. Truncates the file to zero size when the ! is !.2 takes two actions, act1 and act2%, to perform after opening the file.act1 is passed a file descriptor and I/O device type for the newly opened file. If an exception occurs in act1!, then the file will be closed. act1 must not close the file itself. If it does so and then receives an exception, then the exception handler will attempt to close it again, which is impermissible.act2 is performed with asynchronous exceptions masked. It is passed a function to restore the masking state and the result of act1. It /must not/ throw an exception (or deliver one via an interruptible operation) without first closing the file or arranging for it to be closed. act2 may3 close the file, but is not required to do so. If act2 leaves the file open, then the file will remain open on return from 2. Code calling 2 that wishes to install a finalizer to close the file should do so in act2. Doing so in act1 could potentially close the file in the finalizer first and then in the exception handler. See  for an example of this use. Regardless, the caller is responsible for ensuring that the file is eventually closed, perhaps using t.2Open a file and make an 24 for it. Truncates the file to zero size when the ! is !. This function is difficult to use without potentially leaking the file descriptor on exception. In particular, it must be used with exceptions masked, which is a bit rude because the thread will be uninterruptible while the file path is being encoded. Use 2 instead.2Make a 2 from an existing file descriptor. Fails if the FD refers to a directory. If the FD refers to a file, 2 locks the file according to the Haskell 2010 single writer/multiple reader locking semantics (this is why we need the ! argument too).2base2base2base2base2 file to openmode in which to open the fileopen the file in non-blocking mode? This has no effect on regular files and block devices: they are always opened in blocking mode. See 2 for more discussion.act1: An action to perform on the file descriptor with the masking state restored and an exception handler that closes the file on exception.act2: An action to perform with async exceptions masked and no exception handler.2 file to openmode in which to open the file#open the file in non-blocking mode?2is a socket (on Windows)is in non-blocking mode on Unix222222222222222222222222222222((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy']+A handle managing output to the Haskell program's standard output channel.3A handle managing input from the Haskell program's standard input channel.3A handle managing output to the Haskell program's standard error channel.3 Computation 3  file mode> 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 3 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:s8 if the file is already open and cannot be reopened;s if the file does not exist or (on POSIX systems) is a FIFO without a reader and ! was requested; ors< if the user does not have permission to open the file.On POSIX systems, 3 is an interruptible operation as described in Control.Exception.Note: if you will be working with files containing binary data, you'll want to be using 3.3base3 name mode act opens a file like 35 and passes the resulting handle to the computation act+. The handle will be closed on exit from 3, whether by normal termination or by raising an exception. If closing the handle raises an exception, then this exception will be raised by 3& rather than any exception raised by act.3baseLike 3, 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.On POSIX systems, 3 is an interruptible operation as described in Control.Exception.3base3 name mode act opens a file like 35 and passes the resulting handle to the computation act+. The handle will be closed on exit from 3, whether by normal termination or by raising an exception. If closing the handle raises an exception, then this exception will be raised by 3& rather than any exception raised by act.3Like 3, 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 .)3base A version of 3 that takes an action to perform with the handle. If an exception occurs in the action, then the file will be closed automatically. The action should close the file when finished with it so the file does not remain open until the garbage collector collects the handle.=Open a file and perform an action with it. If the action throws an exception, then the file will be closed. If the last argument is , then the file will be closed on successful completion as well. We use this to implement both the 3 family of functions (via = ) and the 3 family (via =).=Open a file and perform an action with it. When the action completes or throws/receives an exception, the file will be closed.3&Old API kept to avoid breaking clients3Turn 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.3base Turn an existing Handle into a file descriptor. This function throws an IOError if the Handle does not reference a file descriptor. 333333333+333 3+33333333333#(c) The University of Glasgow, 2017see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy(# 33333+333 3+3333333None (k =========>None ,3base If 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.3base Non-blocking version of 3.Returns ' if taking the lock was successful and  otherwise.3base Release a lock taken with 3 or 3.333++++++++++333F((c) The University of Glasgow, 1994-2009see libraries/base/LICENSElibraries@haskell.org provisional non-portable Trustworthy%&J+ 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:s if the device is full;s if a system resource limit would be exceeded. It is unspecified whether the characters in the buffer are discarded or retained under these circumstances.3 Computation 3 hdl makes handle hdl/ closed. Before the computation finishes, if hdl+ is writable its buffer is flushed as for +. Performing 3 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 3; fails for any reason, any further operations (apart from 3&) on the handle will still fail as if hdl had been successfully closed.3 is an interruptible operation in the sense described in Control.Exception. If 3 is interrupted by an asynchronous exception in the process of flushing its buffers, then the I/O device (e.g., file) will be closed anyway.3 For a handle hdl% which attached to a physical file, 3 hdl. returns the size of that file in 8-bit bytes.33 hdl size) truncates the physical file with handle hdl to size bytes.3For a readable handle hdl, 3 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: 3 may block, because it has to attempt to read from the stream to determine whether there is any more data to be read.3The computation 3 is identical to 3 , except that it works only on 3.3 Computation 3 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:s% if the end of file has been reached.3 Computation 3 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 are discarded.This operation may fail with:s if the handle has already been used for reading or writing and the implementation does not allow the buffering mode to be changed.3 The action 3 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 38. To stop further encoding or decoding on an existing , use 3.3 may need to flush buffered data in order to change the encoding.3Return 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 3 and 3 to save and restore the encoding may result in an extra byte-order-mark being written to the file.3 The action 3 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 buffered data was read, and hence only works if hdl is seekable (see 3).This operation may fail with:s if the device is full;s if a system resource limit would be exceeded. It is unspecified whether the characters in the buffer are discarded or retained under these circumstances;s if hdl1 has buffered read data, and is not seekable.3 Computation 3 hdl& returns the current I/O position of hdl! as a value of the abstract type 3.3 If a call to 3 hdl returns a position p, then computation 3 p sets the position of hdl5 to the position it held at the time of the call to 3.This operation may fail with:s2 if a system resource limit would be exceeded.3 Computation 3  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 3), 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:s if the Handle is not seekable, or does not support the requested seek mode.s2 if a system resource limit would be exceeded.3 Computation 3 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 32 to reposition the handle to the current position.This operation may fail with:s if the Handle is not seekable.3 Computation 3 hdl) returns the current buffering mode for hdl.3;Set the echoing status of a handle connected to a terminal.3;Get the echoing status of a handle connected to a terminal.3&Is the handle connected to a terminal?On Windows the result of hIsTerminalDevide might be misleading, because non-native terminals, such as MinTTY used in MSYS and Cygwin environments, are implemented via redirection. Use System.Win32.Types.withHandleToHANDLE System.Win32.MinTTY.isMinTTYHandle! to recognise it. Also consider  ansi-terminal- package for crossplatform terminal support.3Select binary mode () or text mode () on a open handle. (See also 3.)$This has the same effect as calling 3 with 2, together with 3 with *.3Set the * on the specified '. All buffered data is flushed first.3Returns 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.3Makes 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 stdout33 is in the  monad, and gives more comprehensive output than the (pure) instance of } for .3base3base3333+3333333333333333333333333333333333333333********333+++***************33333333333+33333+++3333333****333333333333***********333333333333((c) The University of Glasgow, 2001-2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy QD## is wrapped around  (or whatever main is called in the program). It catches otherwise uncaught exceptions, and also flushes stdout/stderr before exiting.99 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.9Like 9, 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.9 The same as 93, 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. 11999#999 #99999119"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy cThe  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]])3:Write a character to the standard output device (same as 3 +).37Write a string to the standard output device (same as 3 +).3 The same as 3, but adds a newline character.3:Read a character from the standard input device (same as 3 3).35Read a line from the standard input device (same as 3 3).3The 3 operation returns all user input as a single string, which is read lazily as it is needed (same as 3 3).3baseThe 3 operation returns all user input as a single string, which is fully read before being returned (same as 3 3).4The 4# 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.4The 4 function reads a file and returns the contents of the file as a string. The file is read lazily, on demand, as with 3.4baseThe 4 function reads a file and returns the contents of the file as a string. The file is fully read before being returned, as with 3.4The computation 4 file str function writes the string str, to the file file.4The computation 4 file str function appends the string str, to the file file. Note that 4 and 4 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]])4The 4 function combines 3 and 4.4The 4 function is similar to . except that it signals parse failure to the * monad instead of terminating the program.4*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.4 Computation 4 hdl indicates whether at least one item is available for input from handle hdl.This operation may fail with:s% if the end of file has been reached.4 Computation 4 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:s if the device is full; ors8 if another system resource limit would be exceeded.4The implementation of  for . If the function passed to 49 inspects its argument, the resulting action will throw +.4The 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.4Like 4), but opens the file in binary mode. See 3 for more comments.4Like 4', but uses the default file permissions4Like 4', but uses the default file permissions4%Directory in which to create the fileFile 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. On Windows, the template prefix may be truncated to 3 chars, e.g. "foobar.ext" will be "fooXXX.ext".2222222222233+33333333333333333333333333333333333****3333+334433334444444433344444(****)3***********!!!!!4(3+333!!!!!344443333****33+3333****33333333333433333334433333334433333333444433)2222222224223***********"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthyk6 Computation 6 code throws + code3. Normally this terminates the program, returning code to the program's caller.%On program termination, the standard s + and 3/ 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 6:. A program that terminates successfully without calling 6, explicitly is treated as if it had called 6 +.As an + is an +, it can be caught using the functions of Control.Exception4. This means that cleanup computations added with t (from Control.Exception ) are also executed properly on 6.Note: in GHC, 6 should be called from the main program thread in order to exit the process. When called from another thread, 6 will throw an + as normal, but the exception will not cause the process itself to exit.6The computation 6 is equivalent to 6 (+ exitfail) , where exitfail is implementation-dependent.6The computation 6 is equivalent to 6 +*, It terminates the program successfully.6baseWrite given error message to 3 and terminate with 6.6666++++++6666c Trustworthyl>5baseComputes the hash of a given file. This function loops over the handle, running in constant memory.455455!(C) 2014 I/O Tweagsee libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Noneq5A reference to a value of type a.6;Miscellaneous information available for debugging purposes.6>Source location of the definition of the static pointer as a (Line, Column) pair.66Name of the module where the static pointer is defined6>Package key of the package where the static pointer is defined62A class for things buildable from static pointers.GHC wraps each use of the static keyword with b. Because the static5 keyword requires its argument to be an instance of , b carries a  constraint as well.6 A key for (s that can be serialized and used with 6.6Dereferences a static pointer.6The 6' that can be used to look up the given .6 Looks up a  by its 6.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.66 of the given .6A list of all known keys.6base 6base666666b6666666666666666b(C) 2016 I/O Tweagsee libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Noneq>(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable TrustworthywD+The fixed point of a monadic computation. D f executes the action f only once, with the eventual output fed back as the input. Hence f! should not be strict, for then D f would diverge.Monads having fixed points with a 'knot-tying' semantics. Instances of # should satisfy the following laws: PurityD ( . h) =  ( h)Left shrinking (or Tightening)D+ (\x -> a >>= \y -> f x y) = a >>= \y -> D (\x -> f x y)SlidingD ( h . f) =  h (D (f . h)), for strict h.NestingD (\x -> D (\y -> f x y)) = D (\x -> f x x)7This class is used in the translation of the recursive do% notation supported by GHC and Hugs.4base 4base 4base 4base 4base 4base 4base4base4base4base4base4base4base4base4base4base4base 4base4base4baseDD(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology 2001 BSD-style (see the file LICENSE)ross@soi.city.ac.ukstableportable Trustworthy={4base0Identity functor and monad. (a non-strict monad)Examplesfmap (+1) (Identity 0) Identity 1(Identity [1, 2, 3] <> Identity [4, 5, 6]Identity [1,2,3,4,5,6] >>> do x <- Identity 10 y <- Identity (x + 5) pure (x + y) Identity 25 4base4base4base4base4base4baseThis instance would be equivalent to the derived instances of the 4 newtype if the 4 field were removed4baseThis instance would be equivalent to the derived instances of the 4 newtype if the 4 field were removed4base 4base 4base 4base4base 4base 4base 4base 4base 4base 4base 4base 4base4base 4base 4base 4base >base>base444444-$Conor McBride and Ross Paterson 20054BSD-style (see the LICENSE file in the distribution)libraries@haskell.orgstableportable Trustworthy 7:;<.Functors representing data structures that can be transformed to structures of the  same shape by performing an  (or, therefore, t,) action on each element from left to right.$A more detailed description of what  same shape means, the various methods, how traversals are constructed, and example advanced use-cases can be found in the Overview section of Data.Traversable#overview.For the class laws see the Laws section of Data.Traversable#laws.4Map 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 .Examples Basic usage:In the first two examples we show each evaluated action mapping to the output structure.traverse Just [1,2,3,4]Just [1,2,3,4]0traverse id [Right 1, Right 2, Right 3, Right 4]Right [1,2,3,4]#In the next examples, we show that  and - values short circuit the created structure."traverse (const Nothing) [1,2,3,4]Nothing=traverse (\x -> if odd x then Just x else Nothing) [1,2,3,4]Nothing8traverse id [Right 1, Right 2, Right 3, Right 4, Left 0]Left 04Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see .Examples Basic usage:For the first two examples we show sequenceA fully evaluating a a structure and collecting the results."sequenceA [Just 1, Just 2, Just 3] Just [1,2,3]%sequenceA [Right 1, Right 2, Right 3] Right [1,2,3]The next two example show  and  will short circuit the resulting structure if present in the input. For more context, check the  instances for  and .+sequenceA [Just 1, Just 2, Just 3, Nothing]Nothing-sequenceA [Right 1, Right 2, Right 3, Left 4]Left 44Map 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 .Examples4 is literally a 4& with a type signature restricted to t. Its implementation may be more efficient due to additional power of t.4Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see .Examples Basic usage:The first two examples are instances where the input and and output of 4 are isomorphic.sequence $ Right [1,2,3,4]![Right 1,Right 2,Right 3,Right 4],sequence $ [Right 1,Right 2,Right 3,Right 4]Right [1,2,3,4]?The following examples demonstrate short circuit behavior for 4.sequence $ Left [1,2,3,4]Left [1,2,3,4]4sequence $ [Left 0, Right 1,Right 2,Right 3,Right 4]Left 044 is 4 with its arguments flipped. For a version that ignores the results see .44 is 4 with its arguments flipped. For a version that ignores the results see .4The 4( function behaves like a combination of B 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.Examples Basic usage:(mapAccumL (\a b -> (a + b, a)) 0 [1..10] (55,[0,1,3,6,10,15,21,28,36,45])/mapAccumL (\a b -> (a <> show b, a)) "0" [1..5]*("012345",["0","01","012","0123","01234"])4The 4( function behaves like a combination of B 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.Examples Basic usage:(mapAccumR (\a b -> (a + b, a)) 0 [1..10]#(55,[54,52,49,45,40,34,27,19,10,0])/mapAccumR (\a b -> (a <> show b, a)) "0" [1..5]*("054321",["05432","0543","054","05","0"])4baseThe 4( function behaves like a combination of 4 and 4 that traverses the structure while evaluating the actions and passing an accumulating parameter from left to right. It returns a final value of this accumulator together with the new structure. The accumulator is often used for caching the intermediate results of a computation.Examples Basic usage:let expensiveDouble a = putStrLn ("Doubling " <> show a) >> pure (2 * a):{ -mapAccumM (\cache a -> case lookup a cache of Nothing -> expensiveDouble a >>= \double -> pure ((a, double):cache, double)' Just double -> pure (cache, double) ) [] [1, 2, 3, 1, 2, 3]:} Doubling 1 Doubling 2 Doubling 3#([(3,6),(2,4),(1,2)],[2,4,6,2,4,6])4base4 is 4 with the arguments rearranged.4)This function may be used as a value for B in a v instance, provided that 4 is defined. (Using 4 with a  instance defined only by 4$ will result in infinite recursion.) 4 f D 4 . 4 (4 . f) 4)This function may be used as a value for  in a  instance. 4 f D & . 4 (& . f) 4base 4base 4base 4base4base4base4base4base4base4base4base4base4base4base 4base4base4base 4base 4base 4base 4base 4base 4base 4base 4base 4base 4base 4base 4base 4base 4base 4base 4base4444 4444444444444444444444444444"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy4baseThe 4& 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.4 x y is equivalent to x `%` (( y).Note: 4 is often used in infix form.Examples7"GHC" `isSubsequenceOf` "The Glorious Haskell Compiler"True+['a','d'..'z'] `isSubsequenceOf` ['a'..'z']True#[1..10] `isSubsequenceOf` [10,9..0]FalseFor the result to be 7, the first list must be finite; for the result to be !, the second list must be finite:![0,2..10] `isSubsequenceOf` [0..]True![0..] `isSubsequenceOf` [0,2..10]False[0,2..] `isSubsequenceOf` [0..]* Hangs forever*+&&&&&&&&&&4((((((((((((((((((((((((((((((((((((((((((((((((((((((((((44%%%%%%%%%%&&(%%+(((((%%%%%&&&&&&&&%%44(((((((((4%&&(((((((((((((((((((((((((((((((((((((&&(((((("(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable TrustworthyU> Reads the FilePath1 pointed to by the symbolic link and returns it.See readlink(2)6base=Returns the absolute pathname of the current executable, or argv[0] if the operating system does not provide a reliable way query 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, 6 resolves symlinks on Windows. If an executable is launched through a symlink, 67 returns the absolute path of the original executable.If the executable has been deleted, behaviour is ill-defined and varies by operating system. See 6: for a more reliable way to query the current executable.6baseGet an action to query the absolute pathname of the current executable.If the operating system provides a reliable way to determine the current executable, return the query action, otherwise return Nothing. The action is defined on FreeBSD, Linux, MacOS, NetBSD, Solaris, and Windows.Even where the query action is defined, there may be situations where no result is available, e.g. if the executable file was deleted while the program is running. Therefore the result of the query action is a Maybe FilePath.Note that for scripts and interactive sessions, the result is the path to the interpreter (e.g. ghci.)3Note also that while most operating systems return Nothing if the executable file was deleted/unlinked, some (including NetBSD) return the original path.66"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable TrustworthyV 6 Computation 6 returns a list of the program's command line arguments (not including the program name).6 Computation 63 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 6 will return.6 Computation 6 var0 returns the value of the environment variable var. For the inverse, the  function can be used.This computation may fail with:s0 if the environment variable does not exist.6base-Return the value of the environment variable var, or Nothing if there is no such value.'For POSIX users, this is equivalent to .6basesetEnv 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 6 name If you'd like to be able to set environment variables to blank strings, use .Throws  if name1 is the empty string or contains an equals sign.Beware that this function must not be executed concurrently with 6, 6, 6 and such. One thread reading environment variables at the same time with another one modifying them can result in a segfault, see  7https://www.evanjones.ca/setenv-is-not-thread-safe.htmlSetenv is not Thread Safe for discussion.6base unsetEnv name removes the specified environment variable from the environment of the current process.Throws  if name1 is the empty string or contains an equals sign.Beware that this function must not be executed concurrently with 6, 6, 6 and such. One thread reading environment variables at the same time with another one modifying them can result in a segfault, see  7https://www.evanjones.ca/setenv-is-not-thread-safe.htmlSetenv is not Thread Safe for discussion.66 args act - while executing action act, have 6 return args.66 name act - while executing action act, have 6 return name.660 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. 66666666666 66666666666(c) The GHC Developerssee libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy666666(c) Habib Alamin 2017/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy 6 Similar to .6,Get an environment value or a default value.6Like , but allows blank environment values and mimics the function signature of  from the unix package.Beware that this function must not be executed concurrently with 6,  lookupEnv, 6 and such. One thread reading environment variables at the same time with another one modifying them can result in a segfault, see  7https://www.evanjones.ca/setenv-is-not-thread-safe.htmlSetenv is not Thread Safe for discussion.6Like , but allows for the removal of blank environment variables. May throw an exception if the underlying platform doesn't support unsetting of environment variables.Beware that this function must not be executed concurrently with 6,  lookupEnv, 6 and such. One thread reading environment variables at the same time with another one modifying them can result in a segfault, see  7https://www.evanjones.ca/setenv-is-not-thread-safe.htmlSetenv is not Thread Safe for discussion.6!variable name !fallback value !variable value or fallback value 6variable name variable value overwrite 6666666666 6666666666 BSD-style (see the file LICENSE)libraries@haskell.orginternalportable Trustworthyk6Like 6:, 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"]6Given 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" == ["hello \"world\""]6Given 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 6 allows using quoting (i.e., convenient escaping of many characters) by having matching sets of single- or double-quotes,6 does not use the quoting mechanism, and thus will always escape any whitespace, quotes, and backslashes. ;escapeArgs ["hello \"world\""] == "hello\\ \\\"world\\\"\n"6Arguments 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)66666666'(c) The University of Glasgow 2013-2015see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)None>&A LibdwSession from the runtime system> An address5 The state of the execution stack>A chunk of backtrace frames57Location information about an address from a backtrace.5*A location in the original program source.5#How many stack frames in the given 5>Return a list of the chunks of a backtrace, from the outer-most to inner-most chunk.>Unpack the given 5 in the Haskell representation>The size in bytes of a >5!List the frames of a stack trace.5Get an execution stack.5Free the cached debug data.5Render a stacktrace as a string5 Render a 5 as a string5555555555555555555555555555555555'(c) The University of Glasgow 2013-2015see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)NoneT51Get a trace of the current execution stack state.Returns Nothing8 if stack trace support isn't available on host machine.5Get a string representation of the current execution stack state. 555555555555 555555555555qNone'@ 'A collection of backtraces.'Collect a set of '.57How to collect a backtrace when an exception is thrown.5collect cost-centre stack backtraces (only available when built with profiling)5collect  HasCallStack backtraces5collect backtraces via native execution stack unwinding (e.g. using DWARF debug information)55collect backtraces from Info Table Provenance Entries5Returns the currently enabled 5s.5Will the given 5% be used when collecting backtraces?5Set whether the given 5* will be used when collecting backtraces?56Render a set of backtraces to a human-readable string.5'5555555555555'55555555555555555555555555555'555555'5 "(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableUnsafe)The ) 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 and outputs the message to stderr. Depending on your terminal (settings), they may or may not be mixed.let x = 123; f = show-trace ("calling f with x = " ++ show x) (f x)calling f with x = 123"123"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.7baseThe 7 function emits a marker to the eventlog, if eventlog profiling is available and enabled at runtime. Compared to 7, 77 sequences the event with respect to other IO actions.7baseThe 7 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 7 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 7.7baseThe 7 function emits a message to the eventlog, if eventlog profiling is available and enabled at runtime. Compared to 7, 77 sequences the event with respect to other IO actions.7baseThe 7 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 7 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 7.7baselike )<, 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 7 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.7baseLike 7 , 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 187baseLike )$ but returning unit in an arbitrary 3 context. Allows for convenient use in do-notation.Note that the application of 7 is not an action in the  context, as 7 is in the  type. While the fresh bindings in the following example will force the 7* 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 ,  . 7 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 187baseLike 76 but returns the shown value instead of a third value.'traceShowId (1+2+3, "hello" ++ "world")(6,"helloworld")(6,"helloworld")7Like ) , 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 values of the variables x and y:;let f x y = traceShow ("x", x, "y", y) (x + y) in f (1+2) 5 ("x",3,"y",5)8Note in this example we also create simple labels just by including some strings.7baseLike )2 but returns the message instead of a third value.traceId "hello"hello"hello"7baseThe 7 function outputs the trace message from the IO monad. This sequences the output with respect to other IO actions.7baseLike )?, but outputs the result of calling a function on the argument.traceWith fst ("hello","world")hello("hello","world")7baseLike 7 , but uses 2 on the result of the function to convert it to a .traceShowWith length [1,2,3]3[1,2,3]7baseLike 7>, but emits the result of calling a function on its argument.7base,Immediately flush the event log, if enabled.77)77777777777777)7777777777777777"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable TrustworthySConditional failure of  computations. Defined by guard True = l () guard False =  ExamplesCommon uses of S include conditionally signalling an error in an error monad and conditionally rejecting the current choice in an -based parser.8As an example of signalling an error in the error monad %, consider a safe division function  safeDiv x y that returns  when the denominator y is zero and  (x `div` y) otherwise. For example: safeDiv 4 0Nothing safeDiv 4 2Just 2A definition of safeDiv using guards, but not S: safeDiv :: Int -> Int -> Maybe Int safeDiv x y | y /= 0 = Just (x `div` y) | otherwise = Nothing A definition of safeDiv using S and t do -notation: safeDiv :: Int -> Int -> Maybe Int safeDiv x y = do guard (y /= 0) return (x `div` y) 6 This generalizes the list-based  function. 6runIdentity (filterM (Identity . p) xs) == filter p xsExamplesfilterM (\x -> do * putStrLn ("Keep: " ++ show x ++ "?") answer <- getLine pure (answer == "y")) [1, 2, 3]Keep: 1?yKeep: 2?nKeep: 3?y[1,3]filterM (\x -> do putStr (show x) x' <- readLn pure (x == x')) [1, 2, 3]122233[2,3]6Left-to-right composition of  arrows.'(bs 6 cs) a' can be understood as the do expression do b <- bs a cs b or in terms of @ as  bs a >>= cs6-Right-to-left composition of Kleisli arrows. (6), 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 c6Repeat an action indefinitely.ExamplesA common use of 6, is to process input from network sockets, s, and channels (e.g.  and )./For example, here is how we might implement an  +https://en.wikipedia.org/wiki/Echo_Protocol echo server , using 6 both to listen for client connections on a network socket and to echo client input on client connection handles: 2echoServer :: Socket -> IO () echoServer socket = 6" $ do client <- accept socket  (echo client) (\_ -> hClose client) where echo :: Handle -> IO () echo client = 6. $ hGetLine client >>= hPutStrLn client Note that "forever" isn't necessarily non-terminating. If the action is in a ; and short-circuits after some number of iterations. then 6 actually returns *, effectively short-circuiting its caller.6The 6 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.6The 6 function generalizes # to arbitrary applicative functors.66 is the extension of 6 which ignores the final result.6The 6 function is analogous to ?, except that its result is encapsulated in a monad. Note that 6 works from left-to-right over the list arguments. This could be an issue where (A)/ 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: 6 is the same as &6Like 6, but discards the result.66 n act performs the action act n. times, and then returns the list of results. replicateM n (pure x) ==  replicate n xExamplesreplicateM 3 getLinehiheyahiya["hi","heya","hiya"]import Control.Monad.State4runState (replicateM 3 $ state $ \s -> (s, s + 1)) 1 ([1,2,3],4)6Like 6, but discards the result.ExamplesreplicateM_ 3 (putStr "a")aaa6The reverse of .Examplesdo x <- getLine* unless (x == "hi") (putStrLn "hi!")comingupwithexamplesisdifficulthi!unless (pi > exp 1) NothingJust ()6baseStrict version of .6Direct  equivalent of .ExamplesThe  function is just 6 specialized to the list monad:  = ( 6 :: (a -> Bool) -> [a] -> [a] ) An example using 6 with the  monad:mfilter odd (Just 1)Just 1mfilter odd (Just 2)Nothing,j6666666S6666666&&&&4vBtA@CE441vBt@ACE4&4&4&666j&666666666S66666((c) The University of Glasgow, 1994-2000see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions) Trustworthy%&=86Time values from the RTS, using a fixed resolution of nanoseconds.69Statistics 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 6.6The time elapsed during the post-mark pause phase of the concurrent nonmoving GC.6The CPU time used during the post-mark pause phase of the concurrent nonmoving GC.6!The time elapsed during GC itself6"The CPU time used during GC itself61The time elapsed during synchronisation before GC6baseThe amount of memory lost due to block fragmentation in bytes. Block fragmentation is the difference between the amount of blocks retained by the RTS and the blocks that are in use. This occurs when megablocks are only sparsely used, eg, when data that cannot be moved retains a megablock.6In parallel GC, the amount of balanced data copied by all threads6In parallel GC, the max amount of data copied by any one thread. Deprecated.6*Total amount of data copied during this GC6(Total amount of memory in use by the RTS6$Total amount of slop (wasted memory)6,Total amount of live data in compact regions6*Total amount of live data in large objects6Total amount of live data in the heap (includes large + compact data). Updated after every GC. Data in uncollected generations (in minor GCs) are considered live.6/Number of bytes allocated since the previous GC6!Number of threads used in this GC6 The generation number of this GC6base Statistics about runtime activity since the start of the program. This is a mirror of the C struct RTSStats in RtsAPI.h6 Details about the most recent GC67The maximum time elapsed during any nonmoving GC cycle.6The total time elapsed during which there is a nonmoving GC active.6,The total CPU time used by the nonmoving GC.6The maximum elapsed length of any post-mark pause phase of the concurrent nonmoving GC.6The total time elapsed during the post-mark pause phase of the concurrent nonmoving GC.6The total CPU time used during the post-mark pause phase of the concurrent nonmoving GC.6'Total elapsed time (at the previous GC)7#Total CPU time (at the previous GC)7!Total elapsed time used by the GC7Total CPU time used by the GC7&Total elapsed time used by the mutator7"Total CPU time used by the mutator7?Total elapsed time used by the init phase @since base-4.12.0.07;Total CPU time used by the init phase @since base-4.12.0.078Sum of par_balanced_copied bytes across all parallel GCs7Sum of par_max_copied_bytes across all parallel GCs. Deprecated.7+Sum of copied_bytes across all parallel GCs7"Sum of copied_bytes across all GCs7Sum of live bytes across all major GCs. Divided by major_gcs gives the average live data over the lifetime of the program.7 Maximum memory in use by the RTS7 Maximum slop7$Maximum live data in compact regions7"Maximum live data in large objects7Maximum live data (including large objects + compact regions) in the heap. Updated after a major GC.7Total bytes allocated7-Total number of major (oldest generation) GCs7Total number of GCs7base 1Returns whether GC stats have been enabled (with +RTS -T, for example).7base &Get current runtime system statistics.7base 7base 7base 7base >base>base4776666666666666666666667777776677777777777776666667646667777777777777777777766666666666666666666666666677"(c) The University of Glasgow 2007/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy 07 ! is used in combination with the -XOverloadedStrings language extension to convert the literals to different string types.For example, if you use the  (https://hackage.haskell.org/package/texttext package, you can say {-# LANGUAGE OverloadedStrings #-} myText = "hello world" :: Text Internally, the extension will convert this to the equivalent of 4myText = fromString @Text ("hello world" :: String) Note: You can use  fromString in normal code as well, but the usual performance/memory efficiency problems with  apply.4base (a ~ Char) context was introduced in 4.9.0.04base 4base ((((MM((((I"(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable6non-portable (local universal quantification in ReadP) Trustworthy=  A - represents the version of a software entity.An instance of p is provided, which implements exact equality modulo reordering of the tags in the 4 field.An instance of x= is also provided, which gives lexicographic ordering on the 4 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 4 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 4 and 4), but depending on the application a different concrete representation may be more appropriate.baseConstruct tag-less 4A 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.4The 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.42Provides one possible concrete representation for . For a version with 4  = [1,2,3] and 4 = ["tag1","tag2"], the output will be 1.2.3-tag1-tag2.40A parser for versions in the format produced by 4.4base4base4base4base>base 4444444444'-(c) The University of Glasgow, CWI 2001--2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstable-non-portable (local universal quantification) Trustworthy)*0178 -uThe u+ class comprehends a fundamental primitive 7 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 7 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 7, 7, 7<, etc are all provided with default definitions in terms of 7, 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: 7 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 7$ requires the identification of the 7 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 7 because the result type of a query does not involve the (polymorphic) type of the term argument. In the definition of 7; we simply use the plain constant type constructor because 7 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.7Fixity of constructors7Unique index for datatype constructors, counting from 1 in the order they are given in the program text.7%Public representation of constructors7"Public representation of datatypes7Representation of constructors. Note that equality on constructors with different types may not work -- i.e. the constructors for  and  may compare equal.7Representation of datatypes. A package of constructor representations with names of type and module.>1The type constructor used in definition of gmapMp>1The type constructor used in definition of gmapQr>/Type constructor for adding counters to queries7=Left-associative fold operation for constructor applications. The type of 7 is a headache, but operationally it is a simple generalisation of a list fold.The default definition for 7 is  , which is suitable for abstract datatypes with no substructures.7"Unfolding constructor applications7Obtaining 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).7&The outer type constructor of the type7*Mediate types and unary type constructors.In u instances of the form ) instance (Data a, ...) => Data (T a) 7 should be defined as '.The default definition is  5, which is appropriate for instances of other forms.7+Mediate types and binary type constructors.In u instances of the form 3 instance (Data a, Data b, ...) => Data (T a b) 7 should be defined as '.The default definition is  5, which is appropriate for instances of other forms.7>A generic transformation that maps over the immediate subterms9The default definition instantiates the type constructor c in the type of 7 to an identity datatype constructor, using the isomorphism pair as injection and projection.77A generic query with a left-associative binary operator78A generic query with a right-associative binary operator7A 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.7>A generic query that processes one child by index (zero-based)7A generic monadic transformation that maps over the immediate subterms9The default definition instantiates the type constructor c in the type of 7 to the monad datatype constructor, defining injection and projection using C and @.7>Transformation of at least one immediate subterm does not fail74Transformation of one immediate subterm with success7Build a term skeleton74Build a term and use a generic function for subterms7Monadic variation on 77.Gets the type constructor including the module7*Gets the public presentation of a datatype7"Gets the datatype of a constructor7,Gets the public presentation of constructors7+Look up a constructor by its representation7 Constructs an algebraic datatype7baseConstructs a constructor7Constructs a constructor7.Gets the constructors of an algebraic datatype7Gets 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.7 Gets the fixity of a constructor7!Gets the string for a constructor7!Lookup a constructor via a string7Test for an algebraic type7 Helper for 7, 77Makes a constructor for .77777777777777777777777777777777777777u777777777777777777777777u777777777777777777777777777777777777777777777777777777777777777777777777None78:<= 3 8Lists, but with an  functor based on zipping.ExamplesIn contrast to the  for :(+) <$> [1, 2, 3] <*> [4, 5, 6][5,6,7,6,7,8,7,8,9]The Applicative instance of ZipList applies the operation by pairing up the elements, analogous to N/(+) <$> ZipList [1, 2, 3] <*> ZipList [4, 5, 6]ZipList {getZipList = [5,7,9]}(,,,) <$> ZipList [1, 2] <*> ZipList [3, 4] <*> ZipList [5, 6] <*> ZipList [7, 8],ZipList {getZipList = [(1,3,5,7),(2,4,6,8)]}1ZipList [(+1), (^2), (/ 2)] <*> ZipList [5, 5, 5]%ZipList {getZipList = [6.0,25.0,2.5]}8base 8base 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"]}8base 8base8base8base8base8base8base 8base>base>base888888"(c) The University of Glasgow 2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions) Trustworthy 8F UbaseThe U class and its methods are intended to be used in conjunction with the OverloadedLists extension.VThe V# function constructs the structure l from the given list of Item lWThe W function takes the input list's length and potentially uses it to construct the structure l! more efficiently compared to V. If the given number does not equal to the input list's length the behaviour of W is not specified.'fromListN (length xs) xs == fromList xsXThe X function extracts a list of Item l from the structure l.. It should satisfy fromList . toList = id.8The 8= type function returns the type of items of the structure l.8base 9Be aware that 'fromList . toList = id' only for unfrozen  s, since X removes frozenness information.8base8base 8base8base8U8VWXUX8VW8"(c) The University of Glasgow 2002see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC Extensions)Unsafe 8 C -Semantically, considerAccessible = True. But it has special meaning to the pattern-match checker, which will never flag the clause in which -: occurs as a guard as redundant or inaccessible. Example: case (x, x) of (True, True) -> 1 (False, False) -> 2 (True, False) -> 3 -- Warning: redundantThe pattern-match checker will warn here that the third clause is redundant. It will stop doing so if the clause is adorned with -: case (x, x) of (True, True) -> 1 (False, False) -> 2 (True, False) | considerAccessible -> 3 -- No warningPut - as the last statement of the guard to avoid get confusing results from the pattern-match checker, which takes "consider accessible" by word.8Deprecated, use  directly instead.Annotating a type with 8 will make  SpecConstr5 not specialise for arguments of that type, e. g., %{-# ANN type SPEC ForceSpecConstr #-}.88 ensures that all the elements of the list are identical and then returns that unique element8The 8 function sorts a list of elements using the user supplied function to project something out of each elementIn general if the user supplied function is expensive to compute then you should probably be using 9, as it only needs to compute it once for each element. 8, on the other hand must compute the mapping function for every comparison that it performs.8The 8 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 elements8An 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.8base>= readSTRef _|_ >> return 2) = 2>This is a terrible hack to prevent a thunk from being entered twice. Simon Peyton Jones would very much like to be rid of it.8 Return the value computed by an 8 computation. The forall- ensures that the internal state used by the 89 computation is inaccessible to the rest of the program.8Allow the result of an 8 computation to be used (lazily) inside the computation. Note that if f is strict, 8 f = _|_.8Convert a strict 8 computation into a lazy one. The strict state thread passed to 8 is not performed until the result of the lazy state thread it returns is demanded.8Convert a lazy 8 computation into a strict one.8#A monad transformer embedding lazy 8 in the  monad. The : parameter indicates that the internal state used by the 8. computation is a special one supplied by the = monad, and thus distinct from those used by invocations of 8.8base8base8base8base 88888888 88888888"(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 eq888888888888(c) Ross Paterson 20024BSD-style (see the LICENSE file in the distribution)libraries@haskell.org provisionalportable Trustworthy7:= yM.GLift a function to an arrow.ISend the first component of the input through the argument arrow, and copy the rest unchanged to the output.KFanin: 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.8The L 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. L# should satisfy the following laws:  extensionL (G f) = G (\ b ->  ( (\ (c,d) -> f (b,d))))left tighteningL (I h >>> f) = h >>> L fright tighteningL (f >>> I h) = L f >>> hslidingL (f >>> G (5 *** k)) = L (G (5 *** k) >>> f) vanishingL (L f) = L (G unassoc >>> f >>> G assoc) superposing8 (L f) = L (G assoc >>> 8 f >>> G unassoc)where 9assoc ((a,b),c) = (a,(b,c)) unassoc (a,(b,c)) = ((a,b),c)8The 8 class is equivalent to t: any monad gives rise to a 8 arrow, and any instance of 8 defines a monad.8Some arrows allow application of arrow inputs to other inputs. Instances should satisfy the following laws: I (G (\x -> G (\y -> (x,y)))) >>> J = 5 I (G (g >>>)) >>> J = 8 g >>> J I (G (>>> h)) >>> J = J >>> h*Such arrows are equivalent to monads (see 8).8?Choice, for arrows that support it. This class underlies the if and case constructs in arrow notation.,Instances should satisfy the following laws: 8 (G f) = G (8 f) 8 (f >>> g) = 8 f >>> 8 g f >>> G  = G  >>> 8 f 8 f >>> G (5 +++ g) = G (5 +++ g) >>> 8 f 8 (8 f) >>> G assocsum = G assocsum >>> 8 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.8Feed marked inputs through the argument arrow, passing the rest through unchanged to the output.8A mirror image of 8.The default definition may be overridden with a more efficient version if desired.8Split 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.8A monoid on arrows.8'An associative operation with identity 8.8Kleisli arrows of a monad.8The basic arrow class.,Instances should satisfy the following laws: G id = 5 G (f >>> g) = G f >>> G g I (G f) = G (I f) I (f >>> g) = I f >>> I g I f >>> G  = G  >>> f I f >>> G (5 *** g) = G (5 *** g) >>> I f I (I f) >>> G assoc = G assoc >>> I fwhere assoc ((a,b),c) = (a,(b,c))The other combinators have sensible default definitions, which may be overridden for efficiency.8A mirror image of I.The default definition may be overridden with a more efficient version if desired.9Split 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.9Fanout: send the input to both argument arrows and combine their output.The default definition may be overridden with a more efficient version if desired.9,The identity arrow, which plays the role of C in arrow notation.9$Precomposition with a pure function.9%Postcomposition with a pure function.9base>base99999999 99999956899GI88J8888K8L888888888(8GI9989999888999659988888888K99998J8898L K88999999#(c) The University of Glasgow, 2007see libraries/base/LICENSEghc-devs@haskell.orginternalnon-portable (GHC extensions)Safe zHN99H99NNone { >>>Safe {122222222222222222222++2222222222222222222++222>`        NNNNCC!p##$%NN '] KT,-...../00$1111B`6666^^8..........................%%!C0#///////0000:pBB88!=C%%%%.................#                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ;;;;;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@AAABB>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>CCCCCCCCCCCCCCCCDDDD"""""<<EEGGGGHII   333333333KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK)LLLLLLLLLLLLLLLLLLLLLLMM?NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPQQQQQQQQQQQQQQQTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT6666666666666666666666666666666666666666666666666666666666666666666666666666666SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS                                                                                                                                                                                ###%%UUUUVVVVVVVVVVVVVVVVVVVVVVVVVVVXXXXXXYY    JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ[[[[[[[[[[[[[[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]&&&&&&&&&&&&&&&&&&^^^^^^^^^^^^^^^^^______________________``````bbbbbbbbbbbbbbb:::::====cc8888888888888888((((OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO1111111111111111111111111111111111111111111111111111111111111111111111111111111ddddddddddddddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeffffffffffffffffff5555555555555555555555555555gggggggggggggggggghhhhhhhhhhhhhhhhhhh////////////////////////000000000000000000000000000000000000000000000000000iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"i"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j"j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j#j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$j$k$k$k$k$k$k$k$k$k$k$k$7$7$7$7$77$7$7$7$7$7$7$7$7$7$7$7$7$7$7$7$7$7$7$7$7%7%7%7%7%7%7%7%7%7%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%%..%.%..%..%..%..%...%..%..%..%..%..%.....%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'l'l'l''lll'lll'lll'l'l'l''l'l'l''l'l'l''lll'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l'l(l(l(l(l(l(l(l((((((((((((((((((((((((((((((((((((((((((((((,(,,(,,,,,,,,,,,,,,,(,(,,,,,,,(,(,,,,,,,,,,(,,,,,,,,,,,,,,,,,,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(m(m(m((m(m(m(m(m(m(m(m(m(m(m(m(m(m(m(m(m(m(m(m(m(m(m(m(D(D(D(D(D(D(D(n(n(n(n(n(n(n)n)n)nn)n)n)n)n)n)n)n)n)n)n)n)n)n)nn)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)n)n)n)n)n)n)n)n)n)n)n)n)n)n)n)n)n)n)n)))))))%))))))))))))))))))))))))p)p)p)p)pp)p)p)p)p)pp)p)q)q)oo)o)o)o)o)o)o)o)o)o)o)o)o)o)o)o)o)o)o)o)o)o)o)o)o)")""")"*"*"*"*"*"*"*""*"*"*"*""*"*""*"""""*"*"*"*"*"*"*"*"*"*"*r*r*r*r*r(r*r*r*r*r*r*r*r*r*r*r*r*r*r*r*r*r*r*r*r*r*r*rrrrrrrrr*r*r*r*r*r*r*r*r*r*r*r*r*rrr*r*r*r*r*r*rr*r*r*r*r*r*E*E*E*EE*E*E*E*E*E*   * *<*<*<*<*<*<<<*<*<*<*<<*<*<<*<*<*<*<*<<*<*<<*<*<*<*v*v*v*v*v*v*v*v*v*v*v*v*v*x*x*x*x*x*x*x*x*x*x*x+xxx+x+x+x+x+x+x+xx+x+x+xx+xx+x+x+x+x+x+x++++z+z+z+z+z+z+z++z++z++z++z++z++z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+z+{+{+{+{+{{{+{+{+{+{+{+{+{+{+{+{+{+{+{+{++{++{++{++{++{+{++{++{++{++{++{+{+{+|+|+|+}+}+}+}+}+}+}+}+}+}}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}}+}+}+}}}}}}}}}}}}+}+},},},},},~,~+~,~,~,~,~,~,~,~,~,~,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,F,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,u,u,u,uu,,,,,,,,,,,,,, , , , , -  - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ------------------------------------------.......................................................................................................................................................................................././././././////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111222222222++2222222222222222___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_2222222222222222222222**22222222222222222222222s2s2s2sssssss2s2s2s2s2s2s2s2s2s2s3s3s3s3s3s3s3s3s3s3s3s3s3s3s3s3s3s3s3s3s3s3s3a3a2a3a2a3a3a3aa3t3t3t3t3t3R33333333333333333333333333333333333311131333333333333|.||.|.|.|.|.|.|.||3|3|3|3|3||.|.H3H3H3H3H3H3H3H3H3H3H3H3H3333333333333333333333333,333334444444444444444444444444444444444444444444F4F4F4FF4F4F4F4FF4F4F4F4F4F4FF4F4F4F4F4F4F4F4F4F4FFF4F4F4F4F4444444444444444444444444444444444444444444444444444444444444444445-------*-*-5-5-5-5-----5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-5-55555II5I5I5I5I5I5I5I5I5c5c5c5 5 5  55555555555555555555555555555555555%555555555555555555555555555555q)q)5q)5q)5q)5q5q5q55q55q55q55q5q5q5q5q5q5q5q5q5q5q5q5q5q5q55555666666666666W6W6666666666666666666666666666666666666!!6!6!6!6!6!6!6!6!6!6!6!666666666666666666666666666666666666666666666666666666666666/666666666666666666666767676767676767777/77777777777777777777777777777777777777777777777777777777777777 7 7 7 7 7 7 7 7 7 7 4 7 7 7 7 7'%'%'%'7'7'7'7'7'7'7'7'''7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7'7''''''''''''7'7'7'7'7'7'7'7'7'7'7'8'8'8'8'8'8'8'8'8'8'8'8'&'&'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'8'88888888888888888888888888888878888388*48888888888888888888888888888888888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::M::+:::66::6666::S:S:P::::::::::::[[:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;l;l;l;l;l;l;l;l;l;l;l;;;;;;;D;r;m;m;;;;:;*;;*;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<<<<<<<<;<<<<<<<<<6<<<<<<<<<<<<<<<<<<<x<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*<<<<|<|<<*<<<<<<<<<<<*<<<<<<<<<<<<<<<<<<<<;<<<<<<<<<<<<<<<<<<<<<<<<<3<<<<<<======3==<<<<===<3=333333===33===<<========================I='='='='=======<<= ghc-internalGHC.Internal.List#GHC.Internal.Control.Exception.BaseGHC.Internal.ExtsGHC.Internal.BaseGHC.Internal.Foreign.StablePtrGHC.Internal.System.IOGHC.Internal.Data.BoolGHC.Internal.TopHandlerGHC.Internal.IO.ExceptionGHC.Internal.Debug.TraceGHC.Internal.Data.FunctionGHC.Internal.FloatGHC.Internal.Data.CoerceGHC.Internal.NumGHC.Internal.RealGHC.Internal.Data.EnumGHC.Internal.Data.EqGHC.Internal.Data.OrdGHC.Internal.Control.MonadGHC.Internal.Data.FunctorGHC.Internal.Control.Monad.FixGHC.Internal.Control.Monad.FailGHC.Internal.OverloadedLabelsGHC.Internal.Control.ArrowGHC.Internal.DesugarGHC.Internal.Data.StringGHC.Internal.GHCiGHC.Internal.IsList#GHC.Internal.Type.Reflection.UnsafeGHC.Internal.Data.DynamicGHC.Internal.Data.MonoidGHC.Internal.StackGHC.Internal.StaticPtrGHC.Internal.Exception.TypeGHC.Internal.Unsafe.CoerceGHC.Internal.RecordsGHC.Internal.TypeErrorGHC.Internal.NumericGHC.Internal.Data.DataGHC.Internal.Text.ReadGHC.Internal.Text.ShowGHC.Internal.Data.IxGHC.Internal.Type.ReflectionGHC.Internal.Data.FoldableGHC.Internal.Data.TraversableGHC.Internal.GenericsGHC.Internal.TypeNatsGHC.Internal.TypeLitsGHC.Internal.IntGHC.Internal.Numeric.NaturalGHC.Internal.Data.MaybeGHC.Internal.Control.Monad.STGHC.Internal.Data.Type.EqualityGHC.Internal.WordGHC.Internal.Foreign.PtrGHC.Internal.Data.EitherGHC.Internal.Data.VoidGHC.Internal.Foreign.C.ConstPtrGHC.Internal.Data.TupleGHC.Internal.IOGHC.Internal.Fingerprint.TypeGHC.Internal.NaturalGHC.Internal.CharGHC.Internal.IntegerGHC.Internal.Integer.LogarithmsGHC.Internal.MaybeGHC.Internal.Stack.TypesGHC.Internal.ByteOrderGHC.Internal.ExceptionGHC.Internal.IO.HandleGHC.Internal.ErrGHC.Internal.Stack.CCSGHC.Internal.Data.VersionGHC.Internal.UnicodeGHC.Internal.Show"GHC.Internal.Float.RealFracMethods"GHC.Internal.Float.ConversionUtilsGHC.Internal.EnumGHC.Internal.Data.BitsGHC.Internal.BitsGHC.Internal.ST!GHC.Internal.Control.Monad.ST.ImpGHC.Internal.ArrGHC.Internal.IxGHC.Internal.Data.Type.BoolGHC.Internal.Data.Functor.UtilsGHC.Internal.Data.STRefGHC.Internal.STRefGHC.Internal.Clock)GHC.Internal.Text.ParserCombinators.ReadPGHC.Internal.Text.Read.Lex,GHC.Internal.Text.ParserCombinators.ReadPrecGHC.Internal.ReadGHC.Internal.PtrGHC.Internal.Conc.SyncGHC.Internal.Stable$GHC.Internal.Control.Concurrent.MVarGHC.Internal.MVarGHC.Internal.FingerprintGHC.Internal.StorableGHC.Internal.Foreign.StorableGHC.Internal.Data.Type.OrdGHC.Internal.Data.Type.CoercionGHC.Internal.Data.ProxyGHC.Internal.Foreign.C.TypesGHC.Internal.System.Posix.TypesGHC.Internal.IO.IOMode$GHC.Internal.Data.Semigroup.InternalGHC.Internal.Data.Functor.ConstGHC.Internal.ClosureTypesGHC.Internal.Data.TypeableGHC.Internal.Exception.Context GHC.Internal.Exception.BacktraceGHC.Internal.Data.OldListGHC.Internal.System.IO.ErrorGHC.Internal.Control.ExceptionGHC.Internal.Data.IORefGHC.Internal.IORefGHC.Internal.Foreign.ForeignPtrGHC.Internal.ForeignPtr&GHC.Internal.Foreign.ForeignPtr.UnsafeGHC.Internal.IO.BufferGHC.Internal.IO.Encoding.TypesGHC.Internal.IO.EncodingGHC.Internal.IO.DeviceGHC.Internal.IO.BufferedIOGHC.Internal.IO.Handle.TypesGHC.Internal.IO.StdHandlesGHC.Internal.IO.Handle.FDGHC.Internal.IOArrayGHC.Internal.Event.TimeOutGHC.Internal.Encoding.UTF8GHC.Internal.Weak.FinalizeGHC.Internal.WeakGHC.Internal.IO.Handle.LockGHC.Internal.System.Exit"GHC.Internal.Foreign.Marshal.Alloc"GHC.Internal.Foreign.Marshal.Utils"GHC.Internal.Foreign.Marshal.Array GHC.Internal.IO.Encoding.FailureGHC.Internal.IO.Encoding.UTF8GHC.Internal.IO.Encoding.UTF32GHC.Internal.IO.Encoding.UTF16GHC.Internal.IO.Encoding.Latin1&GHC.Internal.Foreign.C.String.EncodingGHC.Internal.Foreign.C.StringGHC.Internal.RTS.FlagsGHC.Internal.IO.SubSystemGHC.Internal.Foreign.C.Error#GHC.Internal.System.Posix.InternalsGHC.Internal.IO.Encoding.IconvGHC.Internal.System.MemGHC.Internal.Conc.SignalGHC.Internal.EventGHC.Internal.Conc.IOGHC.Internal.IO.FD GHC.Internal.IO.Handle.InternalsGHC.Internal.IO.Handle.Text"GHC.Internal.Data.Functor.IdentityGHC.Internal.Data.ListGHC.Internal.InfoProv.TypesGHC.Internal.Stack.CloneStack$GHC.Internal.ExecutionStack.InternalGHC.Internal.ExecutionStackGHC.Internal.ProfilingGHC.Internal.ArrayArrayGHC.Internal.Control.CategoryGHC.Internal.Pack"GHC.Internal.Foreign.Marshal.ErrorGHC.Internal.StableName#GHC.Internal.Foreign.Marshal.Unsafe!GHC.Internal.Foreign.Marshal.PoolGHC.Internal.Foreign.ConcurrentGHC.Internal.InfoProvGHC.Internal.System.Environment%GHC.Internal.System.Environment.BlankGHC.Internal.ResponseFileGHC.Internal.GHCi.HelpersGHC.Internal.EnvironmentGHC.Internal.Data.UniqueGHC.Internal.StatsGHC.Internal.Functor.ZipList"GHC.Internal.Control.Monad.ST.Lazy&GHC.Internal.Control.Monad.ST.Lazy.ImpGHC.Internal.Conc.BoundGHC.Internal.ConsoleHandler!GHC.Internal.IO.Encoding.CodePage#GHC.Internal.IO.Handle.Lock.WindowsPreludeerror Data.EitherEitherthrowControl.Exception Underflow callStackconcatfoldrfoldlAssertionFailedmapMaybe readMaybeData Bifunctor Data.MaybeMaybeshowevenGHC.ConcSTMGHC.Internal.Conc atomically Data.Functor<$>GHC.ListList System.IOIOData.SemigroupSumProduct Data.StringIsStringstimesIdempotentstimesIdempotentMonoidfromEnum Data.CharChar$dm*>$dm<$$dm<*$dm<*>$dm<>$dm>> $dmliftA2$dmmany $dmmappend $dmmconcat $dmmempty$dmmplus$dmmzero $dmreturn $dmsconcat$dmsome $dmstimes5016439GHC.RealIntegral toInteger Data.RatioRational$dm- $dmnegate7GHC.Internal.IO.Unsafebracket hGetContentsGHC.Internal.Event.Arr$Data.IntIntStringJustRightunzip2repeatcyclebool Control.Monad>>= MonadPlus genericLength maximumBy minimumBygenericReplicate genericTake genericDropgenericSplitAt genericIndex Data.List!? Text.ReadRead readsPrec$dmshow $dmshowList $dmshowsPrecstToIOGHC.Internal.Data.STRef.StrictGHC.Internal.Event.UniquetoEnum $dmenumFrom$dmenumFromThen$dmenumFromThenTo $dmenumFromTo$dmpred$dmsuccForeign.C.TypesCFloatCDoubleNumeric.NaturalNatural$dm/ $dmceiling$dmdiv $dmdivMod$dmfloor$dmmod$dmquot$dmrecip$dmrem$dmround $dmtruncate8$dmindex $dmrangeSize$dmunsafeIndex$dmunsafeRangeSizeOverflow $dmbitSize $dmclearBit$dmcomplementBit$dmcountLeadingZeros$dmcountTrailingZeros $dmrotate $dmrotateL $dmrotateR $dmsetBit$dmshift $dmshiftL $dmshiftR$dmunsafeShiftL$dmunsafeShiftR $dmzeroBitsGHC.Internal.Event.IntVarGHC.Internal.TypeLits.InternalGHC.Internal.TypeNats.InternalGHC.Internal.Unicode.Bits/GHC.Internal.Unicode.Char.DerivedCoreProperties5GHC.Internal.Unicode.Char.UnicodeData.GeneralCategory=negate>>fmapfail fromLabelarr>>>firstapp|||loop fromStringtoAnnotationWrapper fromIntegral realToFrac toRationalguard ghciStepIOIsListfromList fromListNtoListproxy#mkTrContoDyn<>memptymappendmconcatemptyCallStack pushCallStack fromStaticPtremptyExceptionContextunsafeEqualityProof unsafeCoerce#getField unsatisfiablemkRationalBase2mkRationalBase10join<*>pure*>BoundedEnumEqFloating FractionalMonadFunctorNumOrdReal RealFloatRealFracIxTypeableGHC.Magic.DictWithDict DataToTagMonadFix MonadFail ApplicativeFoldable TraversableGenericGeneric1Datatype ConstructorSelectorKnownNat KnownSymbol KnownChar GHCiSandboxIO SemigroupMonoidIPHasFieldAddr#Array# GHC.TypesBool ByteArray#Char#Double#DoubleFloat#FloatFUNInt#Int8#Int16#Int32#Int64# ghc-bignumGHC.Num.IntegerIntegerGHC.Num.NaturalWeak# MutableArray#MutableByteArray#OrderingMVar#IOPort#Ratio RealWorld StablePtr#~~~State# StableName#MutVar#Word#WordWord8#Word16#Word32#Word64# ThreadId#BCOFunPtrTVar#Compact#StackSnapshot# PromptTag#VoidNonEmptyType UnliftedTypeTYPE CONSTRAINT ConstraintLevity RuntimeRepVecCountVecElem LiftedRep UnliftedRep ZeroBitRep ZeroBitTypeTyConModuleTrNameKindRep TypeLitSortV1U1Par1Rec1K1M1:+::*::.:RDCSRec0D1C1S1RepRep1URecUAddrUCharUDoubleUFloatUIntUWord UnsatisfiableAny TypeError CoercibleProxy#SPEC SmallArray#SmallMutableArray# StaticPtr CallStackTypeRep SomeTypeRep AppendSymbolUnsafeEquality MultiplicityInt8X16#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#Symbol+*^ CmpSymbolCmpNatCmpCharDivModLog2 ConsSymbol UnconsSymbol CharToNat NatToCharConstPtrExceptionContext GHC.TupleSoloC#D#FalseF#I#Nothing:%TrueW#LeftLTEQGT StaticPtrInfo FingerprintSrcLocTrNameSTrNameDText:<>::$$:ShowTypePrefixIInfixILeftAssociativeRightAssociativeNotAssociative SourceUnpackSourceNoUnpackNoSourceUnpackedness SourceLazy SourceStrictNoSourceStrictness DecidedLazy DecidedStrict DecidedUnpackMetaDataMetaConsMetaSelVecRepTupleRepSumRepBoxedRepIntRepInt8RepInt16RepInt32RepInt64RepWordRepWord8Rep Word16Rep Word32Rep Word64RepAddrRepFloatRep DoubleRepLiftedUnliftedVec2Vec4Vec8Vec16Vec32Vec64 Int8ElemRep Int16ElemRep Int32ElemRep Int64ElemRep Word8ElemRep Word16ElemRep Word32ElemRep Word64ElemRep FloatElemRep DoubleElemRepKindRepTyConApp KindRepVar KindRepApp KindRepFun KindRepTYPEKindRepTypeLitSKindRepTypeLitD TypeLitSymbol TypeLitNat TypeLitChar UnsafeReflOneManyMkSologtChar#geChar#eqChar#neChar#ltChar#leChar#ord# int8ToInt# intToInt8# negateInt8# plusInt8#subInt8# timesInt8# quotInt8#remInt8# quotRemInt8#uncheckedShiftLInt8#uncheckedShiftRAInt8#uncheckedShiftRLInt8# int8ToWord8#eqInt8#geInt8#gtInt8#leInt8#ltInt8#neInt8# word8ToWord# wordToWord8# plusWord8# subWord8# timesWord8# quotWord8# remWord8# quotRemWord8# andWord8#orWord8# xorWord8# notWord8#uncheckedShiftLWord8#uncheckedShiftRLWord8# word8ToInt8#eqWord8#geWord8#gtWord8#leWord8#ltWord8#neWord8# int16ToInt# intToInt16# negateInt16# plusInt16# subInt16# timesInt16# quotInt16# remInt16# quotRemInt16#uncheckedShiftLInt16#uncheckedShiftRAInt16#uncheckedShiftRLInt16#int16ToWord16#eqInt16#geInt16#gtInt16#leInt16#ltInt16#neInt16# word16ToWord# wordToWord16# plusWord16# subWord16# timesWord16# quotWord16# remWord16#quotRemWord16# andWord16# orWord16# xorWord16# notWord16#uncheckedShiftLWord16#uncheckedShiftRLWord16#word16ToInt16# eqWord16# geWord16# gtWord16# leWord16# ltWord16# neWord16# int32ToInt# intToInt32# negateInt32# plusInt32# subInt32# timesInt32# quotInt32# remInt32# quotRemInt32#uncheckedShiftLInt32#uncheckedShiftRAInt32#uncheckedShiftRLInt32#int32ToWord32#eqInt32#geInt32#gtInt32#leInt32#ltInt32#neInt32# word32ToWord# wordToWord32# plusWord32# subWord32# timesWord32# quotWord32# remWord32#quotRemWord32# andWord32# orWord32# xorWord32# notWord32#uncheckedShiftLWord32#uncheckedShiftRLWord32#word32ToInt32# eqWord32# geWord32# gtWord32# leWord32# ltWord32# neWord32# int64ToInt# intToInt64# negateInt64# plusInt64# subInt64# timesInt64# quotInt64# remInt64#uncheckedIShiftL64#uncheckedIShiftRA64#uncheckedIShiftRL64#int64ToWord64#eqInt64#geInt64#gtInt64#leInt64#ltInt64#neInt64# word64ToWord# wordToWord64# plusWord64# subWord64# timesWord64# quotWord64# remWord64#and64#or64#xor64#not64#uncheckedShiftL64#uncheckedShiftRL64#word64ToInt64# eqWord64# geWord64# gtWord64# leWord64# ltWord64# neWord64#+#-#*# 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#castDoubleToWord64#castWord64ToDouble#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#castFloatToWord32#castWord32ToFloat# fmaddFloat# fmsubFloat# fnmaddFloat# fnmsubFloat# fmaddDouble# fmsubDouble# fnmaddDouble# fnmsubDouble# newArray# readArray# writeArray# sizeofArray#sizeofMutableArray# indexArray#unsafeFreezeArray#unsafeThawArray# copyArray#copyMutableArray# cloneArray#cloneMutableArray# freezeArray# thawArray# casArray#newSmallArray#shrinkSmallMutableArray#readSmallArray#writeSmallArray#sizeofSmallArray#sizeofSmallMutableArray#getSizeofSmallMutableArray#indexSmallArray#unsafeFreezeSmallArray#unsafeThawSmallArray#copySmallArray#copySmallMutableArray#cloneSmallArray#cloneSmallMutableArray#freezeSmallArray#thawSmallArray#casSmallArray# newByteArray#newPinnedByteArray#newAlignedPinnedByteArray#isMutableByteArrayPinned#isByteArrayPinned#byteArrayContents#mutableByteArrayContents#shrinkMutableByteArray#resizeMutableByteArray#unsafeFreezeByteArray#unsafeThawByteArray#sizeofByteArray#sizeofMutableByteArray#getSizeofMutableByteArray#indexCharArray#indexWideCharArray#indexIntArray#indexWordArray#indexAddrArray#indexFloatArray#indexDoubleArray#indexStablePtrArray#indexInt8Array#indexWord8Array#indexInt16Array#indexWord16Array#indexInt32Array#indexWord32Array#indexInt64Array#indexWord64Array#indexWord8ArrayAsChar#indexWord8ArrayAsWideChar#indexWord8ArrayAsInt#indexWord8ArrayAsWord#indexWord8ArrayAsAddr#indexWord8ArrayAsFloat#indexWord8ArrayAsDouble#indexWord8ArrayAsStablePtr#indexWord8ArrayAsInt16#indexWord8ArrayAsWord16#indexWord8ArrayAsInt32#indexWord8ArrayAsWord32#indexWord8ArrayAsInt64#indexWord8ArrayAsWord64#readCharArray#readWideCharArray# readIntArray#readWordArray#readAddrArray#readFloatArray#readDoubleArray#readStablePtrArray#readInt8Array#readWord8Array#readInt16Array#readWord16Array#readInt32Array#readWord32Array#readInt64Array#readWord64Array#readWord8ArrayAsChar#readWord8ArrayAsWideChar#readWord8ArrayAsInt#readWord8ArrayAsWord#readWord8ArrayAsAddr#readWord8ArrayAsFloat#readWord8ArrayAsDouble#readWord8ArrayAsStablePtr#readWord8ArrayAsInt16#readWord8ArrayAsWord16#readWord8ArrayAsInt32#readWord8ArrayAsWord32#readWord8ArrayAsInt64#readWord8ArrayAsWord64#writeCharArray#writeWideCharArray#writeIntArray#writeWordArray#writeAddrArray#writeFloatArray#writeDoubleArray#writeStablePtrArray#writeInt8Array#writeWord8Array#writeInt16Array#writeWord16Array#writeInt32Array#writeWord32Array#writeInt64Array#writeWord64Array#writeWord8ArrayAsChar#writeWord8ArrayAsWideChar#writeWord8ArrayAsInt#writeWord8ArrayAsWord#writeWord8ArrayAsAddr#writeWord8ArrayAsFloat#writeWord8ArrayAsDouble#writeWord8ArrayAsStablePtr#writeWord8ArrayAsInt16#writeWord8ArrayAsWord16#writeWord8ArrayAsInt32#writeWord8ArrayAsWord32#writeWord8ArrayAsInt64#writeWord8ArrayAsWord64#compareByteArrays#copyByteArray#copyMutableByteArray##copyMutableByteArrayNonOverlapping#copyByteArrayToAddr#copyMutableByteArrayToAddr#copyAddrToByteArray#copyAddrToAddr#copyAddrToAddrNonOverlapping# setByteArray# setAddrRange#atomicReadIntArray#atomicWriteIntArray# casIntArray# casInt8Array#casInt16Array#casInt32Array#casInt64Array#fetchAddIntArray#fetchSubIntArray#fetchAndIntArray#fetchNandIntArray#fetchOrIntArray#fetchXorIntArray# plusAddr# minusAddr#remAddr# addr2Int# int2Addr#gtAddr#geAddr#eqAddr#neAddr#ltAddr#leAddr#indexCharOffAddr#indexWideCharOffAddr#indexIntOffAddr#indexWordOffAddr#indexAddrOffAddr#indexFloatOffAddr#indexDoubleOffAddr#indexStablePtrOffAddr#indexInt8OffAddr#indexWord8OffAddr#indexInt16OffAddr#indexWord16OffAddr#indexInt32OffAddr#indexWord32OffAddr#indexInt64OffAddr#indexWord64OffAddr#indexWord8OffAddrAsChar#indexWord8OffAddrAsWideChar#indexWord8OffAddrAsInt#indexWord8OffAddrAsWord#indexWord8OffAddrAsAddr#indexWord8OffAddrAsFloat#indexWord8OffAddrAsDouble#indexWord8OffAddrAsStablePtr#indexWord8OffAddrAsInt16#indexWord8OffAddrAsWord16#indexWord8OffAddrAsInt32#indexWord8OffAddrAsWord32#indexWord8OffAddrAsInt64#indexWord8OffAddrAsWord64#readCharOffAddr#readWideCharOffAddr#readIntOffAddr#readWordOffAddr#readAddrOffAddr#readFloatOffAddr#readDoubleOffAddr#readStablePtrOffAddr#readInt8OffAddr#readWord8OffAddr#readInt16OffAddr#readWord16OffAddr#readInt32OffAddr#readWord32OffAddr#readInt64OffAddr#readWord64OffAddr#readWord8OffAddrAsChar#readWord8OffAddrAsWideChar#readWord8OffAddrAsInt#readWord8OffAddrAsWord#readWord8OffAddrAsAddr#readWord8OffAddrAsFloat#readWord8OffAddrAsDouble#readWord8OffAddrAsStablePtr#readWord8OffAddrAsInt16#readWord8OffAddrAsWord16#readWord8OffAddrAsInt32#readWord8OffAddrAsWord32#readWord8OffAddrAsInt64#readWord8OffAddrAsWord64#writeCharOffAddr#writeWideCharOffAddr#writeIntOffAddr#writeWordOffAddr#writeAddrOffAddr#writeFloatOffAddr#writeDoubleOffAddr#writeStablePtrOffAddr#writeInt8OffAddr#writeWord8OffAddr#writeInt16OffAddr#writeWord16OffAddr#writeInt32OffAddr#writeWord32OffAddr#writeInt64OffAddr#writeWord64OffAddr#writeWord8OffAddrAsChar#writeWord8OffAddrAsWideChar#writeWord8OffAddrAsInt#writeWord8OffAddrAsWord#writeWord8OffAddrAsAddr#writeWord8OffAddrAsFloat#writeWord8OffAddrAsDouble#writeWord8OffAddrAsStablePtr#writeWord8OffAddrAsInt16#writeWord8OffAddrAsWord16#writeWord8OffAddrAsInt32#writeWord8OffAddrAsWord32#writeWord8OffAddrAsInt64#writeWord8OffAddrAsWord64#atomicExchangeAddrAddr#atomicExchangeWordAddr#atomicCasAddrAddr#atomicCasWordAddr#atomicCasWord8Addr#atomicCasWord16Addr#atomicCasWord32Addr#atomicCasWord64Addr#fetchAddWordAddr#fetchSubWordAddr#fetchAndWordAddr#fetchNandWordAddr#fetchOrWordAddr#fetchXorWordAddr#atomicReadWordAddr#atomicWriteWordAddr# newMutVar# readMutVar# writeMutVar#atomicSwapMutVar#atomicModifyMutVar2#atomicModifyMutVar_# casMutVar#catch#raise#raiseUnderflow#raiseOverflow# raiseDivZero#raiseIO#maskAsyncExceptions#maskUninterruptible#unmaskAsyncExceptions#getMaskingState# newPromptTag#prompt# control0# atomically#retry# catchRetry# catchSTM#newTVar# readTVar# readTVarIO# writeTVar#newMVar# takeMVar# tryTakeMVar#putMVar# tryPutMVar# readMVar# tryReadMVar# isEmptyMVar# newIOPort# readIOPort# writeIOPort#delay# waitRead# waitWrite#fork#forkOn# killThread#yield# myThreadId# labelThread#isCurrentThreadBound# noDuplicate# threadLabel# threadStatus# listThreads#mkWeak#mkWeakNoFinalizer#addCFinalizerToWeak# deRefWeak# finalizeWeak#touch#makeStablePtr#deRefStablePtr# eqStablePtr#makeStableName#stableNameToInt# compactNew#compactResize#compactContains#compactContainsAny#compactGetFirstBlock#compactGetNextBlock#compactAllocateBlock#compactFixupPointers# compactAdd#compactAddWithSharing# compactSize#reallyUnsafePtrEquality#par#spark#seq# getSpark# numSparks# keepAlive# 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#WordBox MkWordBoxIntBoxMkIntBoxFloatBox MkFloatBox DoubleBox MkDoubleBoxDictBox MkDictBoxGHC.Num.BigNatBigNatBN#unBigNatKindBndrVoid#SPEC2MultMulisTrue#getSoloGHC.Prim.PtrEqreallyUnsafePtrEqualityunsafePtrEquality# sameArray#sameMutableArray#sameSmallArray#sameSmallMutableArray#sameByteArray#sameMutableByteArray# sameMutVar# sameTVar# sameMVar# sameIOPort#samePromptTag# eqStableName#withDict dataToTag# unpackNBytes#compare<<=>maxmin/=ipeqWordneWordeqCharneChareqFloateqDoubleeqIntneIntgtIntgeIntltIntleInt compareInt compareInt#gtWordgeWordltWordleWord compareWord compareWord#&&||notdivInt8# divInt16# divInt32#modInt8# modInt16# modInt32# divModInt# divModInt8# divModInt16# divModInt32#$dm==$dm/= $dmcompare$dm<$dm<=$dm>$dm>=$dmmax$dmminfstsndcurryswap smallInteger integerToInt wordToInteger integerToWordencodeFloatIntegerencodeDoubleIntegerdecodeDoubleInteger plusInteger minusInteger timesInteger negateInteger absInteger signumInteger divModInteger divInteger modIntegerquotRemInteger quotInteger remInteger eqInteger neqInteger leInteger gtInteger ltInteger geIntegercompareInteger eqInteger# neqInteger# leInteger# gtInteger# ltInteger# geInteger# andInteger orInteger xorIntegercomplementInteger shiftLInteger shiftRIntegertestBitInteger hashInteger bitIntegerpopCountInteger wordLog2# integerLog2#integerLogBase# $fEqMaybe $fOrdMaybeNatJ#NatS# mkNaturalisValidNatural plusNatural minusNaturalminusNaturalMaybe timesNatural negateNatural signumNaturalquotRemNatural remNatural quotNatural gcdNatural lcmNatural andNatural orNatural xorNatural bitNaturaltestBitNaturalpopCountNatural shiftLNatural shiftRNaturalnaturalToInteger naturalToWordnaturalFromInteger wordToNaturalnaturalToWordMaybewordToNatural# powModNatural srcLocEndCol srcLocEndLinesrcLocStartColsrcLocStartLine srcLocFile srcLocModule srcLocPackageEmptyCallStack PushCallStackFreezeCallStack HasCallStack getCallStackfromCallSiteListfreezeCallStack $fEqSrcLoc ByteOrder BigEndian LittleEndiantargetByteOrder SomeExceptiondivZeroExceptionoverflowExceptionratioZeroDenomExceptionunderflowException mkUserErrormplusIOerrorCallWithCallStackExceptionerrorCallExceptionerrorWithoutStackTrace undefined absentErrabssignumquotremdivmodquotRemdivModOpaqueO:|mzeromplus Alternativeempty<|>somemanyliftA2<*<$sconcatstimesabsurdvacuous<**>liftAliftA3=<<whenliftM2liftM3liftM4liftM5apmapFB unsafeChrminIntmaxInt breakpointbreakpointCondconst.flip$!untilasTypeOffailIOunIOgetTagquotIntremIntdivIntmodInt quotRemInt divModInt shift_maskshiftL#shiftRL#iShiftL# iShiftRA# iShiftRL# $fFunctorList$fFunctorMaybe$fFunctorTuple2 $fFunctorSolo $fFunctorFUN$fFunctorTuple7$fFunctorTuple6$fFunctorTuple5$fFunctorTuple4$fFunctorTuple3$fApplicativeIO$fApplicativeList$fApplicativeMaybe$fApplicativeFUN$fApplicativeSolo $fMonadIO $fFunctorIO $fMonadList $fMonadMaybe $fMonadFUN $fMonadSolo$fAlternativeIO$fAlternativeList$fAlternativeMaybe $fMonadPlusIO$fMonadPlusList$fMonadPlusMaybe$fMonadNonEmpty$fApplicativeNonEmpty$fFunctorNonEmpty $fSemigroupIO$fSemigroupMaybe$fSemigroupOrdering$fSemigroupTuple5$fSemigroupTuple4$fSemigroupTuple3$fSemigroupTuple2$fSemigroupSolo$fSemigroupUnit$fSemigroupFUN$fSemigroupNonEmpty$fSemigroupVoid$fSemigroupList $fMonoidIO $fMonadTuple4$fApplicativeTuple4 $fMonadTuple3$fApplicativeTuple3 $fMonadTuple2$fApplicativeTuple2 $fMonoidMaybe$fMonoidOrdering$fMonoidTuple5$fMonoidTuple4$fMonoidTuple3$fMonoidTuple2 $fMonoidSolo $fMonoidUnit $fMonoidFUN $fMonoidList $fEqNonEmpty $fOrdNonEmpty$fEqVoid $fOrdVoidcurrentCallStackVersion makeVersionunicodeVersion hPutStrLn prettySrcLocprettyCallStackprettyCallStackLinessubtract $fNumNatural $fNumInteger $fNumWord$fNumIntmaybeisJust isNothingfromJust fromMaybe maybeToList listToMaybe catMaybesunconsunsnoctaillastinitnullfoldl1'sumproductscanlscanl1scanl'foldr'foldr1scanrscanr1maximumminimumiterateiterate' replicate takeWhile dropWhiletakedropsplitAtspanbreakreverseandoranyallelemnotElemlookup concatMap!!zip3zipWithzipWith3unzip3errorEmptyListshowListShowS showList__appPrecappPrec1showsshowChar showString showParen showSpaceshowCommaSpace showLitChar showLitStringshowMultiLineString protectEscasciiTab intToDigit showSignedInt $fShowKindRep $fShowNatural $fShowInteger $fShowTuple15 $fShowTuple14 $fShowTuple13 $fShowTuple12 $fShowTuple11 $fShowTuple10 $fShowTuple9 $fShowTuple8 $fShowTuple7 $fShowTuple6 $fShowTuple5 $fShowTuple4 $fShowTuple3 $fShowTuple2$fShowCallStack $fShowModule $fShowTrName $fShowTyCon $fShowWord $fShowInt $fShowChar $fShowList$fShowTypeLitSort $fShowVecElem$fShowVecCount$fShowRuntimeRep $fShowLevity $fShowSrcLoc$fShowNonEmpty $fShowMaybe$fShowOrdering $fShowBool $fShowSolo $fShowUnit $fShowVoid showListWith $fMonadFailIO$fMonadFailList$fMonadFailMaybeproperFractionFloatInt floorFloatIntceilingFloatInt roundFloatIntproperFractionFloatIntegertruncateFloatIntegerfloorFloatIntegerceilingFloatIntegerroundFloatIntegerproperFractionDoubleIntfloorDoubleIntceilingDoubleIntroundDoubleIntproperFractionDoubleIntegertruncateDoubleIntegerfloorDoubleIntegerceilingDoubleIntegerroundDoubleInteger double2Int int2Double float2Int int2FloatelimZerosInteger elimZerosInt#succpredminBoundmaxBoundboundedEnumFromboundedEnumFromThen toEnumError fromEnumError succError predError $fBoundedWord $fBoundedInt $fBoundedChar $fEnumNatural $fEnumInteger $fEnumWord $fEnumInt $fEnumChar$fEnumOrdering $fEnumBool $fEnumSolo $fEnumUnit $fEnumVecElem$fBoundedVecElem$fEnumVecCount$fBoundedVecCount $fEnumLevity$fBoundedLevity$fBoundedOrdering $fBoundedBool$fBoundedTuple15$fBoundedTuple14$fBoundedTuple13$fBoundedTuple12$fBoundedTuple11$fBoundedTuple10$fBoundedTuple9$fBoundedTuple8$fBoundedTuple7$fBoundedTuple6$fBoundedTuple5$fBoundedTuple4$fBoundedTuple3$fBoundedTuple2 $fBoundedSolo $fBoundedUnitFractionalExponentBaseBase2Base10properFractiontruncateroundceilingfloor/recip divZeroErrorratioZeroDenominatorError overflowErrorunderflowError ratioPrec ratioPrec1infinity notANumberreduce% numerator denominatornumericEnumFromnumericEnumFromThennumericEnumFromTonumericEnumFromThenTo showSignedoddpowImpl powImplAcc^^^%^^^%^^gcdlcmintegralEnumFromintegralEnumFromThenintegralEnumFromTointegralEnumFromThenTomkRationalWithExponentBase $fShowRatio $fRealNatural $fRealInteger $fRealRatio $fNumRatio $fOrdRatio$fIntegralNatural$fIntegralInteger$fIntegralWord $fRealWord $fIntegralInt $fRealInt$fFractionalRatio $fEnumRatio$fRealFracRatio$fShowFractionalExponentBase $fEqRatio FiniteBits finiteBitSizecountLeadingZeroscountTrailingZerosBits.&..|.xor complementshiftrotatezeroBitsbitsetBitclearBit complementBittestBit bitSizeMaybebitSizeisSignedshiftL unsafeShiftLshiftR unsafeShiftRrotateLrotateRpopCount bitDefaulttestBitDefaultpopCountDefaulttoIntegralSized $fBitsNatural $fBitsInteger $fBitsBool$fFiniteBitsWord $fBitsWord$fFiniteBitsInt $fBitsInt$fFiniteBitsBoolSTretSTRepSTliftSTunsafeInterleaveSTunsafeDupableInterleaveSTrunST$fShowST $fMonoidST $fSemigroupST $fMonadST$fApplicativeST $fFunctorSTrangeindex unsafeIndexinRange rangeSizeunsafeRangeSize indexError $fIxTuple15 $fIxTuple14 $fIxTuple13 $fIxTuple12 $fIxTuple11 $fIxTuple10 $fIxTuple9 $fIxTuple8 $fIxTuple7 $fIxTuple6 $fIxTuple5 $fIxTuple4 $fIxTuple3 $fIxTuple2$fIxSolo$fIxUnit$fIxVoid $fIxOrdering$fIxBool $fIxNatural $fIxInteger$fIxWord$fIxInt$fIxCharW64#W32#W16#W8#eqWord8neWord8gtWord8geWord8ltWord8leWord8eqWord16neWord16gtWord16geWord16ltWord16leWord16 byteSwap16eqWord32neWord32gtWord32geWord32ltWord32leWord32 byteSwap32eqWord64neWord64gtWord64geWord64ltWord64leWord64 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 $fEqWord64STArrayArray 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 $fEqSTArrayFFFormat FFExponentFFFixed FFGeneric floatRadix floatDigits floatRange decodeFloat encodeFloatexponent significand scaleFloatisNaN isInfiniteisDenormalizedisNegativeZeroisIEEEatan2piexplogsqrt**logBasesincostanasinacosatansinhcoshtanhasinhacoshatanhlog1pexpm1log1pexplog1mexpisDoubleFiniteisDoubleNegativeZeroisDoubleDenormalizedisDoubleInfinite isDoubleNaN isFloatFiniteisFloatNegativeZeroisFloatDenormalizedisFloatInfinite isFloatNaN log1mexpOrd floorFloat ceilingFloat truncateFloat roundFloatproperFractionFloat floorDouble ceilingDoubletruncateDouble roundDoubleproperFractionDouble showFloatformatRealFloatformatRealFloatAltroundTo floatToDigitsintegerToBinaryFloat'fromRatfromRat'minExptmaxExptexptexpts maxExpt10expts10 fromRat'' roundingMode# 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 word2FloatshowSignedFloatclampstgDoubleToWord64stgWord64ToDoublestgFloatToWord32stgWord32ToFloatcastWord32ToFloatcastFloatToWord32castWord64ToDoublecastDoubleToWord64 $fEnumDouble $fEnumFloat $fShowDouble$fRealFracDouble$fFractionalDouble $fRealDouble $fNumDouble $fShowFloat$fRealFracFloat$fFractionalFloat $fRealFloat $fNumFloat$fFloatingDouble$fFloatingFloat$fRealFloatDouble$fRealFloatFloat unsafeCoerceunsafeCoerceUnliftedunsafeCoerceAddrAssert ErrorMessageNotIfStateT runStateTStateR runStateRStateL runStateLMingetMinMaxgetMax#. $fMonoidMax$fSemigroupMax $fMonoidMin$fSemigroupMin$fApplicativeStateL$fFunctorStateL$fApplicativeStateR$fFunctorStateR $fMonadStateT$fApplicativeStateT$fFunctorStateTnewSTRef readSTRef writeSTRef $fEqSTRefunsafeDupablePerformIOunsafeInterleaveIOunsafeDupableInterleaveIO noDuplicate<&>$>voidgetMonotonicTimeNSecgetMonotonicTimefixon& applyWhenGeneralCategoryUppercaseLetterLowercaseLetterTitlecaseLetterModifierLetter OtherLetterNonSpacingMarkSpacingCombiningMark EnclosingMark DecimalNumber LetterNumber OtherNumberConnectorPunctuationDashPunctuationOpenPunctuationClosePunctuation InitialQuote FinalQuoteOtherPunctuation MathSymbolCurrencySymbolModifierSymbol OtherSymbolSpace LineSeparatorParagraphSeparatorFormat Surrogate PrivateUse NotAssignedgeneralCategoryisAsciiisLatin1 isAsciiLower isAsciiUpper isControlisPrintisSpaceisUpper isUpperCaseisLower isLowerCaseisAlpha isAlphaNumisDigit isOctDigit isHexDigit isPunctuationisSymboltoUppertoLowertoTitle$fShowGeneralCategory$fEqGeneralCategory$fOrdGeneralCategory$fEnumGeneralCategory$fBoundedGeneralCategory$fIxGeneralCategoryReadPReadSgetlookpfail+++<++gathersatisfychareofstringmunchmunch1choice skipSpacescountbetweenoptionoptionalmany1skipMany skipMany1sepBysepBy1endByendBy1chainrchainlchainr1chainl1manyTill readP_to_S readS_to_P$fAlternativeP $fMonadFailP$fMonadP $fMonadPlusP$fApplicativeP$fMonadPlusReadP$fAlternativeReadP$fMonadFailReadP $fMonadReadP$fApplicativeReadP$fFunctorReadP $fFunctorPNumberLexemePuncIdentEOFnumberToInteger numberToFixednumberToRangedRationalnumberToRationallexexpecthsLex isSymbolCharlexCharreadIntPreadBinPreadOctPreadDecPreadHexP $fEqLexeme $fShowLexeme $fEqNumber $fShowNumberPrecReadPrecminPrecliftstepresetprec readPrec_to_P readP_to_Prec readPrec_to_S readS_to_Prec$fAlternativeReadPrec$fMonadPlusReadPrec$fMonadFailReadPrec$fMonadReadPrec$fApplicativeReadPrec$fFunctorReadPrecreadListreadPrec readListPrec readParenreadListDefaultreadListPrecDefault lexLitChar readLitChar lexDigitslexPexpectPparenparenslistchoose readField readFieldHash readSymField readNumber $fReadTuple15 $fReadTuple14 $fReadTuple13 $fReadTuple12 $fReadTuple11 $fReadTuple10 $fReadTuple9 $fReadTuple8 $fReadTuple7 $fReadTuple6 $fReadTuple5 $fReadTuple4 $fReadTuple3 $fReadTuple2 $fReadUnit $fReadRatio $fReadDouble $fReadFloat $fReadNatural $fReadInteger $fReadWord64 $fReadWord32 $fReadWord16 $fReadWord8 $fReadWord $fReadInt $fReadLexeme $fReadArray $fReadList $fReadMaybe$fReadOrdering $fReadBool $fReadChar $fReadSolo $fReadVoid$fReadNonEmpty$fReadGeneralCategoryreadIntreadBinreadOctreadDecreadHex readFloat readSignedshowInt showEFloat showFFloat showGFloat showFFloatAlt showGFloatAlt showHFloat showIntAtBaseshowHexshowOctshowBincastPtrplusPtralignPtrminusPtr nullFunPtr castFunPtrcastFunPtrToPtrcastPtrToFunPtr $fShowPtr $fShowFunPtr $fEqFunPtr $fOrdFunPtr$fEqPtr$fOrdPtr ThreadStatus ThreadRunningThreadFinished ThreadBlocked ThreadDied BlockReason BlockedOnMVarBlockedOnBlackHoleBlockedOnException BlockedOnSTMBlockedOnForeignCallBlockedOnOtherTVarThreadIdlabelThreadByteArray# sharedCAF threadStatus showThreadId myThreadId freeStablePtrdeRefStablePtrcastStablePtrToPtrcastPtrToStablePtr $fEqStablePtrPrimMVar newEmptyMVarnewMVartakeMVarreadMVarputMVar tryTakeMVar tryPutMVar tryReadMVar isEmptyMVaraddMVarFinalizernewStablePtrPrimMVar$fEqMVar unConstPtr$fShowConstPtr $fEqConstPtr $fOrdConstPtr$fShowFingerprint$fEqFingerprint$fOrdFingerprintfingerprintStringfingerprintFingerprintseitherleftsrightspartitionEithersisLeftisRightfromLeft fromRight $fMonadEither$fApplicativeEither$fSemigroupEither$fFunctorEither $fEqEither $fOrdEither $fReadEither $fShowEitherreads readEitherreadIffgetIffXorgetXorIorgetIorAndgetAndoneBits.^..>>..<<.!>>.!<<. $fMonoidAnd$fSemigroupAnd $fMonoidIor$fSemigroupIor $fMonoidXor$fSemigroupXor $fMonoidIff$fSemigroupIff $fBoundedIff $fEnumIff $fBitsIff$fFiniteBitsIff$fEqIff $fShowIff $fReadIff $fBoundedXor $fEnumXor $fBitsXor$fFiniteBitsXor$fEqXor $fShowXor $fReadXor $fBoundedIor $fEnumIor $fBitsIor$fFiniteBitsIor$fEqIor $fShowIor $fReadIor $fBoundedAnd $fEnumAnd $fBitsAnd$fFiniteBitsAnd$fEqAnd $fShowAnd $fReadAndI64#I32#I16#I8#eqInt8neInt8gtInt8geInt8ltInt8leInt8eqInt16neInt16gtInt16geInt16ltInt16leInt16eqInt32neInt32gtInt32geInt32ltInt32leInt32eqInt64neInt64gtInt64geInt64ltInt64leInt64 shiftRLInt8# shiftRLInt16# shiftRLInt32#$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 $fEqInt64readWideCharOffPtr 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$fStorableUnit$fStorableConstPtrDowngetDown comparing $fMonadDown$fApplicativeDown $fFunctorDown $fEnumDown $fBoundedDown $fOrdDown $fShowDown $fReadDown$fEqDown $fNumDown$fSemigroupDown $fMonoidDown $fBitsDown$fFiniteBitsDown$fFloatingDown$fFractionalDown$fIxDown $fRealDown$fRealFracDown$fRealFloatDown$fStorableDownOrdCond>?=?<=? OrderingILTIEQIGTICompare $fEqOrderingI$fShowOrderingI 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 $fEqCoercionKProxyProxy asProxyTypeOf$fMonadPlusProxy $fMonadProxy$fAlternativeProxy$fApplicativeProxy$fFunctorProxy $fMonoidProxy$fSemigroupProxy $fIxProxy $fEnumProxy $fShowProxy $fOrdProxy $fEqProxy$fBoundedProxy $fReadProxySNatSomeNatnatSingNatnatValnatVal' someNatValsameNat decideNatcmpNat withKnownNat$fTestCoercionNaturalSNat$fTestEqualityNaturalSNat $fShowSNat $fOrdSNat$fEqSNat $fReadSomeNat $fShowSomeNat $fOrdSomeNat $fEqSomeNatSCharSSymbolSomeCharcharSing SomeSymbol symbolSing symbolVal symbolVal'charValcharVal' someSymbolVal someCharVal sameSymbol decideSymbolsameChar decideChar cmpSymbolcmpChar fromSSymbolwithKnownSymbolwithSomeSSymbol fromSChar withKnownChar withSomeSChar$fTestCoercionSymbolSSymbol$fTestEqualitySymbolSSymbol $fShowSSymbol $fOrdSSymbol $fEqSSymbol$fReadSomeSymbol$fShowSomeSymbol$fOrdSomeSymbol$fEqSomeSymbol$fTestCoercionCharSChar$fTestEqualityCharSChar $fShowSChar $fOrdSChar $fEqSChar$fReadSomeChar$fShowSomeChar $fOrdSomeChar $fEqSomeCharCUIntMaxCIntMaxCUIntPtrCIntPtrCJmpBufCFposCFile CSUSeconds CUSecondsCTimeCClock CSigAtomicCWcharCSizeCPtrdiffCBoolCULLongCLLongCULongCLongCUIntCIntCUShortCShortCUCharCSCharCChar$fReadCUIntMax$fShowCUIntMax $fEqCUIntMax $fOrdCUIntMax $fNumCUIntMax$fEnumCUIntMax$fStorableCUIntMax$fRealCUIntMax$fBoundedCUIntMax$fIntegralCUIntMax$fBitsCUIntMax$fFiniteBitsCUIntMax $fIxCUIntMax $fReadCIntMax $fShowCIntMax $fEqCIntMax $fOrdCIntMax $fNumCIntMax $fEnumCIntMax$fStorableCIntMax $fRealCIntMax$fBoundedCIntMax$fIntegralCIntMax $fBitsCIntMax$fFiniteBitsCIntMax $fIxCIntMax$fReadCUIntPtr$fShowCUIntPtr $fEqCUIntPtr $fOrdCUIntPtr $fNumCUIntPtr$fEnumCUIntPtr$fStorableCUIntPtr$fRealCUIntPtr$fBoundedCUIntPtr$fIntegralCUIntPtr$fBitsCUIntPtr$fFiniteBitsCUIntPtr $fIxCUIntPtr $fReadCIntPtr $fShowCIntPtr $fEqCIntPtr $fOrdCIntPtr $fNumCIntPtr $fEnumCIntPtr$fStorableCIntPtr $fRealCIntPtr$fBoundedCIntPtr$fIntegralCIntPtr $fBitsCIntPtr$fFiniteBitsCIntPtr $fIxCIntPtr$fReadCSUSeconds$fShowCSUSeconds$fEqCSUSeconds$fOrdCSUSeconds$fNumCSUSeconds$fEnumCSUSeconds$fStorableCSUSeconds$fRealCSUSeconds$fReadCUSeconds$fShowCUSeconds $fEqCUSeconds$fOrdCUSeconds$fNumCUSeconds$fEnumCUSeconds$fStorableCUSeconds$fRealCUSeconds $fReadCTime $fShowCTime $fEqCTime $fOrdCTime $fNumCTime $fEnumCTime$fStorableCTime $fRealCTime $fReadCClock $fShowCClock $fEqCClock $fOrdCClock $fNumCClock $fEnumCClock$fStorableCClock $fRealCClock$fReadCSigAtomic$fShowCSigAtomic$fEqCSigAtomic$fOrdCSigAtomic$fNumCSigAtomic$fEnumCSigAtomic$fStorableCSigAtomic$fRealCSigAtomic$fBoundedCSigAtomic$fIntegralCSigAtomic$fBitsCSigAtomic$fFiniteBitsCSigAtomic$fIxCSigAtomic $fReadCWchar $fShowCWchar $fEqCWchar $fOrdCWchar $fNumCWchar $fEnumCWchar$fStorableCWchar $fRealCWchar$fBoundedCWchar$fIntegralCWchar $fBitsCWchar$fFiniteBitsCWchar $fIxCWchar $fReadCSize $fShowCSize $fEqCSize $fOrdCSize $fNumCSize $fEnumCSize$fStorableCSize $fRealCSize$fBoundedCSize$fIntegralCSize $fBitsCSize$fFiniteBitsCSize $fIxCSize$fReadCPtrdiff$fShowCPtrdiff $fEqCPtrdiff $fOrdCPtrdiff $fNumCPtrdiff$fEnumCPtrdiff$fStorableCPtrdiff$fRealCPtrdiff$fBoundedCPtrdiff$fIntegralCPtrdiff$fBitsCPtrdiff$fFiniteBitsCPtrdiff $fIxCPtrdiff $fReadCDouble $fShowCDouble $fEqCDouble $fOrdCDouble $fNumCDouble $fEnumCDouble$fStorableCDouble $fRealCDouble$fFractionalCDouble$fFloatingCDouble$fRealFracCDouble$fRealFloatCDouble $fReadCFloat $fShowCFloat $fEqCFloat $fOrdCFloat $fNumCFloat $fEnumCFloat$fStorableCFloat $fRealCFloat$fFractionalCFloat$fFloatingCFloat$fRealFracCFloat$fRealFloatCFloat $fReadCBool $fShowCBool $fEqCBool $fOrdCBool $fNumCBool $fEnumCBool$fStorableCBool $fRealCBool$fBoundedCBool$fIntegralCBool $fBitsCBool$fFiniteBitsCBool $fIxCBool $fReadCULLong $fShowCULLong $fEqCULLong $fOrdCULLong $fNumCULLong $fEnumCULLong$fStorableCULLong $fRealCULLong$fBoundedCULLong$fIntegralCULLong $fBitsCULLong$fFiniteBitsCULLong $fIxCULLong $fReadCLLong $fShowCLLong $fEqCLLong $fOrdCLLong $fNumCLLong $fEnumCLLong$fStorableCLLong $fRealCLLong$fBoundedCLLong$fIntegralCLLong $fBitsCLLong$fFiniteBitsCLLong $fIxCLLong $fReadCULong $fShowCULong $fEqCULong $fOrdCULong $fNumCULong $fEnumCULong$fStorableCULong $fRealCULong$fBoundedCULong$fIntegralCULong $fBitsCULong$fFiniteBitsCULong $fIxCULong $fReadCLong $fShowCLong $fEqCLong $fOrdCLong $fNumCLong $fEnumCLong$fStorableCLong $fRealCLong$fBoundedCLong$fIntegralCLong $fBitsCLong$fFiniteBitsCLong $fIxCLong $fReadCUInt $fShowCUInt $fEqCUInt $fOrdCUInt $fNumCUInt $fEnumCUInt$fStorableCUInt $fRealCUInt$fBoundedCUInt$fIntegralCUInt $fBitsCUInt$fFiniteBitsCUInt $fIxCUInt $fReadCInt $fShowCInt$fEqCInt $fOrdCInt $fNumCInt $fEnumCInt$fStorableCInt $fRealCInt $fBoundedCInt$fIntegralCInt $fBitsCInt$fFiniteBitsCInt$fIxCInt $fReadCUShort $fShowCUShort $fEqCUShort $fOrdCUShort $fNumCUShort $fEnumCUShort$fStorableCUShort $fRealCUShort$fBoundedCUShort$fIntegralCUShort $fBitsCUShort$fFiniteBitsCUShort $fIxCUShort $fReadCShort $fShowCShort $fEqCShort $fOrdCShort $fNumCShort $fEnumCShort$fStorableCShort $fRealCShort$fBoundedCShort$fIntegralCShort $fBitsCShort$fFiniteBitsCShort $fIxCShort $fReadCUChar $fShowCUChar $fEqCUChar $fOrdCUChar $fNumCUChar $fEnumCUChar$fStorableCUChar $fRealCUChar$fBoundedCUChar$fIntegralCUChar $fBitsCUChar$fFiniteBitsCUChar $fIxCUChar $fReadCSChar $fShowCSChar $fEqCSChar $fOrdCSChar $fNumCSChar $fEnumCSChar$fStorableCSChar $fRealCSChar$fBoundedCSChar$fIntegralCSChar $fBitsCSChar$fFiniteBitsCSChar $fIxCSChar $fReadCChar $fShowCChar $fEqCChar $fOrdCChar $fNumCChar $fEnumCChar$fStorableCChar $fRealCChar$fBoundedCChar$fIntegralCChar $fBitsCChar$fFiniteBitsCChar $fIxCCharLimitProcessGroupID FileOffset ProcessIDFileModeFileIDDeviceID EpochTime ClockTick ByteCountGroupIDUserID LinkCountFdCNfdsCSocklenCTimerCKeyCId CFsFilCnt CFsBlkCntCClockIdCBlkCntCBlkSizeCRLimCTcflagCSpeedCCcCUidCNlinkCGidCSsizeCPidCOffCModeCInoCDev$fReadFd$fShowFd$fEqFd$fOrdFd$fNumFd$fEnumFd $fStorableFd$fRealFd $fBoundedFd $fIntegralFd$fBitsFd$fFiniteBitsFd$fIxFd $fReadCNfds $fShowCNfds $fEqCNfds $fOrdCNfds $fNumCNfds $fEnumCNfds$fStorableCNfds $fRealCNfds$fBoundedCNfds$fIntegralCNfds $fBitsCNfds$fFiniteBitsCNfds $fIxCNfds$fReadCSocklen$fShowCSocklen $fEqCSocklen $fOrdCSocklen $fNumCSocklen$fEnumCSocklen$fStorableCSocklen$fRealCSocklen$fBoundedCSocklen$fIntegralCSocklen$fBitsCSocklen$fFiniteBitsCSocklen $fIxCSocklen $fShowCTimer $fEqCTimer $fOrdCTimer$fStorableCTimer $fReadCKey $fShowCKey$fEqCKey $fOrdCKey $fNumCKey $fEnumCKey$fStorableCKey $fRealCKey $fBoundedCKey$fIntegralCKey $fBitsCKey$fFiniteBitsCKey$fIxCKey $fReadCId $fShowCId$fEqCId$fOrdCId$fNumCId $fEnumCId $fStorableCId $fRealCId $fBoundedCId $fIntegralCId $fBitsCId$fFiniteBitsCId$fIxCId$fReadCFsFilCnt$fShowCFsFilCnt $fEqCFsFilCnt$fOrdCFsFilCnt$fNumCFsFilCnt$fEnumCFsFilCnt$fStorableCFsFilCnt$fRealCFsFilCnt$fBoundedCFsFilCnt$fIntegralCFsFilCnt$fBitsCFsFilCnt$fFiniteBitsCFsFilCnt $fIxCFsFilCnt$fReadCFsBlkCnt$fShowCFsBlkCnt $fEqCFsBlkCnt$fOrdCFsBlkCnt$fNumCFsBlkCnt$fEnumCFsBlkCnt$fStorableCFsBlkCnt$fRealCFsBlkCnt$fBoundedCFsBlkCnt$fIntegralCFsBlkCnt$fBitsCFsBlkCnt$fFiniteBitsCFsBlkCnt $fIxCFsBlkCnt$fReadCClockId$fShowCClockId $fEqCClockId $fOrdCClockId $fNumCClockId$fEnumCClockId$fStorableCClockId$fRealCClockId$fBoundedCClockId$fIntegralCClockId$fBitsCClockId$fFiniteBitsCClockId $fIxCClockId $fReadCBlkCnt $fShowCBlkCnt $fEqCBlkCnt $fOrdCBlkCnt $fNumCBlkCnt $fEnumCBlkCnt$fStorableCBlkCnt $fRealCBlkCnt$fBoundedCBlkCnt$fIntegralCBlkCnt $fBitsCBlkCnt$fFiniteBitsCBlkCnt $fIxCBlkCnt$fReadCBlkSize$fShowCBlkSize $fEqCBlkSize $fOrdCBlkSize $fNumCBlkSize$fEnumCBlkSize$fStorableCBlkSize$fRealCBlkSize$fBoundedCBlkSize$fIntegralCBlkSize$fBitsCBlkSize$fFiniteBitsCBlkSize $fIxCBlkSize $fReadCRLim $fShowCRLim $fEqCRLim $fOrdCRLim $fNumCRLim $fEnumCRLim$fStorableCRLim $fRealCRLim$fBoundedCRLim$fIntegralCRLim $fBitsCRLim$fFiniteBitsCRLim $fIxCRLim $fReadCTcflag $fShowCTcflag $fEqCTcflag $fOrdCTcflag $fNumCTcflag $fEnumCTcflag$fStorableCTcflag $fRealCTcflag$fBoundedCTcflag$fIntegralCTcflag $fBitsCTcflag$fFiniteBitsCTcflag $fIxCTcflag $fReadCSpeed $fShowCSpeed $fEqCSpeed $fOrdCSpeed $fNumCSpeed $fEnumCSpeed$fStorableCSpeed $fRealCSpeed $fReadCCc $fShowCCc$fEqCCc$fOrdCCc$fNumCCc $fEnumCCc $fStorableCCc $fRealCCc $fReadCUid $fShowCUid$fEqCUid $fOrdCUid $fNumCUid $fEnumCUid$fStorableCUid $fRealCUid $fBoundedCUid$fIntegralCUid $fBitsCUid$fFiniteBitsCUid$fIxCUid $fReadCNlink $fShowCNlink $fEqCNlink $fOrdCNlink $fNumCNlink $fEnumCNlink$fStorableCNlink $fRealCNlink$fBoundedCNlink$fIntegralCNlink $fBitsCNlink$fFiniteBitsCNlink $fIxCNlink $fReadCGid $fShowCGid$fEqCGid $fOrdCGid $fNumCGid $fEnumCGid$fStorableCGid $fRealCGid $fBoundedCGid$fIntegralCGid $fBitsCGid$fFiniteBitsCGid$fIxCGid $fReadCSsize $fShowCSsize $fEqCSsize $fOrdCSsize $fNumCSsize $fEnumCSsize$fStorableCSsize $fRealCSsize$fBoundedCSsize$fIntegralCSsize $fBitsCSsize$fFiniteBitsCSsize $fIxCSsize $fReadCPid $fShowCPid$fEqCPid $fOrdCPid $fNumCPid $fEnumCPid$fStorableCPid $fRealCPid $fBoundedCPid$fIntegralCPid $fBitsCPid$fFiniteBitsCPid$fIxCPid $fReadCOff $fShowCOff$fEqCOff $fOrdCOff $fNumCOff $fEnumCOff$fStorableCOff $fRealCOff $fBoundedCOff$fIntegralCOff $fBitsCOff$fFiniteBitsCOff$fIxCOff $fReadCMode $fShowCMode $fEqCMode $fOrdCMode $fNumCMode $fEnumCMode$fStorableCMode $fRealCMode$fBoundedCMode$fIntegralCMode $fBitsCMode$fFiniteBitsCMode $fIxCMode $fReadCIno $fShowCIno$fEqCIno $fOrdCIno $fNumCIno $fEnumCIno$fStorableCIno $fRealCIno $fBoundedCIno$fIntegralCIno $fBitsCIno$fFiniteBitsCIno$fIxCIno $fReadCDev $fShowCDev$fEqCDev $fOrdCDev $fNumCDev $fEnumCDev$fStorableCDev $fRealCDev $fBoundedCDev$fIntegralCDev $fBitsCDev$fFiniteBitsCDev$fIxCDevIOModeReadMode WriteMode AppendMode ReadWriteMode $fEqIOMode $fOrdIOMode $fIxIOMode $fEnumIOMode $fReadIOMode $fShowIOModeIntPtrWordPtr ptrToWordPtr wordPtrToPtr ptrToIntPtr intPtrToPtr $fReadIntPtr $fShowIntPtr $fEqIntPtr $fOrdIntPtr $fNumIntPtr $fEnumIntPtr$fStorableIntPtr $fRealIntPtr$fBoundedIntPtr$fIntegralIntPtr $fBitsIntPtr$fFiniteBitsIntPtr $fIxIntPtr $fReadWordPtr $fShowWordPtr $fEqWordPtr $fOrdWordPtr $fNumWordPtr $fEnumWordPtr$fStorableWordPtr $fRealWordPtr$fBoundedWordPtr$fIntegralWordPtr $fBitsWordPtr$fFiniteBitsWordPtr $fIxWordPtrMeta Generically1 Genericallyfrom1to1fromtoselNameselSourceUnpackednessselSourceStrictnessselDecidedStrictnessDecidedStrictnessSourceStrictnessSourceUnpackedness 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$fMonoidGenerically$fSemigroupGenerically$fAlternativeGenerically1$fApplicativeGenerically1$fFunctorGenerically1$fOrdGenerically1$fEqGenerically1%$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$fGeneric1TYPETuple15$fGeneric1TYPETuple14$fGeneric1TYPETuple13$fGeneric1TYPETuple12$fGeneric1TYPETuple11$fGeneric1TYPETuple10$fGeneric1TYPETuple9$fGeneric1TYPETuple8$fGeneric1TYPETuple7$fGeneric1TYPETuple6$fGeneric1TYPETuple5$fGeneric1TYPETuple4$fGeneric1TYPETuple3$fGeneric1TYPETuple2$fGeneric1TYPESolo$fGeneric1kProxy$fGeneric1TYPEEither$fGeneric1TYPEMaybe$fGeneric1TYPENonEmpty$fGeneric1TYPEList$fGenericFingerprint$fGenericGeneralCategory$fGenericSrcLoc $fGenericDown$fGenericTuple15$fGenericTuple14$fGenericTuple13$fGenericTuple12$fGenericTuple11$fGenericTuple10$fGenericTuple9$fGenericTuple8$fGenericTuple7$fGenericTuple6$fGenericTuple5$fGenericTuple4$fGenericTuple3$fGenericTuple2 $fGenericSolo $fGenericUnit$fGenericProxy$fGenericOrdering $fGenericBool$fGenericEither$fGenericMaybe$fGenericNonEmpty $fGenericList $fGenericVoid $fMonoid:.:$fSemigroup:.: $fMonoidM1 $fSemigroupM1 $fMonadPlusM1 $fMonadM1$fAlternativeM1$fApplicativeM1 $fMonoidK1 $fSemigroupK1 $fMonoidRec1$fSemigroupRec1$fMonadPlusRec1$fAlternativeRec1$fApplicativeRec1 $fMonoidPar1$fSemigroupPar1$fReadU1AltgetAlt getProductgetSumgetAnyAllgetAllEndoappEndoDualgetDual stimesMonoidstimesEndoError $fMonadDual$fApplicativeDual $fFunctorDual $fMonoidDual$fSemigroupDual $fMonoidEndo$fSemigroupEndo $fMonoidAll$fSemigroupAll $fMonoidAny$fSemigroupAny $fMonadSum$fApplicativeSum $fFunctorSum $fMonoidSum$fSemigroupSum$fMonadProduct$fApplicativeProduct$fFunctorProduct$fMonoidProduct$fSemigroupProduct $fMonoidAlt$fSemigroupAlt $fGenericAlt$fGeneric1kAlt $fReadAlt $fShowAlt$fEqAlt$fOrdAlt$fNumAlt $fEnumAlt $fMonadAlt$fMonadPlusAlt$fApplicativeAlt$fAlternativeAlt $fFunctorAlt $fEqProduct $fOrdProduct $fReadProduct $fShowProduct$fBoundedProduct$fGenericProduct$fGeneric1TYPEProduct $fNumProduct$fEqSum$fOrdSum $fReadSum $fShowSum $fBoundedSum $fGenericSum$fGeneric1TYPESum$fNumSum$fEqAny$fOrdAny $fReadAny $fShowAny $fBoundedAny $fGenericAny$fEqAll$fOrdAll $fReadAll $fShowAll $fBoundedAll $fGenericAll $fGenericEndo$fEqDual $fOrdDual $fReadDual $fShowDual $fBoundedDual $fGenericDual$fGeneric1TYPEDualApgetApgetLastgetFirst $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 $fMonadFirstfoldfoldMap'foldrMfoldlMasummsumfind $fFoldableU1 $fFoldableAp $fFoldableAlt$fFoldableLast$fFoldableFirst$fFoldableProduct $fFoldableSum$fFoldableDual$fFoldableProxy$fFoldableArray$fFoldableTuple2$fFoldableEither$fFoldableNonEmpty$fFoldableList$fFoldableMaybe$fFoldableDown$fFoldableURec$fFoldableURec0$fFoldableURec1$fFoldableURec2$fFoldableURec3$fFoldableURec4 $fFoldable:.: $fFoldable:*: $fFoldable:+: $fFoldableM1 $fFoldableK1$fFoldableRec1$fFoldablePar1 $fFoldableV1$fFoldableSoloConstgetConst$fApplicativeConst$fFunctorConst$fFoldableConst $fShowConst $fReadConst $fBitsConst$fBoundedConst $fEnumConst $fEqConst$fFiniteBitsConst$fFloatingConst$fFractionalConst$fGenericConst$fGeneric1kConst$fIntegralConst $fIxConst$fSemigroupConst $fMonoidConst $fNumConst $fOrdConst $fRealConst$fRealFracConst$fRealFloatConst$fStorableConst $fEqByteOrder$fOrdByteOrder$fBoundedByteOrder$fEnumByteOrder$fReadByteOrder$fShowByteOrder$fGenericByteOrder ClosureTypeINVALID_OBJECTCONSTR CONSTR_1_0 CONSTR_0_1 CONSTR_2_0 CONSTR_1_1 CONSTR_0_2 CONSTR_NOCAFFUN_1_0FUN_0_1FUN_2_0FUN_1_1FUN_0_2 FUN_STATICTHUNK THUNK_1_0 THUNK_0_1 THUNK_2_0 THUNK_1_1 THUNK_0_2 THUNK_STATICTHUNK_SELECTORAPPAPAP_STACKIND IND_STATICRET_BCO RET_SMALLRET_BIGRET_FUN UPDATE_FRAME CATCH_FRAMEUNDERFLOW_FRAME STOP_FRAMEBLOCKING_QUEUE BLACKHOLE MVAR_CLEAN MVAR_DIRTYTVAR ARR_WORDSMUT_ARR_PTRS_CLEANMUT_ARR_PTRS_DIRTYMUT_ARR_PTRS_FROZEN_DIRTYMUT_ARR_PTRS_FROZEN_CLEAN MUT_VAR_CLEAN MUT_VAR_DIRTYWEAKPRIMMUT_PRIMTSOSTACK TREC_CHUNKATOMICALLY_FRAMECATCH_RETRY_FRAMECATCH_STM_FRAME WHITEHOLESMALL_MUT_ARR_PTRS_CLEANSMALL_MUT_ARR_PTRS_DIRTYSMALL_MUT_ARR_PTRS_FROZEN_DIRTYSMALL_MUT_ARR_PTRS_FROZEN_CLEANCOMPACT_NFDATA CONTINUATIONN_CLOSURE_TYPES$fEnumClosureType$fEqClosureType$fOrdClosureType$fShowClosureType$fGenericClosureTypeKindRepTypeLitCon'ConAppFun modulePackage tyConPackage tyConModule tyConNametyConFingerprint tyConKindArgs tyConKindRep rnfModulernfTyContypeRepFingerprint trLiftedRep withTypeablesomeTypeRepTyCon typeRepTyCon eqTypeRep decTypeRep typeRepKindtypeReptypeOf someTypeRepsomeTypeRepFingerprint splitApps rnfTypeReprnfSomeTypeRepmkTyConExceptionAnnotationdisplayExceptionAnnotationSomeExceptionAnnotationaddExceptionAnnotationgetExceptionAnnotationsgetAllExceptionAnnotationsmergeExceptionContextdisplayExceptionContext$fMonoidExceptionContext$fSemigroupExceptionContext BacktracescollectBacktraces showsTypeRepcasteqTdecTheqThdecTgcastgcast1gcast2 funResultTymkFunTy splitTyConApp typeRepArgstypeOf1typeOf2typeOf3typeOf4typeOf5typeOf6typeOf7ArithExceptionLossOfPrecision DivideByZeroDenormalRatioZeroDenominatorExceptionWithContext NoBacktrace toException fromExceptiondisplayExceptionbacktraceDesiredHasExceptionContextsomeExceptionContextmapExceptionContext$fExceptionSomeException$fExceptionVoid$fShowSomeException$fExceptionNoBacktrace$fExceptionExceptionWithContext$fShowExceptionWithContext$fShowArithException$fExceptionArithException$fEqArithException$fOrdArithException$fShowNoBacktrace dropWhileEnd stripPrefix elemIndex elemIndices findIndex findIndices isPrefixOf isSuffixOf isInfixOfnubnubBydeletedeleteBy\\unionunionBy intersect intersectBy intersperse intercalate transpose partition mapAccumL mapAccumRinsertinsertByzip4zip5zip6zip7zipWith4zipWith5zipWith6zipWith7unzip4unzip5unzip6unzip7deleteFirstsByinitstails subsequences permutationssortsortBy singletonunfoldrlinesunlineswordsunwords ErrorCallErrorCallWithLocationtoExceptionWithBacktrace showCCSStack$fShowErrorCall$fExceptionErrorCall $fEqErrorCall$fOrdErrorCallunsupportedOperation userError MaskingStateUnmaskedMaskedInterruptibleMaskedUninterruptibleFilePathioToST unsafeIOToST unsafeSTToIOcatchExceptioncatchAny annotateIO unsafeUnmask interruptiblegetMaskingState onExceptionmask_uninterruptibleMask_uninterruptibleMaskfinallyevaluate$fEqMaskingState$fShowMaskingStateIORefnewIORef readIORef writeIORefatomicModifyIORef2LazyatomicModifyIORef2atomicModifyIORefPatomicModifyIORefLazy_atomicModifyIORef'_atomicSwapIORefatomicModifyIORef' $fEqIORefFinalizerEnvPtr FinalizerPtrForeignPtrContentsPlainForeignPtrFinalPtr MallocPtrPlainPtr Finalizers NoFinalizers CFinalizersHaskellFinalizersnewConcForeignPtrmallocForeignPtrmallocForeignPtrBytesmallocForeignPtrAlignedBytesmallocPlainForeignPtrmallocPlainForeignPtrBytes!mallocPlainForeignPtrAlignedBytesaddForeignPtrFinalizerEnvaddForeignPtrConcFinalizernewForeignPtr_unsafeWithForeignPtrunsafeForeignPtrToPtrcastForeignPtrplusForeignPtrfinalizeForeignPtr$fShowForeignPtr$fOrdForeignPtr$fEqForeignPtrnewForeignPtrEnvmallocForeignPtrArraymallocForeignPtrArray0 BufferState ReadBuffer WriteBuffer CharBufferBufferbufRbufL bufOffsetbufSizebufStatebufRaw RawCharBuffer CharBufElem RawBuffer readWord8Buf writeWord8Buf peekCharBuf readCharBuf writeCharBufreadCharBufPtrwriteCharBufPtrcharSize withBuffer withRawBuffer isEmptyBuffer isFullBufferisFullCharBuffer isWriteBuffer bufferElemsbufferAvailable bufferRemove bufferAdjustL bufferAdd bufferOffsetbufferAdjustOffsetbufferAddOffset emptyBuffer newByteBuffer newCharBuffer newBuffer slideContents summaryBuffer checkBuffer$fEqBufferStateCodingProgressInputUnderflowOutputUnderflowInvalidSequence mkTextEncoder mkTextDecodertextEncodingName TextEncoder TextDecoderEncodingBuffer#DecodingBuffer# EncodeBuffer# DecodeBuffer# EncodeBuffer DecodeBuffer CodeBuffer BufferCodec BufferCodec# setState# getState#close#recover#encode#encoderecoverclosegetStatesetState$fShowTextEncoding$fEqCodingProgress$fShowCodingProgressgetLocaleEncodinggetFileSystemEncodinggetForeignEncodingSeekMode AbsoluteSeek RelativeSeek SeekFromEnd IODeviceType DirectoryStream RegularFile RawDeviceready isTerminal isSeekableseektellgetSizesetSizesetEchogetEchosetRawdevTypedupdup2RawIOreadNonBlockingwritewriteNonBlocking $fEqSeekMode $fOrdSeekMode $fIxSeekMode$fEnumSeekMode$fReadSeekMode$fShowSeekMode$fEqIODeviceType BufferedIOfillReadBufferfillReadBuffer0emptyWriteBufferflushWriteBufferflushWriteBuffer0readBufreadBufNonBlockingwriteBufwriteBufNonBlocking NewlineModeoutputNLinputNLNewlineLFCRLF BufferMode NoBuffering LineBufferingBlockBuffering HandleType ClosedHandleSemiClosedHandle ReadHandle WriteHandle AppendHandleReadWriteHandle BufferList BufferListNilBufferListConsHandle__ haOtherSide haOutputNL haInputNLhaCodec haDecoder haEncoder haBuffers haCharBuffer haLastDecode haBufferMode haByteBufferhaTypehaDevice FileHandle DuplexHandleisReadableHandleTypeisWritableHandleTypeisReadWriteHandleTypeisAppendHandleTypecheckHandleInvariants nativeNewlineuniversalNewlineModenativeNewlineModenoNewlineTranslation showHandle$fShowHandleType $fShowHandle $fEqHandle$fEqNewlineMode$fOrdNewlineMode$fReadNewlineMode$fShowNewlineMode $fEqNewline $fOrdNewline $fReadNewline $fShowNewline$fEqBufferMode$fOrdBufferMode$fReadBufferMode$fShowBufferModeIOArray newIOArrayunsafeReadIOArrayunsafeWriteIOArray readIOArray writeIOArray boundsIOArray $fEqIOArray TimeoutKeyTK TimeoutEditTimeoutCallback TimeoutQueue$fEqTimeoutKey$fOrdTimeoutKeyutf8DecodeCharAddr#utf8DecodeCharPtrutf8DecodeCharByteArray#utf8DecodeForeignPtrutf8DecodeByteArray#utf8CompareByteArray#utf8CountCharsByteArray# utf8EncodePtrutf8EncodeByteArray#utf8EncodedLengthrunFinalizerBatchgetFinalizerExceptionHandlersetFinalizerExceptionHandler&printToHandleFinalizerExceptionHandlerWeakmkWeak deRefWeakfinalize mkWeakIORef modifyIORef modifyIORef'DynamicfromDyn fromDynamicdynApplydynApp dynTypeRep$fExceptionDynamic $fShowDynamicLockMode SharedLock ExclusiveLockFileLockingNotSupported IOErrorType AlreadyExists NoSuchThing ResourceBusyResourceExhaustedIllegalOperationPermissionDenied UserErrorUnsatisfiedConstraints SystemError ProtocolError OtherErrorInvalidArgumentInappropriateType HardwareFaultUnsupportedOperation TimeExpiredResourceVanished Interrupted ioe_filename ioe_errnoioe_description ioe_locationioe_type ioe_handleExitCode ExitSuccess ExitFailureFixIOExceptionArrayExceptionIndexOutOfBoundsUndefinedElementAsyncException StackOverflow HeapOverflow ThreadKilled UserInterruptSomeAsyncExceptionCompactionFailedAllocationLimitExceededDeadlockBlockedIndefinitelyOnSTMBlockedIndefinitelyOnMVarblockedIndefinitelyOnMVarblockedIndefinitelyOnSTMallocationLimitExceededcannotCompactFunctioncannotCompactPinnedcannotCompactMutableasyncExceptionToExceptionasyncExceptionFromException 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$fOrdAsyncExceptioncalloc 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 advancePtrCodingFailureModeErrorOnCodingFailureIgnoreCodingFailureTransliterateCodingFailureRoundtripFailurecodingFailureModeSuffix isSurrogaterecoverDecode# recoverDecoderecoverEncode# 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_encode CStringLen peekCStringpeekCStringLen newCString newCStringLen withCStringwithCStringLennewCStringLen0withCStringLen0withCStringsLencharIsRepresentable CWStringLenCWStringcastCCharToCharcastCharToCCharcastCUCharToCharcastCharToCUCharcastCSCharToCharcastCharToCSChar peekCAStringpeekCAStringLen newCAStringnewCAStringLen withCAStringwithCAStringLen peekCWStringpeekCWStringLen newCWStringnewCWStringLen withCWStringwithCWStringLenRTSFlagshpcFlagsparFlags tickyFlags traceFlagsprofilingFlagscostCentreFlags debugFlags miscFlagsconcurrentFlagsgcFlagsHpcFlags writeTixFileParFlags setAffinity parGcThreadsparGcNoSyncWithIdleparGcLoadBalancingGenparGcLoadBalancingEnabledparGcGen parGcEnabledmaxLocalSparksmigrate nCapabilities TickyFlags tickyFileshowTickyStats TraceFlagsuser sparksFull sparksSampledtraceNonmovingGctraceGctraceScheduler timestamptracingDoTrace TraceNone TraceEventLog TraceStderr ProfFlags eraSelector bioSelectorretainerSelector ccsSelector ccSelector typeSelector descrSelector modSelector ccsLengthmaxRetainerSetSizeautomaticEraIncrementshowCCSOnExceptionstartTimeProfileAtStartupstartHeapProfileAtStartupheapProfileIntervalTicksheapProfileInterval doHeapProfile DoHeapProfileNoHeapProfiling HeapByCCS HeapByMod HeapByDescr HeapByTypeHeapByRetainer HeapByLDVHeapByClosureTypeHeapByInfoTable HeapByEraCCFlags msecsPerTick profilerTicks doCostCentres DoCostCentresCostCentresNoneCostCentresSummaryCostCentresVerboseCostCentresAllCostCentresJSON DebugFlagssparkshpcsqueezestmlinkerprofstablesanity block_alloc nonmoving_gcgcgccafsweak interpreter scheduler MiscFlagsnumIoWorkerThreads ioManager linkerMemBaselinkerAlwaysPicinternalCountersdisableDelayedOsMemoryReturnmachineReadablegenerateStackTracegenerateCrashDumpFileinstallSEHHandlersinstallSignalHandlers tickInterval ConcFlagsctxtSwitchTicksctxtSwitchTimeGCFlagsnumaMasknumaallocLimitGraceheapBasedoIdleGCidleGCDelayTimeringBellsweepcompactThresholdsqueezeUpdFrames generations pcFreeHeapreturnDecayFactor oldGenFactorheapSizeSuggestionAutoheapSizeSuggestion minOldGenSizenurseryChunkSize largeAllocLimminAllocAreaSize maxHeapSizestkChunkBufferSize stkChunkSizeinitialStkSize maxStkSize giveStats statsFile IoSubSystemIoPOSIXIoNative GiveGCStats NoGCStatsCollectGCStatsOneLineGCStatsSummaryGCStatsVerboseGCStatsRtsTime getRTSFlags getGCFlags getParFlags getHpcFlags getConcFlags getMiscFlagsgetIoManagerFlag getDebugFlags getCCFlags getProfFlags getTraceFlags getTickyFlags$fEnumGiveGCStats$fStorableIoSubSystem$fEnumIoSubSystem$fEnumDoCostCentres$fEnumDoHeapProfile $fEnumDoTrace$fShowRTSFlags$fGenericRTSFlags$fShowHpcFlags$fGenericHpcFlags$fShowParFlags$fGenericParFlags$fShowTickyFlags$fGenericTickyFlags$fShowTraceFlags$fGenericTraceFlags $fShowDoTrace$fGenericDoTrace$fShowProfFlags$fGenericProfFlags$fShowDoHeapProfile$fGenericDoHeapProfile $fShowCCFlags$fGenericCCFlags$fShowDoCostCentres$fGenericDoCostCentres$fShowDebugFlags$fGenericDebugFlags$fShowMiscFlags$fGenericMiscFlags$fShowConcFlags$fGenericConcFlags $fShowGCFlags$fGenericGCFlags$fEqIoSubSystem$fShowIoSubSystem$fShowGiveGCStats$fGenericGiveGCStats conditionalisWindowsNativeIO ioSubSystemwithIoSubSystemwithIoSubSystem'whenIoSubSystemErrnoeOKe2BIGeACCES 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 $fEqErrno 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_isattyc_dup2c_dupc_creatc_closec_chmodc_accessc_lseekc_pipe c_safe_writec_writec_umask c_safe_readc_readlstatc_fstat c_safe_open_rtsIsThreaded_c_interruptible_open_c_openset_saved_termiosget_saved_termiosputs fdFileSizefileTypefdStatfdType statGetTypestatGetType_maybeioe_unknownfiletype fdGetMode withFilePath newFilePath peekFilePathpeekFilePathLencheckForInteriorNulsthrowInternalNulError setCooked tcSetAttrsetNonBlockingFDsetCloseOnExecc_interruptible_open c_safe_openhostIsThreadeds_isregs_ischrs_isblks_isdirs_isfifos_issocklocaleEncodingName iconvEncodingmkIconvEncodingreportHeapOverflow fromThreadIdgetAllocationCounterdisableAllocationLimitforkOnforkOnWithUnmasknumCapabilitiesgetNumCapabilitiessetNumCapabilitiesgetNumProcessors numSparks childHandleryield labelThreadpseqpar runSparks listThreadsthreadCapability threadLabelmkWeakThreadId unsafeIOToSTMretryorElsethrowSTMcatchSTMnewTVar newTVarIO readTVarIOreadTVar writeTVarwithMVar modifyMVar_reportStackOverflow reportErrorsetUncaughtExceptionHandlergetUncaughtExceptionHandler $fOrdThreadId $fEqThreadId$fShowThreadId$fMonadPlusSTM$fAlternativeSTM $fMonoidSTM$fSemigroupSTM $fMonadSTM$fApplicativeSTM $fFunctorSTM$fEqTVar$fEqThreadStatus$fOrdThreadStatus$fShowThreadStatus$fEqBlockReason$fOrdBlockReason$fShowBlockReasonNoMatchingContinuationPromptNestedAtomicallyNonTermination NoMethodError RecUpdError RecConError RecSelErrorPatternMatchFail catchJusthandle handleJust mapExceptiontryJustbracket_bracketOnErrornonTerminationnestedAtomicallynoMatchingContinuationPrompt$fExceptionPatternMatchFail$fShowPatternMatchFail$fExceptionRecSelError$fShowRecSelError$fExceptionRecConError$fShowRecConError$fExceptionRecUpdError$fShowRecUpdError$fExceptionNoMethodError$fShowNoMethodError$fExceptionTypeError$fShowTypeError$fExceptionNonTermination$fShowNonTermination$fExceptionNestedAtomically$fShowNestedAtomically'$fExceptionNoMatchingContinuationPrompt"$fShowNoMatchingContinuationPrompt tryIOError mkIOErrorisAlreadyExistsError isUserErrorisResourceVanishedErroralreadyExistsErrorTypedoesNotExistErrorTypealreadyInUseErrorType fullErrorType eofErrorTypeillegalOperationErrorTypepermissionErrorType userErrorTyperesourceVanishedErrorTypeisAlreadyExistsErrorTypeisDoesNotExistErrorTypeisAlreadyInUseErrorTypeisFullErrorTypeisEOFErrorTypeisIllegalOperationErrorTypeisPermissionErrorTypeisUserErrorTypeisResourceVanishedErrorTypeioeGetErrorTypeioeGetErrorStringioeGetLocation ioeGetHandleioeGetFileNameioeSetErrorTypeioeSetErrorStringioeSetLocation ioeSetHandleioeSetFileName modifyIOErrorannotateIOError catchIOErrorswapMVarwithMVarMasked modifyMVarmodifyMVarMasked_modifyMVarMasked mkWeakMVarHandlercatchesallowInterrupt$fFunctorHandlerfixST HandlerFunSignal setHandler runHandlersrunHandlersPtrLifetimeOneShot MultiShotEventevtReadevtWrite TimerManagerregisterTimeoutunregisterTimeout updateTimeout EventManager IOCallbackFdKeykeyFd registerFd unregisterFd_ unregisterFdcloseFdgetSystemEventManagergetSystemTimerManagerensureIOManagerIsRunninginterruptIOManagerioManagerCapabilitiesChangedthreadWaitReadthreadWaitWritethreadWaitReadSTMthreadWaitWriteSTM closeFdWith registerDelayfdIsNonBlockingfdFD openFileWithmkFDreleasesetNonBlockingModereadRawBufferPtrreadRawBufferPtrNoBlockwriteRawBufferPtr$fBufferedIOFD $fIODeviceFD $fRawIOFD$fShowFDsetFileSystemEncodingsetForeignEncodinginitLocaleEncoding argvEncodingchar8 CostCentreCostCentreStack getCurrentCCSgetCCSOfclearCCSccsCC ccsParentccLabelccModule ccSrcSpan ccsToStrings whoCreated renderStackHandleFinalizeraddHandleFinalizer withHandle withHandle' withHandle_ withHandle_'withAllHandles__ withHandle__'augmentIOErrorwantWritableHandlewantReadableHandlewantReadableHandle_wantSeekableHandleioe_closedHandleioe_semiclosedHandleioe_EOFioe_notReadableioe_notWritableioe_finalizedHandle ioe_bufsizhandleFinalizerdEFAULT_CHAR_BUFFER_SIZE flushBufferflushCharBufferflushByteWriteBufferwriteCharBufferflushCharReadBufferflushByteReadBuffermkHandlemkFileHandleNoFinalizermkDuplexHandleNoFinalizermkDuplexHandleinitBufferStateopenTextEncodingcloseTextCodecs hClose_impl hClose_help hLookAhead_debugIOtraceIOreadTextDevicereadTextDeviceNonBlocking decodeByteBufmemcpy hWaitForInputhGetCharhGetLine hGetContents'hPutCharhPutStr commitBuffer'hPutBufhPutBufNonBlockinghGetBuf hGetBufSomehGetBufNonBlockingwithFileopenFileBlockingwithFileBlockingopenBinaryFilewithBinaryFile fdToHandle' fdToHandle handleToFdhLockhTryLockhUnlockHandlePosition HandlePosn hFileSize hSetFileSizehIsEOFisEOF hSetBuffering hSetEncoding hGetEncoding hFlushAllhGetPosnhSetPosnhTellhIsOpen hIsClosed hIsReadable hIsWritable hGetBuffering hIsSeekablehSetEchohGetEchohIsTerminalDevice hDuplicate hDuplicateTohShow$fShowHandlePosn$fEqHandlePosnputCharputStrgetChar getContents getContents'interactreadFile appendFilereadLnreadIOhReadyhPrint openTempFileopenBinaryTempFile"openTempFileWithDefaultPermissions(openBinaryTempFileWithDefaultPermissions$fMonadFixDown $fMonadFix:*: $fMonadFixM1$fMonadFixRec1$fMonadFixPar1 $fMonadFixAp $fMonadFixAlt$fMonadFixLast$fMonadFixFirst$fMonadFixProduct $fMonadFixSum$fMonadFixDual $fMonadFixST$fMonadFixEither $fMonadFixFUN $fMonadFixIO$fMonadFixNonEmpty$fMonadFixList$fMonadFixMaybe$fMonadFixSoloIdentity 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 mapAccumM forAccumM fmapDefaultfoldMapDefault$fTraversableU1$fTraversableAp$fTraversableAlt$fTraversableLast$fTraversableFirst$fTraversableProduct$fTraversableSum$fTraversableDual$fTraversableConst$fTraversableProxy$fTraversableArray$fTraversableTuple2$fTraversableEither$fTraversableNonEmpty$fTraversableList$fTraversableMaybe$fTraversableDown$fTraversableURec$fTraversableURec0$fTraversableURec1$fTraversableURec2$fTraversableURec3$fTraversableURec4$fTraversable:.:$fTraversable:*:$fTraversable:+:$fTraversableM1$fTraversableK1$fTraversableRec1$fTraversablePar1$fTraversableV1$fTraversableIdentity$fTraversableSoloisSubsequenceOf$fIsStringList$fIsStringIdentity$fIsStringConst versionTags versionBranch showVersion parseVersion $fOrdVersion $fEqVersion $fReadVersion $fShowVersion$fGenericVersion fingerprint0fingerprintData getFileHasherrorWithStackTrace popCallStackwithFrozenCallStack StgInfoTable InfoProvEntInfoProv ipSrcSpan ipSrcFileipModipUnitIdipLabelipTyDescipDescipNameipLoc lookupIPEgetIPEipeProv peekInfoProv $fEqInfoProv$fShowInfoProv StackEntry closureTypesrcLoc functionName StackSnapshot cloneMyStackcloneThreadStackdecodeprettyStackEntry$fShowStackEntry$fEqStackEntry StackTraceLocation objectName sourceColumn sourceLine sourceFile stackDepth stackFramescollectStackTraceinvalidateDebugCacheshowStackFrames showLocation getStackTraceshowStackTracebtrIpebtrExecutionStackbtrHasCallStack btrCostCentreEnabledBacktraceMechanismsipeBacktraceEnabledexecutionBacktraceEnabledhasCallStackBacktraceEnabledcostCentreBacktraceEnabledBacktraceMechanismCostCentreBacktraceHasCallStackBacktraceExecutionBacktrace IPEBacktrace!defaultEnabledBacktraceMechanismsbacktraceMechanismEnabledsetBacktraceMechanismEnabledenabledBacktraceMechanismsRefgetEnabledBacktraceMechanismsgetBacktraceMechanismStatesetBacktraceMechanismStatedisplayBacktracescollectBacktraces'$fExceptionAnnotationBacktracesperformMinorGCperformBlockingMajorGCperformMajorGC performGCstopHeapProfTimerstartHeapProfTimerrequestHeapCensusstartProfTimer stopProfTimerIsLabelNoIO$fGHCiSandboxIOIO$fGHCiSandboxIONoIO $fMonadNoIO$fApplicativeNoIO $fFunctorNoIO modifySTRef modifySTRef'MutableArrayArray# ArrayArray#newArrayArray#unsafeFreezeArrayArray#sizeofArrayArray#sizeofMutableArrayArray#indexByteArrayArray#indexArrayArrayArray#readByteArrayArray#readMutableByteArrayArray#readArrayArrayArray#readMutableArrayArrayArray#writeByteArrayArray#writeMutableByteArrayArray#writeArrayArrayArray#writeMutableArrayArrayArray#copyArrayArray#copyMutableArrayArray#sameArrayArray#sameMutableArrayArray#Category<<<$fCategorykCoercion$fCategoryk:~~:$fCategoryk:~:$fCategoryTYPEFUN unpackCString packCString#throwIfthrowIf_ throwIfNeg throwIfNeg_ throwIfNullmkTrApp spInfoSrcLocspInfoModuleName spInfoUnitIdIsStatic StaticKeydeRefStaticPtr staticKeyunsafeLookupStaticPtr staticPtrInfo staticPtrKeys$fIsStaticStaticPtr$fShowStaticPtrInfo exitFailure exitSuccessdie StableNamemakeStableNamehashStableName eqStableName$fEqStableNameunsafeLocalStatePoolnewPoolfreePoolwithPool pooledMallocpooledMallocBytes pooledReallocpooledReallocBytespooledMallocArraypooledMallocArray0pooledReallocArraypooledReallocArray0 pooledNewpooledNewArraypooledNewArray0 whereFromgetExecutablePathexecutablePath getProgNamewithArgs withProgNamegetEnvironment getEnvDefaultgetArgsWithResponseFiles unescapeArgs escapeArgsexpandResponsedisableBufferingflushAll evalWrapper getFullArgsUnique newUnique hashUnique $fEqUnique $fOrdUniquefilterM>=><=< mapAndUnzipMzipWithM zipWithM_foldMfoldM_ replicateM replicateM_unless<$!>mfilter GCDetails&gcdetails_nonmoving_gc_sync_elapsed_ns"gcdetails_nonmoving_gc_sync_cpu_nsgcdetails_elapsed_nsgcdetails_cpu_nsgcdetails_sync_elapsed_ns#gcdetails_block_fragmentation_bytes#gcdetails_par_balanced_copied_bytesgcdetails_par_max_copied_bytesgcdetails_copied_bytesgcdetails_mem_in_use_bytesgcdetails_slop_bytesgcdetails_compact_bytesgcdetails_large_objects_bytesgcdetails_live_bytesgcdetails_allocated_bytesgcdetails_threads gcdetails_genRTSStatsnonmoving_gc_max_elapsed_nsnonmoving_gc_elapsed_nsnonmoving_gc_cpu_ns nonmoving_gc_sync_max_elapsed_nsnonmoving_gc_sync_elapsed_nsnonmoving_gc_sync_cpu_ns elapsed_nscpu_ns gc_elapsed_ns gc_cpu_nsmutator_elapsed_nsmutator_cpu_nsinit_elapsed_ns init_cpu_ns$cumulative_par_balanced_copied_bytescumulative_par_max_copied_bytespar_copied_bytes copied_bytescumulative_live_bytesmax_mem_in_use_bytesmax_slop_bytesmax_compact_bytesmax_large_objects_bytesmax_live_bytesallocated_bytes major_gcsgcsgetRTSStatsEnabled getRTSStats$fReadRTSStats$fShowRTSStats$fGenericRTSStats$fReadGCDetails$fShowGCDetails$fGenericGCDetails traceMarkerIO traceMarker traceEventIO traceEvent traceStack traceShowMtraceM traceShowId traceShowtraceId putTraceMsg traceWith traceShowWithtraceEventWith flushEventLogConIndex ConstrRep AlgConstr IntConstr FloatConstr CharConstrDataRepAlgRepCharRepNoRepConstrDataTypegfoldlgunfoldtoConstr dataTypeOf dataCast1 dataCast2gmapTgmapQlgmapQrgmapQgmapQigmapMgmapMpgmapMo fromConstr fromConstrB fromConstrM dataTypeName dataTypeRep constrType constrRep repConstr mkDataType mkConstrTagmkConstrdataTypeConstrs constrFields constrFixity showConstr readConstr isAlgType indexConstr constrIndexmaxConstrIndex mkIntType mkFloatType mkCharTypemkIntegralConstr mkRealConstr mkCharConstr mkNoRepType isNorepType tyconUQname tyconModule $fEqConstr $fShowConstr $fDataArray$fDataForeignPtr $fDataPtr $fDataList $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$fDataConstPtr $fDataTuple7 $fDataTuple6 $fDataTuple5 $fDataTuple4 $fDataTuple3 $fDataTuple2 $fDataSolo $fDataUnit $fDataVoid $fDataEither$fDataOrdering $fDataMaybe$fDataNonEmpty $fDataBoolZipList getZipList$fAlternativeZipList$fApplicativeZipList$fTraversableZipList $fShowZipList $fEqZipList $fOrdZipList $fReadZipList$fFunctorZipList$fFoldableZipList$fGenericZipList$fGeneric1TYPEZipList $fDataZipListItem$fIsListCallStack$fIsListVersion$fIsListNonEmpty$fIsListZipList $fIsListListSpecConstrAnnotation NoSpecConstrForceSpecConstr maxTupleSizethesortWith groupWithatomicModifyMutVar#resizeSmallMutableArray#$fDataSpecConstrAnnotation$fEqSpecConstrAnnotationstrictToLazySTlazyToStrictST ArrowLoop ArrowMonad ArrowApply ArrowChoiceleftright ArrowPlus<+> ArrowZero zeroArrow runKleisliArrowsecond***&&&returnA^>>>>^<<^^<<leftApp $fArrowFUN$fArrowKleisli$fCategoryTYPEKleisli$fMonadPlusKleisli$fMonadKleisli$fAlternativeKleisli$fApplicativeKleisli$fArrowZeroKleisli$fArrowPlusKleisli$fArrowChoiceKleisli$fArrowChoiceFUN$fArrowApplyKleisli$fArrowApplyFUN$fMonadPlusArrowMonad$fAlternativeArrowMonad$fMonadArrowMonad$fApplicativeArrowMonad$fFunctorArrowMonad$fArrowLoopKleisli$fArrowLoopFUN$fFunctorKleisli$fGeneric1TYPEKleisli$fGenericKleisliAnnotationWrapperrunIO runIOFastExitrunNonIO topHandlertopHandlerFastExitflushStdHandlesrtsSupportsBoundThreadsforkOSWithUnmaskisCurrentThreadBoundrunInBoundThreadrunInUnboundThreadunpackAppendCStringUtf8#unpackFoldrCStringUtf8# GHC.Prim.ExtgetThreadAllocationCounter# integerAbs integerAdd integerAnd integerBit integerBit# integerCheck integerCheck#integerCompareintegerComplementintegerDecodeDouble# integerDiv integerDivModintegerDivMod#integerEncodeDoubleintegerEncodeDouble#integerEncodeFloat# integerEq integerEq#integerFromAddrintegerFromAddr#integerFromBigNat#integerFromBigNatNeg#integerFromBigNatSign#integerFromByteArrayintegerFromByteArray#integerFromIntintegerFromInt#integerFromInt64#integerFromNaturalintegerFromWordintegerFromWord#integerFromWord64#integerFromWordListintegerFromWordNeg#integerFromWordSign# integerGcd integerGcde integerGcde# integerGe integerGe# integerGt integerGt#integerIsNegativeintegerIsNegative# integerIsOneintegerIsPowerOf2# integerIsZero integerLcm integerLe integerLe# integerLog2integerLogBaseintegerLogBaseWordintegerLogBaseWord# integerLt integerLt# integerMod integerMul integerNe integerNe# integerNegate integerOne integerOrintegerPopCount#integerPowMod# integerQuotintegerQuotRemintegerQuotRem#integerRecipMod# integerRem integerShiftLintegerShiftL# integerShiftRintegerShiftR# integerSignumintegerSignum#integerSizeInBase# integerSqr integerSubintegerTestBitintegerTestBit# integerToAddrintegerToAddr#integerToBigNatClamp#integerToBigNatSign# integerToInt#integerToInt64#integerToMutableByteArrayintegerToMutableByteArray#integerToNaturalintegerToNaturalClampintegerToNaturalThrowintegerToWord#integerToWord64# integerXor integerZero naturalAdd naturalAnd naturalAndNot naturalBit naturalBit# naturalCheck naturalCheck#naturalClearBitnaturalClearBit#naturalComparenaturalComplementBitnaturalComplementBit#naturalEncodeDouble#naturalEncodeFloat# naturalEq naturalEq#naturalFromAddrnaturalFromAddr#naturalFromBigNat#naturalFromByteArray#naturalFromWordnaturalFromWord#naturalFromWord2#naturalFromWordList naturalGcd naturalGe naturalGe# naturalGt naturalGt# naturalIsOnenaturalIsPowerOf2# naturalIsZero naturalLcm naturalLe naturalLe# naturalLog2 naturalLog2#naturalLogBasenaturalLogBase#naturalLogBaseWordnaturalLogBaseWord# naturalLt naturalLt# naturalMul naturalNe naturalNe# naturalNegate naturalOne naturalOrnaturalPopCountnaturalPopCount# naturalPowMod naturalQuotnaturalQuotRemnaturalQuotRem# naturalRem naturalSetBitnaturalSetBit# naturalShiftLnaturalShiftL# naturalShiftRnaturalShiftR# naturalSignumnaturalSizeInBase# naturalSqr naturalSubnaturalSubThrownaturalSubUnsafenaturalTestBitnaturalTestBit# naturalToAddrnaturalToAddr#naturalToBigNat#naturalToMutableByteArray#naturalToWord#naturalToWordClampnaturalToWordClamp#naturalToWordMaybe# naturalXor naturalZeroINISNBNS zeroCountsizeArr $fShowUnique $fNumUnique newSourceasInt UniqueSource unsafeAt# unsafeAtA isBitSubType newIntVar readIntVar writeIntVarIntVar lookupBit64 lookupIntN isLowercase isUppercasetoSimpleLowerCasetoSimpleTitleCasetoSimpleUpperCase isPuncCharSingKind DemoteRepfromSingSingIsingSingD:R:UReckWordp0D:R:UReckIntp0D:R:UReckFloatp0D:R:UReckDoublep0D:R:UReckCharp0D:R:UReckPtrp0 Rep1_Down Rep1_Tuple15 Rep1_Tuple14 Rep1_Tuple13 Rep1_Tuple12 Rep1_Tuple11 Rep1_Tuple10 Rep1_Tuple9 Rep1_Tuple8 Rep1_Tuple7 Rep1_Tuple6 Rep1_Tuple5 Rep1_Tuple4 Rep1_Tuple3 Rep1_Tuple2 Rep1_Solo Rep1_Proxy Rep1_Either Rep1_Maybe Rep1_NonEmpty Rep1_ListRep_FingerprintRep_GeneralCategory Rep_SrcLocRep_Down Rep_Tuple15 Rep_Tuple14 Rep_Tuple13 Rep_Tuple12 Rep_Tuple11 Rep_Tuple10 Rep_Tuple9 Rep_Tuple8 Rep_Tuple7 Rep_Tuple6 Rep_Tuple5 Rep_Tuple4 Rep_Tuple3 Rep_Tuple2Rep_SoloRep_Unit Rep_Proxy Rep_OrderingRep_Bool Rep_Either Rep_Maybe Rep_NonEmptyRep_ListRep_VoidRep_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_DecidedStrictnessRep_AltRep1_Alt Rep_Product Rep1_ProductRep_SumRep1_SumRep_AnyRep_AllRep_EndoRep_Dual Rep1_DualRep_ApRep1_ApRep_Last Rep1_Last Rep_First Rep1_First Rep_ByteOrdernonEmptySubsequences Rep_Const Rep1_ConstIntPSQElemMaskfindMinunsafeInsertNewlink deleteMinalter binShrinkLBinNil binShrinkR deleteViewminViewatMostmergeEkeypriovalueKeyPSQPrioTimeout EventLifetimeevtClose elSupremum $fMonoidEvent$fSemigroupEvent $fShowEvent$fMonoidLifetime$fSemigroupLifetime$fMonoidEventLifetime$fSemigroupEventLifetime $fShowTimeout$fShowEventLifetime$fEqEventLifetime$fShowLifetime $fEqLifetime $fEqEventelEvent elLifetimeeventIs eventLifetime evtNothingForevermkTrAppCheckedtypeNatTypeReptypeSymbolTypeReptypeCharTypeRepmkTrFunTypeableInstanceTrAppTrFuntypeableInstanceisTYPE readTwoDigitsmkTyCon#typeLitTypeRep$fShowSomeTypeRep $fOrdTypeRep $fEqTypeRepmkTyConFingerprintmkTrTypetypeRep#IOPort writeIOPortnewEmptyIOPort newIOPort readIOPort $fEqIOPortdoubleReadException$fShowFileLockingNotSupportedMyWeaklockImpl unlockImplunrepresentableCharpeekEncodedCStringwithEncodedCStringnewEncodedCStringpeekCStringOpt Rep_RTSFlags Rep_HpcFlags Rep_ParFlagsRep_TickyFlagsRep_TraceFlags Rep_DoTrace Rep_ProfFlagsRep_DoHeapProfile Rep_CCFlagsRep_DoCostCentresRep_DebugFlags Rep_MiscFlags Rep_ConcFlags Rep_GCFlagsRep_GiveGCStatsBackend_beModifyFdOnce _beModifyFd_bePollmodifyFd modifyFdOncethrowErrnoIfMinus1NoRetry exchangePtrbackendpoll availableutf8DecodeChar#labelinitFileSystemEncodinginitForeignEncoding insertWith updateWithIntTable unsafeLoadunsafeCopyFromBuffercopycopy' firstPowerOf2capacityclear duplicateensureCapacityremoveAtsnoc unsafeRead unsafeWriteuseAsPtr epollOneShot$fStorableEvent$fShowEventType $fEqEventType$fNumEventType$fBitsEventType$fFiniteBitsEventTyperecoveringEncode mkHandleMVar$fStorablePollFd $fShowPollFd $fNumEvent $fBitsEvent$fFiniteBitsEventW controlIsDead newControl closeControl$fEqControlMessage$fShowControlMessagereadControlMessagesendDie sendWakeup wakeupReadFd controlReadFdcontrolWriteFdControlMessageCMsgDie CMsgSignal CMsgWakeupnewWithshutdown registerFd_ wakeManagercloseFd_ onFdEvent $fEqState $fShowState $fEqFdKey $fShowFdKeycallbackTableVarcleanupfinishednewDefaultBackend emControlFdData ioManagerLock eventManagerblockedOnBadFD withOpenFile' withFile'c_fcntlFLockl_lenl_pidl_startl_typel_whence makeStatic Rep_Identity Rep1_IdentityreadSymbolicLinkSessionAddrChunk chunksList peekLocation locationSize Rep_RTSStats Rep_GCDetails Rep_VersionMpQrQi mkPrimType Rep_ZipList Rep1_ZipListnoDup Rep1_Kleisli Rep_Kleislic_flock