n       !"#$%&' ( )* + , -. /0123456789: ;<=>?@ABCD EFGHI JKLM NOPQ RSTUVWXYZ[\]^_`abcdefghijklmnop q rs!tuv"w"x"y"z"{#|#}$~ %&$$ %'  ( ))))***  *********      !"#$%&'()*+,-./0123!4+5!6!789:; < = >?,@,A,B,C-DEFGHIJKLMNOPQRSTUVW X Y Z.[\]^_`abcde/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/{/|/}/~//////00001111111111111111111111111111111111122222222222222222333333333333333333333...     ."""   444444 4!4"4#4$4%4&5'5(5)5*5+5,5-5.6/60616263646566789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~77777...............#########'8899999$$$$$$     ))))) )!)")#)$)%)&)')()))*)+),)-).)/)0)1)2)3)4)5)6)789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_:`:a:b:c:d:e:f:g:h:i;j;k;l;mnopqrstuvwxyz{|<}~<!++===>>>>>>>>>>?@@@@@@@AAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCDCCEE#######CCCCCFFFFFFFFFFFFFF F F F F FFFFFFFFFFFFFFFFFFF F!F"F#G$G%G&G'G(G)G*G+G,G-G.G/G0G1G2G3G4G5G6G7G8H9H:H;I<I=I>I?I@IAIBICIDIEIFIGIHIIIJIKILIMINIOIPIQIRISITIUIVIWIXJYJZJ[J\J]J^J_J`JaJbJcKdKeKfKgKhKiKjKkKlKmKnKoKpKqKrKs<tLuLvLwxyz{|}~MMMMMMMMMMMNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOPPPPPPPQQQQQQQQQQQQQQQQQQQQQQQQQQQQQRRRRRRSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTT T T T T TTTTTTTTTTTTTTTTTTT T!T"T#T$T%T&T'T(T)T*T+T,T-T.T/T0T1T2T3T4T5T6T7T8T9T:T;T<T=T>T?T@TATBTCTDTETFTGTHTITJTKTLTMTNTOTPTQTRTSTTTUTVTWTXTYTZT[T\T]T^T_T`TaTbTcTdTeTfTgThTiTjTkTlTmTnToTpTqTrTsUtUuUvUwUxUyUzU{U|U}U~UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUKVWWWWWWWWWXXXXYYYYYYYYYYYYYYYYZYYYYYZZZZYZZYYYZZZYYYYYZZYYYYYYYYYYYYYY[[YYYY::: : : : : ::\\\\=]]]]]^^^^^^^ ^!^"^#^$_%_&_'_(_)_*_+_,_-_._/_0`1`2`3`4`5`6`7`8`9`:`;`<=>?@AHBHCHDHEHFHGHHHIHJHKHLHMHNHOHPHQHRaSKTKUKV<W<X<Y<Z<[<\<]<^<_<`<a<b<c<d<e<f<g<h<i<j<k<l<m<n<o<p<q<r<s<t<u<v<w<x<y<z<{<|<}b~bcccccccccccccccccccccccYYYYYYYZYKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKVVVVVVVVV              ! " # $ % &d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<e=f>f?f@fAfBfCfDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ghhhhhhhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii888jjjjj j j j j &&&&&&&&&&&&&&&&kkk k!k"k#k$k%k&k'k(k)k*+,-./0123456%7%8%9%:%;%<%=%>%?%@%AlBlClDlElFlGlHlIlJmKmLmMmNnOnPnQnRZSZTZUZVZWZXZYZZZ[Z\o]o^o_o`oaobpcpdqeqfqgqhrirjrkrlrmrnrorprqrrssstsusvswsxsyszs{s|s}s~ssssssssssttt 00uuuuvvvwwwxxyyyyyyyyyyyyyzzzzzzzzzzLLLL{{{{|||}}}};;;~(Malcolm Wallace 20064BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportableUnsafe<((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy</ stops execution and displays an error message.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.PUsed for compiler-generated error message; encoding saves bytes of string junk.((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)Unsafe;<INA'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.Append two lists, i.e., q[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.'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 M 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 AssertionFailed$ 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-assertsL option is given). When assertions are turned off, the first argument to @ is ignored, and the second argument is returned as the result. 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, ...]OApplication operator. This operator is redundant, since ordinary application (f x) means the same as (f  x) . However, p has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example:  f $ g $ h x = f (g (h x))6It is also useful in higher-order situations, such as  ( 0) xs, or e () fs xs.*Fail with a message. This operation is not part of the mathematical definition of a monad, but is invoked on pattern-match failure in a do expression.+hSequentially compose two actions, passing any value produced by the first as an argument to the second.,Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages..%Inject a value into the monadic type.DThe D 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.ESequential application.F Lift a value.MThe M+ 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 doI expressions provide a convenient syntax for writing monadic expressions. Instances of M# should satisfy the following laws: . a + k = k a m + . = m m + (x -> k x + h) = (m + k) + hFurthermore, the M and [% operations should relate as follows: F = . (E) = The above laws imply: - f xs = xs + . . f (,) = () and that F and (E') satisfy the applicative functor laws.The instances of M for lists, * and  defined in the Prelude satisfy these laws.OThe O? class is used for types that can be mapped over. Instances of O# should satisfy the following laws: 1fmap id == id fmap (f . g) == fmap f . fmap gThe instances of O for lists, * and  satisfy these laws.[3A functor with application, providing operations toembed pure expressions (F), and1sequence computations and combine their results (E).mA minimal complete definition must include implementations of these functions satisfying the following laws: identity F  E v = v composition F (.) E u E v E w = u E (v E w) homomorphism F f E F x = F (f x) interchange u E F y = F ( y) E uThe other methods have the following default definitions, which may be overridden with equivalent specialized implementations: u  v = F ( ) E u E v u  v = F  E u E v$As a consequence of these laws, the O instance for f will satisfy - f x = F f E xIf f is also a M, it should satisfy F = . (E) = (which implies that F and E' satisfy the applicative functor laws).A K is a list of characters. String constants in Haskell are values of type .,Monads that also support choice and failure.the identity of '. It should also satisfy the equations +mzero >>= f = mzero v >> mzero = mzeroan associative operation!A monoid on applicative functors. If defined,  and 1 should be the least solutions of the equations:  some v = (:) <$> v E many v many v = some v  F []The identity of An associative binary operation One or more. Zero or more.=Sequence actions, discarding the value of the first argument.>Sequence actions, discarding the value of the second argument.SReplace all locations in the input with the same value. The default definition is - . <, but this may be overridden with a more efficient version.The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following laws: mappend mempty x = x mappend x mempty = x 1mappend x (mappend y z) = mappend (mappend x y) z  mconcat =  mappend memptygThe 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. Sum and Product. Identity of An associative operationJFold 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.The 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 h is a good way to deal with errors or exceptional cases without resorting to drastic measures such as .The a 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. A variant of E with the arguments reversed.FLift a function to actions. This function may be used as a value for - in a O instance."Lift a binary function to actions.#Lift a ternary function to actions.Same as +&, but with the arguments interchanged.Conditional execution of [ expressions. For example, !when debug (putStrLn "Debugging")will output the string  Debugging if the Boolean value debug is , and otherwise do nothing.REvaluate each action in the sequence from left to right, and collect the results. f is equivalent to  .  f.Promote a function to a monad.`Promote a function to a monad, scanning the monadic arguments from left to right. For example, N liftM2 (+) [0,1] [0,2] = [0,2,1,3] liftM2 (+) (Just 1) Nothing = NothingWPromote a function to a monad, scanning the monadic arguments from left to right (cf. ).WPromote a function to a monad, scanning the monadic arguments from left to right (cf. ).WPromote 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  liftMn f x1 x2 ... xnThe  method restricted to the type .Identity function.Constant function.Function composition. f9 takes its (first) two arguments in the reverse order of f.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 is used by the deriving code for Eq, Ord and Enum.The primitive dataToTag# requires an evaluated constructor application as its argument, so we provide getTag as a wrapper that performs the evaluation before calling dataToTag. We could have dataToTagD evaluate its argument, but we prefer to do it this way because (a) dataToTag# can be an inline primop if it doesn't need to do any evaluation, and (b) we want to expose the evaluation to the simplifier, because it might be possible to eliminate the evaluation in the case when the argument is already known to be evaluated.VShift 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#)VShift the argument left by the specified number of bits (which must be non-negative).fShift 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)hShift 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)Lift 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 " S;." Since there is no "Semigroup" typeclass providing just  , we use  instead.q*+,-.DEFMO[                            ! " # $ % & ' ( )'(*+,-. *DEFIMOQ[ + ,f - .g /h 0i 1 2j 3 4 5 6 7p 8s 9 : ; < = > ? @ Au B Cv D E F G H I J K L M~ N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~        [DM+,.*O-[FE                           +,E '(c) The University of Glasgow 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy< Conversion from an oB. An integer literal represents the application of the function  " to the appropriate value of type o, so such literals have type (P a) => a.)Unary negation.PBasic numeric class.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  (!).Because -/ is treated specially in the Haskell grammar, (- e)D is not a section, but an application of prefix negation. However, ( exp)) is equivalent to the disallowed section. !)P 5 !)Po P!) !"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy&Extract the first component of a pair.'Extract the second component of a pair.6 converts an uncurried function to a curried function.4 converts a curried function to a function on pairs.Swap the components of a pair."(c) The University of Glasgow 2012see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)None hA monad that can execute GHCi statements by lifting them out of m into the IO monad. (e.g state monads) "A monad that doesn't allow any IO.     *"(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 h, 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  readMaybe;. If we succeed, return twice the integer; that is, apply (*2)8 to it. If instead we fail to parse an integer, return 0 by default:import Text.Read ( readMaybe )maybe 0 (*2) (readMaybe "5")10maybe 0 (*2) (readMaybe "")0Apply show to a  Maybe Int . If we have Just n", we want to show the underlying j n. But if we have A, 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: NothingThe ( function takes a default value and and  value. If the  is S, it returns the default values; otherwise, it returns the value contained in the .Examples Basic usage:#fromMaybe "" (Just "Hello, World!")"Hello, World!"fromMaybe "" Nothing""$Read an integer from a string using  readMaybe5. If we fail to parse an integer, we want to return 0 by default:import Text.Read ( readMaybe )fromMaybe 0 (readMaybe "5")5fromMaybe 0 (readMaybe "")0The , function returns an empty list when given $ or a singleton list when not given .Examples Basic usage:maybeToList (Just 7)[7]maybeToList Nothing[] One can use W to avoid pattern matching when combined with a function that (safely) works on lists:import Text.Read ( readMaybe )!sum $ maybeToList (readMaybe "3")3 sum $ maybeToList (readMaybe "")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, V can be used to return all of the "success" results (if the list is the result of a , then  would be more appropriate):import Text.Read ( readMaybe )4[readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ][Just 1,Nothing,Just 3]@catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ][1,3]The  function is a version of c which can throw out elements. In particular, the functional argument returns something of type  b. If this is 8, no element is added on to the result list. If it is  b, then b! is included in the result list.ExamplesUsing  f x is a shortcut for  $  f x in most cases:import Text.Read ( readMaybe )3let readMaybeInt = readMaybe :: String -> Maybe Int'mapMaybe readMaybeInt ["1", "Foo", "3"][1,3].catMaybes $ map readMaybeInt ["1", "Foo", "3"][1,3]If we map the 1 constructor, the entire list should be returned:mapMaybe Just [1,2,3][1,2,3] '(c) The University of Glasgow 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy<N2Concatenate a list of lists.j, 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] takes two lists and returns a list of corresponding pairs. If one input list is short, excess elements of the longer list are discarded. is right-lazy: zip [] _|_ = []=Extract the first element of a list, which must be non-empty.HDecompose a list into its head and tail. If the list is empty, returns $. If the list is non-empty, returns  (x, xs) , where x is the head of the list and xs its tail.GExtract the elements after the head of a list, which must be non-empty.GExtract the last element of a list, which must be finite and non-empty.SReturn all the elements of a list except the last one. The list must be non-empty.Test whether a list is empty.O(n). + returns the length of a finite list as an j). It is an instance of the more general e6, the result type of which may be any kind of number., 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: Efoldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xnThe list must be finite.A strict version of . is a variant of S that has no starting value argument, and thus must be applied to non-empty lists.A strict version of The 7 function computes the sum of a finite list of numbers.The ; function computes the product of a finite list of numbers. is similar to A, 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 xs. is a variant of % that has no starting value argument: .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...] #A strictly accumulating version of    is a variant of S that has no starting value argument, and thus must be applied to non-empty lists.   is the right-to-left dual of  . Note that $head (scanr f z xs) == foldr f z xs.   is a variant of  % that has no starting value argument.  { returns the maximum value from a list, which must be non-empty, finite, and of an ordered type. It is a special case of eG, which allows the programmer to supply their own comparison function.{ returns the minimum value from a list, which must be non-empty, finite, and of an ordered type. It is a special case of eG, which allows the programmer to supply their own comparison function. f x7 returns an infinite list of repeated applications of f to x: %iterate f x == [x, f x, f (f x), ...] x is an infinite list, with x the value of every element. n x is a list of length n with xE the value of every element. It is an instance of the more general e , in which n may be of any integral type. ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists., applied to a predicate p and a list xs2, returns the longest prefix (possibly empty) of xs of elements that satisfy p: ktakeWhile (< 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: sdropWhile (< 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: take 5 "Hello World!" == "Hello" take 3 [1,2,3,4,5] == [1,2,3] take 3 [1,2] == [1,2] take 3 [] == [] take (-1) [1,2] == [] take 0 [1,2] == []&It is an instance of the more general e , in which n may be of any integral type. n xs returns the suffix of xs after the first n elements, or [] if n >  xs: drop 6 "Hello World!" == "World!" drop 3 [1,2,3,4,5] == [4,5] drop 3 [1,2] == [] drop 3 [] == [] drop (-1) [1,2] == [1,2] drop 0 [1,2] == [1,2]&It is an instance of the more general e , in which n may be of any integral type. n xs( returns a tuple where first element is xs prefix of length n1 and second element is the remainder of the list: splitAt 6 "Hello World!" == ("Hello ","World!") splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5]) splitAt 1 [1,2,3] == ([1],[2,3]) splitAt 3 [1,2,3] == ([1,2,3],[]) splitAt 4 [1,2,3] == ([1,2,3],[]) splitAt 0 [1,2,3] == ([],[1,2,3]) splitAt (-1) [1,2,3] == ([],[1,2,3])It is equivalent to ( n xs,  n xs) when n is not _|_ (splitAt _|_ xs = _|_). $ is an instance of the more general e , in which n may be of any integral type., applied to a predicate p and a list xsM, returns a tuple where first element is longest prefix (possibly empty) of xs of elements that satisfy p1 and second element is the remainder of the list: {span (< 3) [1,2,3,4,1,2,3,4] == ([1,2],[3,4,1,2,3,4]) span (< 9) [1,2,3] == ([1,2,3],[]) span (< 0) [1,2,3] == ([],[1,2,3]) p xs is equivalent to ( p xs,  p xs), applied to a predicate p and a list xsM, returns a tuple where first element is longest prefix (possibly empty) of xs of elements that do not satisfy p1 and second element is the remainder of the list: ~break (> 3) [1,2,3,4,1,2,3,4] == ([1,2,3],[4,1,2,3,4]) break (< 9) [1,2,3] == ([],[1,2,3]) break (> 9) [1,2,3] == ([1,2,3],[]) p is equivalent to  ( . p). xs returns the elements of xs in reverse order. xs must be finite.C 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.C 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.#Applied to a predicate and a list, X 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.#Applied to a predicate and a list, V 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.I 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.   is the negation of .!!  key assocs' looks up a key in an association list."7Map a function over a list and concatenate the results.#YList index (subscript) operator, starting from 0. It is an instance of the more general e-, which takes an index of any integral type.$$@ takes three lists and returns a list of triples, analogous to .%% generalises i by zipping with the function given as the first argument, instead of a tupling function. For example, % (+)D is applied to two lists to produce the list of corresponding sums.% is right-lazy: zipWith f [] _|_ = []&The & function takes a function which combines three elements, as well as three lists and returns a list of their point-wise combination, analogous to %.''] transforms a list of pairs into a list of first components and a list of second components.(The (I function takes a list of triples and returns three lists, analogous to '.N              !" # $% &'( 6      !"#$%&'( N              !" # $% &'(  # ((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy*< V!Conversion of values to readable s.Derived instances of VP have the following properties, which are compatible with derived instances of :The result of *j 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.hthe 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 11N it is always surrounded in parentheses, unless it is an atomic expression.8If the constructor is defined using record syntax, then *p 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 V 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 V 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 V instance of the g type, where values of type H should be shown in double quotes, rather than between square brackets.,The shows7 functions return a function that prepends the output  to an existing R. This allows constant-time concatenation of results using function composition.-equivalent to ) with a precedence of 0..utility function converting a gB to a show function that simply prepends the character unchanged./utility function converting a ? to a show function that simply prepends the string unchanged.0Sutility function that surrounds the inner show function with parentheses when the f parameter is .1Convert a character to a string using only printable characters, using Haskell source-language escape conventions. For example: !showLitChar '\n' s = "\\n" ++ s Same as 1O, 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-quotes Like   (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""]2 Convert an j in the range 0..15$ to the corresponding single digit gU. This function fails on other inputs, and generates lower-case hexadecimal digits.,V)Athe operator precedence of the enclosing context (a number from 0 to 11(). Function application has precedence 10.the value to be converted to a *+, -./0 1 2      V)*+, -./0 1 2 )V)*+, -./0 1 2      ((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe<IN3;The strict state-transformer monad. A computation of type 3 s a* transforms an internal state indexed by s, and returns a value of type a. The s parameter is either7an uninstantiated type variable (inside invocations of 6), ors (inside invocations of !).CIt serves to keep the internal states of different invocations of 63 separate from each other and from invocations of !.The + and ,^ operations are strict in the state (though not in values stored in the state). For example, 6 (writeSTRef _|_ v >>= f) = _|_5oAllow the result of a state transformer computation to be used (lazily) inside the computation. Note that if f is strict, 5 f = _|_.6CReturn the value computed by a state transformer computation. The forall- ensures that the internal state used by the 39 computation is inaccessible to the rest of the program.3456 3456 3456"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafe7WShow a list (using square brackets and commas), given a function for showing elements.7 V)*+,-./07 ,V)*+-./077 "(c) The University of Glasgow 2005/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy'II'"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy8An infix synonym for -.ExamplesConvert from a Maybe Int to a Maybe String using show:show <$> NothingNothingshow <$> Just 3Just "3"Convert from an Either Int Int to an Either Int String using show:show <$> Left 17Left 17show <$> Right 17 Right "17"Double each element of a list:(*2) <$> [1,2,3][2,4,6]Apply even! to the second element of a pair:even <$> (2,2)(2,True)9Flipped version of .ExamplesReplace the contents of a Maybe Int with a constant String:Nothing $> "foo"NothingJust 90210 $> "foo" Just "foo"Replace the contents of an Either Int Int with a constant String, resulting in an Either Int String:Left 8675309 $> "foo" Left 8675309Right 8675309 $> "foo" Right "foo"/Replace each element of a list with a constant String:[1,2,3] $> "foo"["foo","foo","foo"]5Replace the second element of a pair with a constant String:(1,2) $> "foo" (1,"foo"):: valueO discards or ignores the result of evaluation, such as the return value of an  action.ExamplesReplace the contents of a Maybe Int with unit: void NothingNothing void (Just 3)Just ()Replace the contents of an Either Int Int with unit, resulting in an Either Int '()':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]1289:-O89:O-98:89:89 GNils Anders Danielsson 2006 , Alexander Berntsen 20144BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportable Trustworthy;; f* is the least fixed point of the function f, i.e. the least defined x such that f x = x.<(*) `on` f = \x y -> f x * f y.Typical usage: e (compare `on` fst).Algebraic properties: (*) `on`  = (*) (if  (*) " {",  "}) &((*) `on` f) `on` g = (*) `on` (f . g)  on f .  on g =  on (g . f)== 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 .;<=;<==;<;<=<="(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy>Case analysis for the f type. > x y p evaluates to x when p is , and evaluates to y when p is .This is equivalent to if p then y else x[; 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 > x y p and if p then y else x are equivalent:"let p = True; x = "bar"; y = "foo" bool x y p == if p then y else xTrue let p = False bool x y p == if p then y else xTrue>f>f>>,4BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimental not portableSafe'(>KL?Type-level "not"@Type-level "or"AType-level "and"B Type-level If.  If True a b ==> a;  If False a b ==> b?@AB?@ABBA@??@AB@A- Trustworthy<CThe  method restricted to the type .CCCC((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy< #!Used in Haskell's translation of [n..].$!Used in Haskell's translation of [n,n'..].%!Used in Haskell's translation of [n..m].&!Used in Haskell's translation of  [n,n'..m].GThe G? class is used to name the upper and lower limits of a type. Q is not a superclass of GP since types that are not totally ordered may also have upper and lower bounds.The G1 class may be derived for any enumeration type; H( is the first constructor listed in the data declaration and I is the last. GV may also be derived for single-constructor datatypes whose constituent types are in G.HClass H2 defines operations on sequentially ordered types.The enumFromG... methods are used in Haskell's translation of arithmetic sequences. Instances of H 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 G from 0 through n-1. See Chapter 10 of the Haskell Report for more details.*For any type that is an instance of class G as well as H, the following should hold: The calls D I and E H% should result in a runtime error.G and Fm should give a runtime error if the result value is not representable in the result type. For example, F 7 :: f is an error.# 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 = minBoundD.the successor of a value. For numeric types, D adds 1.E0the predecessor of a value. For numeric types, E subtracts 1.FConvert from an j.GConvert to an j'. It is implementation-dependent what GA returns when applied to a value that is too large to fit in an j.K#$%&GHDEFGHI !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]#$%&GHDEFGHI !"#$AGHIHDEFG#$%& !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy< "Conversion from a r (that is q o4). A floating literal stands for an application of " to a value of type r, so such literals have type (K a) => a.6$general coercion from integral types7$general coercion to fractional types8conversion to o9@the rational equivalent of its real argument with full precisionK-Fractional numbers, supporting real division.L.Integral numbers, supporting integer division.U#Extracting components of fractions.q9Rational numbers, with numerator and denominator of some L type.rEArbitrary-precision rational numbers, represented as a ratio of two o: values. A rational number may be constructed using the W operator.J The function J 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 M, N, K and L functions are in terms of J.KK x returns the integer nearest x between zero and xLL x returns the nearest integer to x; the even integer if x$ is equidistant between two integersMM x) returns the least integer not less than xNN x/ returns the greatest integer not greater than xOfractional divisionPreciprocal fractionQ&integer division truncated toward zeroRinteger remainder, satisfying !(x `quot` y)*y + (x `rem` y) == xS3integer division truncated toward negative infinityTinteger modulus, satisfying  (x `div` y)*y + (x `mod` y) == xU simultaneous Q and RV simultaneous S and T^^ is a subsidiary function used only in this module. It normalises a ratio by dividing both numerator and denominator by their greatest common divisor.W(Forms the ratio of two integral numbers.XExtract the numerator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.YExtract the denominator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.ZConverts a possibly-negative S 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 = 0U. (That is, the common divisor that is "greatest" in the divisibility preordering.)2Note: Since for signed fixed-width integer types,  H < 09, the result may be negative if one of the arguments is H& (and necessarily is if the other is 0 or H) for such types.`` x y, is the smallest positive integer that both x and y divide.D"6789KLSUqr_JKLMNOPQRSTUV`abcdef^WXYghijZ(a function that can show unsigned values'the precedence of the enclosing contextthe value to show[\]^kl_`mnopqrstuvwxyz{|}~7"6789KLSUqr_JKLMNOPQRSTUV`abcdef^WXYghijZ[\]^kl_`mnopqr367KOP"LQRSTUV8S9UJKLMNq_r`abcdef^WXYghijZ[\]^kl_`mnopqrstuvwxyz{|}~OQRSTW]^((c) The University of Glasgow, 1994-2000see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)Unsafe<?WThe W 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)q of each of these operations is a pair specifying the lower and upper bounds of a contiguous subrange of values.SAn implementation is entitled to assume the following laws about these operations:c (l,u) i ==  i (a (l,u))  a (l,u) # b (l,u) i == i, when c (l,u) i (b (l,u)) (a (l,u))) == [0..d (l,u)-1]  d (l,u) ==  (a (l,u))  )Mutable, boxed, non-strict arrays in the 3, monad. The type arguments are as follows:s&: the state variable argument for the 3 typei8: the index type of the array (should be an instance of W)e : the element type of the array.AThe type of immutable non-strict (boxed) arrays with indices in i and elements in e.a>The list of values in the subrange defined by a bounding pair.b,The position of a subscript in the subrange.Like b2, but without checking that the value is in range.cReturns B the given subscript lies in the range defined the bounding pair.d4The size of the subrange defined by a bounding pair.like d9, but without checking that the upper bound is in range.jConstruct an array with the specified bounds and containing values for given indices within these bounds.uThe 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.NConstruct an array from a pair of bounds and a list of values in index order.)The value at the given index in an array./The bounds with which an array was constructed.$The number of elements in the array.3The list of indices of an array in ascending order.0The list of elements of an array in index order.A right fold over the elementsA left fold over the elements%A strict right fold over the elements$A strict left fold over the elements4A left fold over the elements with no starting value5A right fold over the elements with no starting value4The list of associations of an array in index order.The H function deals with repeated indices in the association list using an accumulating functionz which combines the values of associations with the same index. For example, given a list of values of some index type, hist\ produces a histogram of the number of occurrences of each index within a specified range: xhist :: (Ix a, Num b) => (a,a) -> [a] -> Array a b hist bnds is = accumArray (+) 0 bnds [(i, 1) | i<-is, inRange bnds i]-If the accumulating function is strict, then v is strict in the values, as well as the indices, in the association list. Thus, unlike ordinary 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.<Repeated indices in the association list are handled as for : Haskell 2010 specifies that the resulting array is undefined (i.e. bottom), but GHC's implementation uses the last association for each index. f{ takes an array and an association list and accumulates pairs from the list into the array with the accumulating function f. Thus  can be defined using : <accumArray f z b = accum f (array b [(i, z) | i <- range b]) allows for transformations on array indices. It may be thought of as providing function composition on the right with the mapping that the original array embodies.?A similar transformation of array values may be achieved using - from the  instance of the O class.NWabcd a pair of bounds, each of the index type of the array. These bounds are the lowest and highest indices in the array, in that order. For example, a one-origin vector of length '10'' has bounds '(1,10)', and a one-origin '10' by '10'% matrix has bounds '((1,1),(10,10))'. a list of  associations of the form (index, value). Typically, this list will be expressed as a comprehension. An association '(i, x)' defines the value of the array at index i to be x.accumulating function initial valuebounds of the arrayassociation list>WabcdFWabcd  /"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy< eThe e9 class denotes types with a finite, fixed number of bits.foReturn the number of bits in the type of the argument. The actual value of the argument is ignored. Moreover, f* is total, in contrast to the deprecated w function it replaces. f = w v =  . f gACount number of zero bits preceding the most significant set bit. g (p :: a) = finiteBitSize (p :: a) g& can be used to compute log base 2 via  logBase2 x = f x - 1 - g x Note: The default implementation for this method is intentionally naive. However, the instances provided for the primitive integral types are implemented using CPU specific machine instructions.hBCount number of zero bits following the least significant set bit. h (p :: a) = finiteBitSize (p :: a) h . ) = h  The related  +http://en.wikipedia.org/wiki/Find_first_setfind-first-set operation can be expressed in terms of h as follows findFirstSet x = 1 + h x Note: The default implementation for this method is intentionally naive. However, the instances provided for the primitive integral types are implemented using CPU specific machine instructions.iThe i6 class defines bitwise operations over integral types.GBits are numbered from 0 with bit 0 being the least significant bit.j Bitwise "and"k Bitwise "or"l Bitwise "xor"m%Reverse all the bits in the argument nn x i shifts x left by i bits if i" is positive, or right by -i bits otherwise. Right shifts perform sign extension on signed number types; i.e. they fill the top bits with 1 if the x* is negative and with 0 otherwise.+An instance can define either this unified n or y and {J, depending on which is more convenient for the type in question. oo x i rotates x left by i bits if i" is positive, or right by -i bits otherwise.For unbounded types like o, o is equivalent to n.+An instance can define either this unified o or } and ~J, depending on which is more convenient for the type in question. pp" is the value with all bits unset.<The following laws ought to hold (for all valid bit indices n): s p n == p r p n == q n u p n == False  p == 0This method uses s (q 0) 0A as its default implementation (which ought to be equivalent to p% for types which possess a 0th bit).qbit i is a value with the i$th bit set and all other bits clear.Can be implemented using  if a is also an instance of P. See also p.r x `setBit` i is the same as  x .|. bit isx `clearBit` i is the same as x .&. complement (bit i)tx `complementBit` i is the same as  x `xor` bit iuReturn  if the nth bit of the argument is 1Can be implemented using  if a is also an instance of P.vReturn the number of bits in the type of the argument. The actual value of the argument is ignored. Returns Nothing for types that do not have a fixed bitsize, like o.w{Return the number of bits in the type of the argument. The actual value of the argument is ignored. The function wG is undefined for types that do not have a fixed bitsize, like o.xReturn X if the argument is a signed type. The actual value of the argument is ignored y]Shift the argument left by the specified number of bits (which must be non-negative).'An instance can define either this and { or the unified nJ, depending on which is more convenient for the type in question. zShift the argument left by the specified number of bits. The result is undefined for negative shift amounts and shift amounts greater or equal to the w. Defaults to y* unless defined explicitly by an instance.{Shift the first argument right by the specified number of bits. The result is undefined for negative shift amounts and shift amounts greater or equal to the w.nRight shifts perform sign extension on signed number types; i.e. they fill the top bits with 1 if the x* is negative and with 0 otherwise.'An instance can define either this and y or the unified nJ, depending on which is more convenient for the type in question. |Shift the first argument right by the specified number of bits, which must be non-negative an smaller than the number of bits in the type.nRight shifts perform sign extension on signed number types; i.e. they fill the top bits with 1 if the x* is negative and with 0 otherwise. Defaults to {* unless defined explicitly by an instance.}^Rotate the argument left by the specified number of bits (which must be non-negative).'An instance can define either this and ~ or the unified oJ, depending on which is more convenient for the type in question. ~_Rotate the argument right by the specified number of bits (which must be non-negative).'An instance can define either this and } or the unified oJ, depending on which is more convenient for the type in question. {Return the number of set bits in the argument. This number is known as the population count or the Hamming weight.Can be implemented using  if a is also an instance of P.Default implementation for q. Note that: bitDefault i = 1 y iDefault implementation for u. Note that: 'testBitDefault x i = (x .&. bit i) /= 0Default implementation for .zThis implementation is intentionally naive. Instances are expected to provide an optimized implementation for their size.Attempt to convert an L type a to an L type b- using the size of the types as measured by i methods.&A simpler version of this function is: toIntegral :: (Integral a, Integral b) => a -> Maybe b toIntegral x | toInteger x == y = Just (fromInteger y) | otherwise = Nothing where y = toInteger x$This version requires going through o&, which can be inefficient. However, toIntegralSized\ is optimized to allow GHC to statically determine the relative type sizes (as measured by v and x) and avoid going through o+ for many types. (The implementation uses 6+, which is itself optimized with rules for base types but may go through o for some type pairs.) if the size of a is <= the size of b, where size is measured by v and x.'efghijklmnopqrstuvwxyz{|}~efghijklmnopqrstuvwxyz{|}~ijklmnopqrstuvwxyz{|}~efghefghijklmnopqrstuvwxyz{|}~ jklnoy{}~#(c) The University of Glasgow, 2003see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) TrustworthyiSelects the first 128 characters of the Unicode character set, corresponding to the ASCII character set.xSelects the first 256 characters of the Unicode character set, corresponding to the ISO 8859-1 (Latin-1) character set.CSelects ASCII lower-case letters, i.e. characters satisfying both  and .CSelects ASCII upper-case letters, i.e. characters satisfying both  and .Returns > for any Unicode space character, and the control characters \t, \n, \r, \f, \v.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 alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function is equivalent to .7Selects alphabetic or numeric digit Unicode characters.[Note that numeric digits outside the ASCII range are selected by this function but not by k. Such digits may be part of identifiers but are not used by the printer and reader to represent numbers.dSelects control characters, which are the non-printing characters of the Latin-1 subset of Unicode.aSelects printable Unicode characters (letters, numbers, marks, punctuation, symbols and spaces).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.;Selects lower-case alphabetic Unicode characters (letters).lConvert a letter to the corresponding lower-case letter, if any. Any other character is returned unchanged.lConvert a letter to the corresponding upper-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. "(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableUnsafe((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe<a value of type  STRef s a' is a mutable variable in state thread s, containing a value of type a Build a new  in the current state threadRead the value of an Write a new value into an 1"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional-non-portable (local universal quantification) Trustworthy-<IN"A parser for a type a*, represented as a function that takes a * and returns a list of possible parses as (a,) pairs.qNote that this kind of backtracking parser is very inefficient; reading a large structure may be quite slow (cf ).LConsumes and returns the next character. Fails if there is no input left.PLook-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.zTransforms 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.TConsumes 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 succeds, 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.hConverts 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.5##/2"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional0non-portable (uses Text.ParserCombinators.ReadP) Trustworthy Lift a precedence-insensitive  to a .(Increases the precedence context by one.&Resets the precedence context to zero. (prec n p)C checks whether the precedence context is less than or equal to n, and if not, failsif so, parses p in context n.LConsumes and returns the next character. Fails if there is no input left.PLook-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.3"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional0non-portable (uses Text.ParserCombinators.ReadP) TrustworthyCharacter literal(String literal, with escapes interpreted%Punctuation or reserved symbol, e.g. (, ::Haskell identifier, e.g. foo, BazHaskell symbol, e.g. >>, :%Haskell lexemes. b is . () if b is , and  if b is .?Haskell lexer: returns the lexed string, rather than the lexeme1     (     (c) The University of Glasgowsee libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy Trustworthy(c) Daniel Fischer 2010see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy< !"#$%&'()*+,- !"#$%&'()*+ !"#$%&'()*+,-(c) Daniel Fischer 2010see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy<./01234512./012345i(c) The University of Glasgow 1994-2002 Portions obtained from hbc (c) Lennart Augusstsonsee libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy<J=Trigonometric and hyperbolic functions and related functions.TTEfficient, machine-independent access to the components of a floating-point number.Ga constant function, returning the radix of the representation (often 2)8a constant function, returning the number of digits of  in the significandUa constant function, returning the lowest and highest values the exponent may assume The function R applied to a real floating-point number returns the significand expressed as an o+ and an appropriately scaled exponent (an j). 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, uncurry  ( x) = x.  m nD is one of the two closest representable floating-point numbers to m*b^^n (or  Infinity2 if overflow occurs); usually the closer, but if mK 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 bL 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 bK is the floating-point radix. The behaviour is unspecified on infinite or NaN values.Cmultiplies 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 infinityE 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 numberUa 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 T", should return the same value as  y. A default definition of K is provided, but implementors can provide a more accurate implementation.Show a signed Tk 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 TK 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-1 Converts a r value into any type in class T.67JT89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(a function that can show unsigned values'the precedence of the enclosing contextthe value to show67JT /h 0i()*+89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~d67JT89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy*NR Parsing of s, producing values.Derived instances of R= make the following assumptions, which derived instances of  obey:KIf the constructor is defined to be an infix operator, then the derived RY instance will parse only infix applications of the constructor (not the prefix form).aAssociativity is not used to reduce the occurrence of parentheses, although precedence may be.?If the constructor is defined using record syntax, the derived R will parse only the record-syntax form, and furthermore, the fields must be given in the same order as the original declaration. The derived R| 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 R! 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 Zinstance (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 = readListPrecDefaultattempts 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 R 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 R instance of the g type, where values of type K should be are expected to use double quotes, rather than square brackets.Proposed replacement for $ using new-style parsers (GHC only).Proposed replacement for B 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 K method (GHC only). This is only needed for GHC, and even then only for R 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,  O returns a single successful `lexeme' consisting of the empty string. (Thus   "" = [("","")]G.) 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 properlyCOctal and hexadecimal numerics are not recognized as a single token!Comments are not treated properly mRead 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 pc 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.eParse the specified lexeme and continue as specified. Esp useful for nullary constructors; e.g. )choose [("A", return A), ("B", return B)]R We match both Ident and Symbol because the constructor might be an operator eg (:~:)6RAthe operator precedence of the enclosing context (a number from 0 to 11(). Function application has precedence 10.     R     2R     ((c) The University of Glasgow, 1997-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy<w8-bit unsigned integer typex16-bit unsigned integer typey32-bit unsigned integer typez64-bit unsigned integer typeSwap bytes in x.Reverse order of bytes in y.Reverse order of bytes in z.5wxyzvwxyz1wxyz""(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafevwxyzvwxyz "(c) The University of Glasgow 2005/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable TrustworthyThe G 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 Q 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 Provides V and R instances (since: 4.7.0.0). %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) ...(QpQ(p44BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimental not portableNone!"'(*035>IKLN LA type family to compute Boolean equality. Instances are provided only for open kinds, such as *o and function kinds. Instances are also provided for datatypes exported from base. A poly-kinded instance is notS provided, as a recursive definition for algebraic kinds is generally more useful.gThis 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.$Conditionally prove the equality of a and b.Propositional 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 ReflI constructor; in the body of the pattern-match, the compiler knows that a ~ b.Symmetry of equality Transitivity of equality!,Type-safe cast, using propositional equality"?Generalized form of type-safe cast using propositional equality#+Apply one equality to another, respectively$EExtract equality of the arguments from an equality of a applied types%GExtract equality of type constructors from an equality of applied types: !"#$%       !"#$%  !"#$%8 !"#$%     54BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimental not portableNone!"'*035>KLN&gThis 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.(Representational 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  to apply it.*/Type-safe cast, using representational equality+%Symmetry of representational equality,)Transitivity of representational equality-EConvert propositional (nominal) equality to representational equality&'()*+,- !"&'()*+,-()*+,-&' &'()*+,- !"6(c) Ashley Yakeley 20074BSD-style (see the LICENSE file in the distribution)ashley@semantic.org experimentalportable Trustworthy!"'>.9A class for categories. id and (.) must form a monoid./the identity morphism0morphism composition1Right-to-left composition2Left-to-right composition./012345./012./054312./0123450 12"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy'6Unicode 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 :: GeneralCategoryI instance:"UppercaseLetter == UppercaseLetterTrue"UppercaseLetter == LowercaseLetterFalseQ instance:NonSpacingMark <= MathSymbolTrueH instance:.enumFromTo ModifierLetter SpacingCombiningMark@[ModifierLetter,OtherLetter,NonSpacingMark,SpacingCombiningMark]R instance:)read "DashPunctuation" :: GeneralCategoryDashPunctuationread "17" :: GeneralCategory%*** Exception: Prelude.read: no parseV instance:show EnclosingMark"EnclosingMark"G instance:minBound :: GeneralCategoryUppercaseLettermaxBound :: GeneralCategory NotAssignedW instance:import Data.Ix ( index )&index (OtherLetter,Control) FinalQuote12"index (OtherLetter,Control) Format#*** Exception: Error in array index7Lu: Letter, Uppercase8Ll: Letter, Lowercase9Lt: Letter, Titlecase:Lm: Letter, Modifier;Lo: Letter, Other<Mn: Mark, Non-Spacing=Mc: Mark, Spacing Combining>Me: Mark, Enclosing?Nd: Number, Decimal@Nl: Number, LetterANo: Number, OtherBPc: Punctuation, ConnectorCPd: Punctuation, DashDPs: Punctuation, OpenEPe: Punctuation, CloseFPi: Punctuation, Initial quoteGPf: Punctuation, Final quoteHPo: Punctuation, OtherISm: Symbol, MathJSc: Symbol, CurrencyKSk: Symbol, ModifierLSo: Symbol, OtherMZs: Separator, SpaceNZl: Separator, LineOZp: Separator, ParagraphPCc: Other, ControlQCf: Other, FormatRCs: Other, SurrogateSCo: Other, Private UseTCn: Other, Not AssignedUConvert a single digit g to the corresponding j6. This function fails unless its argument satisfies K, but recognises both upper- and lower-case hexadecimal digits (that is, '0'..'9', 'a'..'f', 'A'..'F').Examples Characters '0' through '9' are converted properly to 0..9:map digitToInt ['0'..'9'][0,1,2,3,4,5,6,7,8,9]Both upper- and lower-case 'A' through 'F' are converted as well, to 10..15.map digitToInt ['a'..'f'][10,11,12,13,14,15]map digitToInt ['A'..'F'][10,11,12,13,14,15]"Anything else throws an exception:digitToInt 'G'/*** Exception: Char.digitToInt: not a digit 'G'digitToInt '&e'3*** Exception: Char.digitToInt: not a digit '\9829'VCThe Unicode general category of the character. This relies on the H instance of 6`, 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 '&e' OtherSymbolgeneralCategory '\31'ControlgeneralCategory ' 'SpaceWSelects 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 6s, or  otherwise:789:;"These classes are defined in the  @http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character DatabaseZ, part of the Unicode standard. The same document defines what is and is not a "Letter".Examples Basic usage: isLetter 'a'True isLetter 'A'True isLetter '0'False isLetter '%'False isLetter '&e'FalseisLetter '\31'False Ensure that W and  are equivalent.let chars = [(chr 0)..] let letters = map isLetter charslet alphas = map isAlpha charsletters == alphasTrueXlSelects Unicode mark characters, for example accents and the like, which combine with preceding characters.This function returns + if its argument has one of the following 6s, or  otherwise:<=>"These classes are defined in the  @http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character DatabaseX, part of the Unicode standard. The same document defines what is and is not a "Mark".Examples Basic usage: isMark 'a'False isMark '0'FalseqCombining marks such as accent characters usually need to follow another character before they become printable:map isMark "o" [False,True]#Puns are not necessarily supported: isMark '''FalseYfSelects Unicode numeric characters, including digits from various scripts, Roman numerals, et cetera.This function returns + if its argument has one of the following 6s, or  otherwise:?@A"These classes are defined in the  @http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character DatabaseZ, part of the Unicode standard. The same document defines what is and is not a "Number".Examples Basic usage: isNumber 'a'False isNumber '%'False isNumber '3'TrueASCII '0' through '9' are all numbers:and $ map isNumber ['0'..'9']True-Unicode Roman numerals are "numbers" as well: isNumber '!h'TrueZdSelects Unicode punctuation characters, including various kinds of connectors, brackets and quotes.This function returns + if its argument has one of the following 6s, or  otherwise:BCDEFGH"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 '&e'FalseisPunctuation '"'TrueisPunctuation '?'TrueisPunctuation ' 'True[PSelects Unicode symbol characters, including mathematical and currency symbols.This function returns + if its argument has one of the following 6s, or  otherwise:IJKL"These classes are defined in the  @http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character DatabaseZ, 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 '='TrueaThe definition of "math symbol" may be a little counter-intuitive depending on one's background: isSymbol '+'True isSymbol '-'False\/Selects Unicode space and separator characters.This function returns + if its argument has one of the following 6s, or  otherwise:MNO"These classes are defined in the  @http://www.unicode.org/reports/tr44/tr44-14.html#GC_Values_TableUnicode Character Database], part of the Unicode standard. The same document defines what is and is not a "Separator".Examples Basic usage:isSeparator 'a'FalseisSeparator '6'FalseisSeparator ' 'TrueDWarning: newlines and tab characters are not considered separators.isSeparator '\n'FalseisSeparator '\t'False1But some more exotic characters are (like HTML's &nbsp;):isSeparator '\160'True'6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\?g12C 6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\?gWXYZ[\6789:;<=>?@ABCDEFGHIJKLMNOPQRSTVU2C1  6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy<N?]The ]p function drops the largest suffix of a list in which the given predicate holds for all elements. For example: dropWhileEnd isSpace "foo\n" == "foo" dropWhileEnd isSpace "foo bar" == "foo bar" dropWhileEnd isSpace ("foo\n" ++ undefined) == "foo" ++ undefined^The ^: function drops the given prefix from a list. It returns 6 if the list did not start with the prefix given, or ' the list after the prefix, if it does. stripPrefix "foo" "foobar" == Just "bar" stripPrefix "foo" "foo" == Just "" stripPrefix "foo" "barfoo" == Nothing stripPrefix "foo" "barfoobaz" == Nothing_The _W function returns the index of the first element in the given list which is equal (by ') to the query element, or  if there is no such element.`The ` function extends _[, by returning the indices of all elements equal to the query element, in ascending order.aThe am function takes a predicate and a list and returns the first element in the list matching the predicate, or  if there is no such element.bThe b} function takes a predicate and a list and returns the index of the first element in the list satisfying the predicate, or  if there is no such element.cThe c function extends bY, by returning the indices of all elements satisfying the predicate, in ascending order.dThe d& function takes two lists and returns / iff the first list is a prefix of the second.eThe e& function takes two lists and returns P iff the first list is a suffix of the second. The second list must be finite.fThe f& function takes two lists and returns R iff the first list is contained, wholly and intact, anywhere within the second.Example: fisInfixOf "Haskell" "I really like Haskell." == True isInfixOf "Ial" "I really like Haskell." == FalsegO(n^2). The g function removes duplicate elements from a list. In particular, it keeps only the first occurrence of each element. (The name g, means `essence'.) It is a special case of hA, which allows the programmer to supply their own equality test.hThe h function behaves just like gO, except it uses a user-supplied equality predicate instead of the overloaded ' function.ii x! removes the first occurrence of x& from its list argument. For example, delete 'a' "banana" == "bnana"It is a special case of jA, which allows the programmer to supply their own equality test.jThe j function behaves like i0, but takes a user-supplied equality predicate.kThe kB function is list difference (non-associative). In the result of xs k 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 A, which allows the programmer to supply their own equality test.lThe l@ function returns the list union of the two lists. For example, "dog" `union` "cow" == "dogcw"Duplicates, and elements of the first list, are removed from the the second list, but if the first list contains duplicates, so will the result. It is a special case of mA, which allows the programmer to supply their own equality test.mThe m+ function is the non-overloaded version of l.nThe nA function takes the list intersection of two lists. For example, ([1,2,3,4] `intersect` [2,4,6,8] == [2,4]:If the first list contains duplicates, so will the result. ,[1,2,2,3,4] `intersect` [6,4,4,2] == [2,2,4]It is a special case of o, which allows the programmer to supply their own equality test. If the element is found in both the first and the second list, the element from the first list will be used.oThe o+ function is the non-overloaded version of n.pThe pv function takes an element and a list and `intersperses' that element between the elements of the list. For example, &intersperse ',' "abcde" == "a,b,c,d,e"qq xs xss is equivalent to ( (p xs xss)). It inserts the list xs in between the lists in xss and concatenates the result.rThe rH function transposes the rows and columns of its argument. For example, 2transpose [[1,2,3],[4,5,6]] == [[1,4],[2,5],[3,6]]TIf some of the rows are shorter than the following rows, their elements are skipped: Ctranspose [[10,11],[20],[],[30,31,32]] == [[10,20,30],[11,31],[32]]sThe s function takes a predicate a list and returns the pair of lists of elements which do and do not satisfy the predicate, respectively; i.e., 4partition p xs == (filter p xs, filter (not . p) xs)tThe t( 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.uThe u( 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.vThe v 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 wG, which allows the programmer to supply their own comparison function.wThe non-overloaded version of v.xThe x function takes a comparison function and a list and returns the greatest element of the list by the comparison function. The list must be finite and non-empty.yThe y function takes a comparison function and a list and returns the least element of the list by the comparison function. The list must be finite and non-empty.zThe z& function is an overloaded version of +. In particular, instead of returning an j/, it returns any type which is an instance of P'. It is, however, less efficient than .{The {& function is an overloaded version of , which accepts any L) value as the number of elements to take.|The |& function is an overloaded version of , which accepts any L) value as the number of elements to drop.}The }& function is an overloaded version of , which accepts any L) value as the position at which to split.~The ~& function is an overloaded version of #, which accepts any L value as the index.The & function is an overloaded version of , which accepts any L, value as the number of repetitions to make.The K function takes four lists and returns a list of quadruples, analogous to .The L function takes five lists and returns a list of five-tuples, analogous to .The J function takes six lists and returns a list of six-tuples, analogous to .The N function takes seven lists and returns a list of seven-tuples, analogous to .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 %.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 %.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 %.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 %.The K function takes a list of quadruples and returns four lists, analogous to '.The L function takes a list of five-tuples and returns five lists, analogous to '.The J function takes a list of six-tuples and returns six lists, analogous to '.The N 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.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 contains only equal elements. For example, :group "Mississippi" = ["M","i","ss","i","ss","i","pp","i"]It is a special case of A, which allows the programmer to supply their own equality test.The + function is the non-overloaded version of .The V function returns all initial segments of the argument, shortest first. For example, "inits "abc" == ["","a","ab","abc"] Note that ) has the following strictness property: #inits (xs ++ _|_) = inits xs ++ _|_In particular, inits _|_ = [] : _|_The S function returns all final segments of the argument, longest first. For example, $tails "abc" == ["abc", "bc", "c",""] Note that ) has the following strictness property: tails _|_ = _|_ : _|_The ? function returns the list of all subsequences of the argument. ;subsequences "abc" == ["","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. ;permutations "abc" == ["abc","bac","cba","bca","cab","acb"]The J function implements a stable sorting algorithm. It is a special case of G, which allows the programmer to supply their own comparison function.The + function is the non-overloaded version of .RSort a list by comparing the results of a key function applied to each element. sortOn f is equivalent to sortBy . comparing f8, but has the performance advantage of only evaluating f| once for each element in the input list. This is called the decorate-sort-undecorate paradigm, or Schwartzian transform.The  function is a `dual' to : while % reduces a list to a summary value, O builds a list from a seed value. The function takes the element and returns . if it is done producing the list or returns  (a,b), in which case, a is a prepended to the list and b@ is used as the next element in a recursive call. For example, *iterate f == unfoldr (\x -> Just (x, f x))In some cases,  can undo a  operation: unfoldr f' (foldr f z xs) == xsif the following holds: ,f' (f x y) = Just (x,y) f' z = NothingA simple use of unfoldr: Tunfoldr (\b -> if b == 0 then Nothing else Just (b, b-1)) 10 [10,9,8,7,6,5,4,3,2,1]r breaks a string up into a list of strings at newline characters. The resulting strings do not contain newlines. is an inverse operation to A. It joins lines, after appending a terminating newline to each.O breaks a string up into a list of words, which were delimited by white space. is an inverse operation to ). It joins words with separating spaces.P$%]^_`abcde&'fgh(ijklmnop)qrs*t+,uvwxyz-{|}~#./01234s      !"#$%&'(]^_`abcdefghijklmnopqrstuvwxyz{|}~O$%]^_`abcde&'fgh(ijklmnop)qrs*t+,uvwxyz-{|}~#./01234k"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafes      !"#$%&'(]^_`abcdefghijklmnopqrstuvwxyz{|}~spqr "    tu]^def !as#_`bc$%&'(giklnvhjmowxyz{|}~74BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportable Trustworthy'>A 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"A concrete, poly-kinded proxy type! 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.56789:;<=>?56789:;<=>?."(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy< Reads an unsigned L value in an arbitrary base.*Read an unsigned number in octal notation.,Read an unsigned number in decimal notation._Read an unsigned number in hexadecimal notation. Both upper or lower case letters are allowed. Reads an unsigned U2 value, expressed in decimal scientific notation.Reads a signed S- value, given a reader for an unsigned value.Show  non-negative L numbers in base 10.Show a signed T6 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 T. 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 TY 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.Show a signed T. value using standard decimal notation (e.g. 245000, 0.0015).This behaves as H, except that a decimal point is always guaranteed, even if not needed.Show a signed TY 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 H, except that a decimal point is always guaranteed, even if not needed.Shows a  non-negative Lr number using the base specified by the first argument, and the character representation specified by the second.Show  non-negative L numbers in base 16.Show  non-negative L numbers in base 8.the base4a predicate distinguishing valid digits in this base4a function converting a valid digit character to an j@ZZ@!(c) The FFI Task Force, 2000-2002see libraries/base/LICENSEffi@haskell.orginternalnon-portable (GHC Extensions)Unsafe<? {A value of type { ax 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 A 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 | aC 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. g, j, h, i, f, , , , , ", ", ", ", { a, | a,  a( or a renaming of any of these using newtype.Ithe return type is either a marshallable foreign type or has the form u 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 Iforeign 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: ntype 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 # when no longer required. To convert |> values to corresponding Haskell functions, one can define a dynamic) stub for the specific foreign type, e.g. ltype 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, b 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.TComputes 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.{|AB {| {|AB' TrustworthyCC-(c) The University of Glasgow, CWI 2001--2011/BSD-style (see the file libraries/base/LICENSE) Trustworthy&'(*+35<>NAFApplies a polymorhic type constructor to a sequence of kinds and typesB%Adds a TypeRep argument to a TypeRep.C@An internal function, to make representations for type literals.X The class X> allows a concrete representation of a type to be calculated.4A concrete representation of a (monomorphic) type. ) supports reasonably efficient equality.3An abstract representation of a type constructor.  objects can be built using @.=Applies a monomorphic type constructor to a sequence of typesA special case of B, which applies the function type constructor to a pair of types.Splits a type constructor application. Note that if the type construcotr is polymorphic, this will not return the kinds that were used. See  if you need all parts.$Split a type constructor application-Applies a type to a function type. Returns:  u6 if the first argument represents a function of type t -> u8 and the second argument represents a function of type t. Otherwise, returns . Builds a @ object representing a type constructor. An implementation of  Data.Typeable( should ensure that the following holds: < A==A' ^ B==B' ^ C==C' ==> mkTyCon A B C == mkTyCon A' B' C'5Observe the type constructor of a type representation3Observe the argument types of a type representation3Observe the argument kinds of a type representation0Observe string encoding of a type representation Observe the  of a type representationTakes a value of type a5 and returns a concrete representation of that type.Helper to fully evaluate  for use as  NFData(rnf) implementationHelper to fully evaluate  for use as  NFData(rnf) implementation8@ABCX package name module name the name of the type constructor A unique  objectDEFGHIJKL3@ABCX3@ABXC1@ABCXDEFGHIJKL((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.tA stable pointer is a reference to a Haskell expression that is guaranteed not to be affected by garbage collection, i.e., it will neither be deallocated nor will the value of the stable pointer itself change during garbage collection (ordinary references may be relocated during garbage collection). Consequently, stable pointers can be passed to foreign code, which can treat it as an opaque reference to a Haskell value.A value of type  StablePtr a5 is a stable pointer to a Haskell expression of type a.|Dissolve the association between the stable pointer and the Haskell value. Afterwards, if the stable pointer is passed to  or T, 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 #). 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  makeStablePtr. 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 may not refer to an accessible memory location and any attempt to pass it to the member functions of the class A 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 .tMNtMtMN"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthytt9-(c) The University of Glasgow, CWI 2001--2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy !"'>KLNThe type-safe cast operation*Extract a witness of equality of two types8A flexible variation parameterised in a type constructor Cast over k1 -> k2 Cast over k1 -> k2 -> k3-BX1XB'(c) The University of Glasgow 1997-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy*+,<Xk8-bit signed integer typel16-bit signed integer typem32-bit signed integer typen64-bit signed integer type2klmnOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz klmnOPQR.kRlQmPnOSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthyjklmnjklmn!(c) The FFI task force, 2000-2002see libraries/base/LICENSEffi@haskell.orginternalnon-portable (GHC Extensions) Trustworthy< {|}~ {|}~ {|}~$"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy '(*+,>KL}The }@ type represents values with two possibilities: a value of type } a b is either  a or  b.The }e 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 V constructor is used to hold a correct value (mnemonic: "right" also means "correct").Examples The type }  j- is the type of values which can be either a  or an j. The ! constructor can be used only on  s, and the ! constructor can be used only on js:'let s = Left "foo" :: Either String Ints Left "foo"$let n = Right 3 :: Either String IntnRight 3:type ss :: Either String Int:type nn :: Either String IntThe - from our O instance will ignore G 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 M 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 j from a g , 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 js.:{* let parseMultiple :: Either String Int parseMultiple = do x <- parseEither '1' y <- parseEither '2' return (x + y):} parseMultipleRight 3[But the following should fail overall, since the first operation where we attempt to parse 'm' as an j 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 }  j, one using the # constructor and another using the * constructor. Then we apply "either" the length function (if we have a .) or the "times-two" function (if we have an j):'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:Clet 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:Clet list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ] rights list[3,7]Partitions a list of } into two lists. All the Y 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:Clet 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):Clet list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]2partitionEithers list == (lefts list, rights list)TrueReturn  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 o 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")ERRORReturn  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 i to write a very simple reporting function that only outputs "SUCCESS" when a computation has succeeded.This example shows how o might be used to avoid pattern matching when one does not care about the value contained in the constructor:import Control.Monad ( when )4let report e = when (isRight e) $ putStrLn "SUCCESS"report (Left "parse error")report (Right 1)SUCCESS} } } }B(c) Universiteit Utrecht 2010-2011, University of Oxford 2012-2013see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy *03>KL*^^Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on._cRepresentable types of kind * -> *. This class is derivable in GHC with the DeriveGeneric flag on.`,Class for datatypes that represent datatypesa4Class for datatypes that represent data constructorsb*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 * -> *8Constants, additional parameters and recursion of kind **Meta-information (constructor names, etc.)(Sums: encode choice between constructors3Products: encode multiple arguments to constructorsComposition of functors!Tag for K1: recursion (of kind *),Tag for K1: parameters (other than the last)Tag for M1: datatypeTag for M1: constructorTag for M1: record selector/Type synonym for encoding recursion (of kind *):Type synonym for encoding parameters (other than the last)8Type synonym for encoding meta-information for datatypes;Type synonym for encoding meta-information for constructors?Type synonym for encoding meta-information for record selectors*Used for constructor fields without a nameGeneric representation typeGeneric representation type/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 datatype8Datatype to represent the associativity of a constructoruDatatype to represent the fixity of a constructor. An infix | declaration directly corresponds to an application of .+Datatype to represent the arity of a tuple.The name of the constructorThe fixity of the constructor%Marks if this constructor is a recordThe name of the selector &The name of the datatype (unqualified) AThe fully-qualified name of the module where the type is declared +Marks if the datatype is actually a newtype%Get the precedence of a fixity value.T^_`ab     ?^_`ab     ?  `   ab^_2^_`   ab  )a(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy'+,0>CN  Monoid under .7Maybe monoid returning the rightmost non-Nothing value. a is isomorphic to 3 (! a), and thus to 3 (  a)!6Maybe monoid returning the leftmost non-Nothing value.! a is isomorphic to   a , but precedes it historically.$Monoid under multiplication.'Monoid under addition.*"Boolean monoid under disjunction ().-"Boolean monoid under conjunction ().0.The monoid of endomorphisms under composition.3The dual of a (, obtained by swapping the arguments of .6An infix synonym for .% !"#$%&'()*+,-./0123456  !"#$%&'()*+,-./0123456 6345012-./*+,'()$%&!"#  !"#$%&'()*+,-./01234566Ross Paterson 20054BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportable TrustworthyN%\#Data structures that can be folded.For example, given a data type 7data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)a suitable instance would be instance Foldable Tree where foldMap f Empty = mempty foldMap f (Leaf x) = f x foldMap f (Node l k r) = foldMap f l `mappend` f k `mappend` foldMap f rThis is suitable even for abstract types, as the monoid is assumed to satisfy the monoid laws. Alternatively, one could define foldr: instance Foldable Tree where foldr f z Empty = z foldr f z (Leaf x) = f x z foldr f z (Node l k r) = foldr f (f k (foldr f z r)) lFoldable6 instances are expected to satisfy the following laws: /foldr f z t = appEndo (foldMap (Endo . f) t ) z Dfoldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z fold = foldMap idsum, product, maximum, and minimum* should all be essentially equivalent to foldMap forms, such as sum = getSum . foldMap Sumbut may be less defined.If the type is also a O instance, it should satisfy foldMap f = fold . fmap fwhich implies that $foldMap f . fmap g = foldMap (f . g)73Combine the elements of a structure using a monoid.8HMap each element of the structure to a monoid, and combine the results.9&Right-associative fold of a structure. 9 f z =  f z . ?:TRight-associative fold of a structure, but with strict application of the operator.;%Left-associative fold of a structure. ; f z =  f z . ?<SLeft-associative fold of a structure. but with strict application of the operator. ; f z =  f z . ?= A variant of 9N that has no base case, and thus may only be applied to non-empty structures. = f =  f . ?> A variant of ;N that has no base case, and thus may only be applied to non-empty structures. > f =  f . ??4List of elements of a structure, from left to right.@Test whether the structure is empty. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.A4Returns the size/length of a finite structure as an j. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.B(Does the element occur in the structure?C-The largest element of a non-empty structure.D+The least element of a non-empty structure.EThe E9 function computes the sum of the numbers of a structure.FThe F> function computes the product of the numbers of a structure.GbMonadic fold over the elements of a structure, associating to the right, i.e. from right to left.HaMonadic fold over the elements of a structure, associating to the left, i.e. from left to right.IMap 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 .JJ is IP with its arguments flipped. For a version that doesn't ignore the results see .for_ [1..4] print1234KMap each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see .As of base 4.8.0.0, K is just I, specialized to M.LL is KP with its arguments flipped. For a version that doesn't ignore the results see .As of base 4.8.0.0, L is just J, specialized to M.MEvaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see .NEvaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see .As of base 4.8.0.0, N is just M, specialized to M.O1The sum of a collection of actions, generalizing Q.P1The sum of a collection of actions, generalizing Q. As of base 4.8.0.0, P is just O, specialized to .Q>The concatenation of all the elements of a container of lists.RYMap a function over all the elements of a container and concatenate the resulting lists.SSI 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.TTI 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.UHDetermines whether any element of the structure satisfies the predicate.VGDetermines whether all elements of the structure satisfy the predicate.W\The largest element of a non-empty structure with respect to the given comparison function.XZThe least element of a non-empty structure with respect to the given comparison function.YY is the negation of B.ZThe Z{ 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.4\789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ%\789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ%\789:;<=>?@ABCDEFGHIJMOKLNPQRSTUVWXYZ \789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZBY"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional0non-portable (uses Text.ParserCombinators.ReadP) Trustworthy[equivalent to  with a precedence of 0.\Parse a string using the R> instance. Succeeds if there is exactly one valid result. A  value indicates a parse error.]Parse a string using the R: instance. Succeeds if there is exactly one valid result.^The ^] function reads input from a string, which must be completely consumed by the input process.[\]^)R    [\]^R[^    \][\]^"(c) The University of Glasgow 2008see libraries/base/LICENSEcvs-ghc@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 a box, which may be empty or full.` Create an _ which is initially empty.a Create an _# which contains the supplied value.bReturn the contents of the _ . If the _ is currently empty, b& will wait until it is full. After a b, the _ is left empty..There are two further important properties of b:bK is single-wakeup. That is, if there are multiple threads blocked in b , and the _w becomes full, only one thread will be woken up. The runtime guarantees that the woken thread completes its b 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.c#Atomically read the contents of an _ . If the _ is currently empty, c will wait until its full. c# is guaranteed to receive the next d.cA is multiple-wakeup, so when multiple readers are blocked on an _,, all of them are woken up at the same time.Compatibility note: Prior to base 4.7, c was a combination of b and dB. This mean that in the presence of other threads attempting to d, c could block. Furthermore, c would not receive the next d3 if there was already a pending thread blocked on bK. The old behavior can be recovered by implementing 'readMVar as follows: l readMVar :: MVar a -> IO a readMVar m = mask_ $ do a <- takeMVar m putMVar m a return a dPut a value into an _ . If the _ is currently full, d" will wait until it becomes empty..There are two further important properties of d:dK is single-wakeup. That is, if there are multiple threads blocked in d , and the _x becomes empty, only one thread will be woken up. The runtime guarantees that the woken thread completes its d 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.eA non-blocking version of b. The e% function returns immediately, with  if the _ was empty, or  a if the _ was full with contents a . After e, the _ is left empty.fA non-blocking version of d. The f% function attempts to put the value a into the _ , returning  if it was successful, or  otherwise.gA non-blocking version of c. The g% function returns immediately, with  if the _ was empty, or  a if the _ was full with contents a.hCheck 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 e instead if possible.Add a finalizer to an _ (GHC only). See Foreign.ForeignPtr and System.Mem.Weak for more about finalizers. _`abcdefgh _`abcdefgh _`abcdefgh((c) The University of Glasgow, 1998-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe*+<iBA weak pointer object with a key and a value. The value has type v.AA weak pointer expresses a relationship between two objects, the key and the value: if the key is considered to be alive by the garbage collector, then the value is also alive. A reference from the value to the key does not keep the key alive.1A weak pointer may also have a finalizer of type IO (); if it does, then the finalizer will be run at most once, at a time after the key has become unreachable by the program ("dead"). The storage manager attempts to run the finalizer(s) for an object soon after the object dies, but promptness is not guaranteed.+It is not guaranteed that a finalizer will eventually run, and no attempt is made to run outstanding finalizers when the program exits. Therefore finalizers should not be relied on to clean up resources - other methods (eg. exception handlers) should be employed, possibly in addition to finalizers.References from the finalizer to the key are treated in the same way as references from the value to the key: they do not keep the key alive. A finalizer may therefore ressurrect the key, perhaps by storing it in the same data structure.The finalizer, and the relationship between the key and the value, exist regardless of whether the program keeps a reference to the i 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 canS be used reliably for types that are created explicitly and have identity, such as IORef and MVar{. However, to place a finalizer on one of these types, you should use the specific operation provided for that type, e.g.  mkWeakIORef and addMVarFinalizer respectively (the non-uniformity is accidental). These operations attach the finalizer to the primitive object inside the box (e.g. MutVar# in the case of IORefp), because attaching the finalizer to the box itself fails when the outer box is optimised away by the compiler.jEstablishes a weak pointer to k , with value v and a finalizer.?This is the most general interface for building a weak pointer.k>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 k@ depends on when the garbage collector runs, hence it is in the u monad.lMCauses a the finalizer associated with a weak pointer to be run immediately.ijkeyvalue finalizerreturns: a weak pointer objectklijklijkl((c) The University of Glasgow, 1998-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy+;<NThe  SomeExceptionM 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.mArithmetic exceptions.st#This is thrown when the user calls . The String is the argument given to .vTAny type that you wish to throw or catch as an exception must be an instance of the  ExceptionJ class. The simplest case is a new exception type directly below the root: ndata MyException = ThisException | ThatException deriving (Show, Typeable) instance Exception MyException&The default method definitions in the  ExceptionA class do what we need in this case. You can now throw and catch  ThisException and  ThatException as exceptions: n*Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException)) Caught ThisException UIn 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 deriving Typeable 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 deriving Typeable 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 (Typeable, 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 y7Render this exception value in a human-friendly manner.Default implementation: *.{nThrow an exception. Exceptions may be thrown from purely functional code, but may only be caught within the u monad.mnopqrstuvwxyz{mnopqrstuvwxyz{zmnopqrstuvwxy{'(c) The University of Glasgow 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe<INPDescribes the behaviour of a thread when an asynchronous exception is received.7asynchronous exceptions are unmasked (the normal state)the state during V: asynchronous exceptions are masked, but blocking operations may still be interruptedthe state during T: 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.?A monad transformer embedding strict state transformers in the u monad. The s: parameter indicates that the internal state used by the 3. computation is a special one supplied by the u= monad, and thus distinct from those used by invocations of 6.!This is the "back door" into the u monad, allowing uD computation to be performed at any time. For this to be safe, the uO 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 K. 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 J cannot float outside a lambda. For example, if you say: 8 f x = unsafePerformIO (newIORef []) I 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!This 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  cannot be used safely within . allows u@ computation to be deferred lazily. When passed a value of type IO a, the u. will only be performed when the value of the a@ is demanded. This is used to implement lazy file reading, see .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. A variant of {" that can only be used within the u monad. Although / has a type that is an instance of the type of {*, the two functions are subtly different: 9throw e `seq` x ===> throw e throwIO e `seq` x ===> x+The first example will cause the exception e8 to be raised, whereas the second one won't. In fact, G will only cause an exception to be raised when it is used within the u monad. The ) variant should be used in preference to {# to raise an exception within the u= monad because it guarantees ordering with respect to other u operations, whereas { does not. Returns the  for the current thread.Like , but does not pass a restore action to the argument.9Executes an IO computation with asynchronous exceptions maskedX. That is, any thread which attempts to raise an exception in the current thread with \C 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: jmask $ \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 \& 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, B 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 Z.^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 Z 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 a new thread in an unmasked state use Z.Like , but does not pass a restore action to the argument.Like 8, but the masked computation is not interruptible (see Control.Exception#interruptibleK). THIS SHOULD BE USED WITH GREAT CARE, because if a thread executing in U 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.QForces its argument to be evaluated to weak head normal form when the resultant uO action is executed. It can be used to order evaluation with respect to other u( operations; its semantics are given by  evaluate x `seq` y ==> y evaluate x `catch` f ==> (return $! x) `catch` f evaluate x >>= f ==> (return $! x) >>= fNote:! the first equation implies that  (evaluate x) is not the same as  (return $! x). A correct definition is ' evaluate x = (return $! x) >>= return -computation to run first ("acquire resource"),computation to run last ("release resource")computation to run in-betweencomputation to run first?computation to run afterward (even if an exception was raised) u p"(c) The University of Glasgow 2008see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe+,<A mutable variable in the u monad Build a new Read the value of an Write a new value into an >"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy<Make a i pointer to an 8, using the second argument as a finalizer to run when  is garbage-collectedMutate the contents of an .Be warned that I does not apply the function strictly. This means if the program calls  many times, but seldomly 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: Tref <- newIORef 0 replicateM_ 1000000 $ modifyIORef ref (+1) readIORef ref >>= printTo avoid this problem, use  instead.Strict version of 'Atomically modifies the contents of an ."This function is useful for using B 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 es is problematic, so it is recommended that if you need to do anything more complicated then using : instead is a good idea. does not apply the function strictly. This is important to know even if all you are doing is replacing the value. For example, this will leak memory: Eref <- newIORef '1' forever $ atomicModifyIORef ref (\_ -> ('2', ()))Use  or  to avoid this problem.Strict version of -. This forces both the value stored in the  as well as the value returned. Variant of 1 with the "barrier to reordering" property that  has.  ?(c) The FFI task force 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableUnsafe|Sometimes 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.TIt is expected that this operation will be replaced in a future revision of Haskell.@"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy*+,A value of type 2 is an object encapsulated together with its type.A P may only represent a monomorphic value; an attempt to create a value of type R from a polymorphically-typed expression will result in an ambiguity error (see ).Ving a value of type V returns a pretty-printed representation of the object's type; useful for debugging.3Converts an arbitrary value into an object of type . .The type of the object must be an instance of XN, 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) Converts a L object back into an ordinary Haskell value of the correct type. See also . Converts a L object back into an ordinary Haskell value of the correct type. See also . the dynamically-typed objecta default value sreturns: 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.4BX "(c) The University of Glasgow 2008see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe+,?An . is a mutable, boxed, non-strict array in the u+ monad. The type arguments are as follows:i8: the index type of the array (should be an instance of W)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  A(c) The FFI task force 2001see libraries/base/LICENSEffi@haskell.org provisionalportable TrustworthyN LThe 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.gAll 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 (k, l, m, n), the fixed size Word types (w, x, y, z), t, all types from Foreign.C.Types , as well as {.eComputes the storage requirements (in bytes) of the argument. The value of the argument is not used.MComputes the alignment constraint of the argument. An alignment constraint x+ is fulfilled by any address divisible by x). The value of the argument is not used.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))vNote that this is only a specification, not necessarily the concrete implementation of the function.wWrite a value to a memory area regarded as an array of values of the same kind. The following equality holds: DpokeElemOff addr idx x = poke (addr `plusPtr` (idx * sizeOf x)) xoRead a value from a memory location given by a base address and offset. The following equality holds: 0peekByteOff addr off = peek (addr `plusPtr` off)nWrite 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 .            B(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy*+,<C Haskell type representing the C jmp_buf type. Haskell type representing the C fpos_t type. Haskell type representing the C FILE type. Haskell type representing the C  suseconds_t type. Haskell type representing the C  useconds_t type. Haskell type representing the C time_t type. Haskell type representing the C clock_t type. Haskell type representing the C  sig_atomic_t type. Haskell type representing the C wchar_t type. Haskell type representing the C size_t type. Haskell type representing the C  ptrdiff_t type. Haskell type representing the C double type. Haskell type representing the C float type. Haskell type representing the C unsigned long long type. Haskell type representing the C  long long type. Haskell type representing the C  unsigned long type. Haskell type representing the C long type. Haskell type representing the C  unsigned int type. Haskell type representing the C int type. Haskell type representing the C unsigned short type. Haskell type representing the C short type. Haskell type representing the C  unsigned char type. Haskell type representing the C  signed char type. Haskell type representing the C char type.j !"#$%&'()*+,-./0123456789:;<=>?@ABC55N !"#$%&'()*+,-./0123456789:;<=>?@ABC((c) The University of Glasgow, 1992-2003see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)Unsafe*+,<D+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 use the ccall calling convention. 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 .ETurns a plain memory reference into a foreign object by associating a finalizer - given by the monadic operation - with the reference. The storage manager will start the finalizer, in a separate thread, some time after the last reference to the  ForeignPtr is dropped. There is no guarantee of promptness, and in fact there is no guarantee that the finalizer will eventually run at all.Note that references from a finalizer do not necessarily prevent another object from being finalized. If A's finalizer refers to B (perhaps using , then the only guarantee is that B's finalizer will never be started before A's. If both A and B are unreachable, then both finalizers will start together. See  for more on finalizer ordering."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 }galthough it may be implemented differently internally: you may not assume that the memory returned by  has been allocated with M. GHC notes: o 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 D and associated functions is strongly recommended in preference to  newForeignPtr with a finalizer.This function is similar to X, except that the size of the memory required is given explicitly as a number of bytes.FThis function is similar to f, except that the size and alignment of the memory required is given explicitly as numbers of bytes.G"Allocate some memory and return a = to it. The memory will be released automatically when the  is discarded. GHC notes: G$ 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.HThis 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.IThis function is similar to F, 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.UThis function adds a finalizer to the given foreign object. The finalizer will run beforeN all other finalizers for the same object which have already been registered.Like  but allows the finalizer to be passed an additional environment parameter to be passed to the finalizer. The environment passed to the finalizer is fixed by the second argument to J,This function adds a finalizer to the given  ForeignPtr. The finalizer will run beforeN all other finalizers for the same object which have already been registered.This is a variant of addForeignPtrFinalizer', where the finalizer is an arbitrary IOF 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, Handle?s are finalized objects, so a finalizer should not refer to a Handle (including stdout, stdin or stderr).gTurns a plain memory reference into a foreign pointer that may be associated with finalizers by using .This function ensures that the foreign object in question is alive at the given place in the sequence of IO actions. In particular C does a $ after it executes the user action.ZNote 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 F2d 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, p must be used wherever it has to be guaranteed that the pointer lives on - i.e., has another usage occurrence.TTo avoid subtle coding errors, hand written marshalling code should preferably use C 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.OCauses the finalizers associated with a foreign pointer to be run immediately.'DKLMNOPQRSTEFGHIJUVWXYZ[\]^LMNOTEFGHIJDKLMNOPQRSTEFGHIJUVWXYZ[\]^E"(c) The University of Glasgow 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisional#non-portable (requires concurrency) Trustworthy\Turns a plain memory reference into a foreign object by associating a finalizer - given by the monadic operation - with the reference. The finalizer will be executed after the last reference to the foreign object is dropped. There is no guarantee of promptness, and in fact there is no guarantee that the finalizer will eventually run at all.,This function adds a finalizer to the given Z. The finalizer will run after the last reference to the foreign object is dropped, but before; all previously registered finalizers for the same object.#(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy*+,<CEA 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.HAn 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 WordPtrcasts a WordPtr to a Ptrcasts a Ptr to an IntPtr casts an IntPtr to a Ptr _`abcd{|{| _`abcd"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableUnsafe*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 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 u 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 h 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 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 Oc, but yields a memory area that has a finalizer attached that releases the memory area. As with B, it is not guaranteed that the block of memory was allocated by M.This function is similar to Oc, but yields a memory area that has a finalizer attached that releases the memory area. As with B, it is not guaranteed that the block of memory was allocated by M.C"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable TrustworthyD"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableUnsafeF"(c) The University of Glasgow 2008see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) TrustworthyAA 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 s, but they might not be zero: for exmaple, the buffer might correspond to a memory-mapped file and in which case e will point to the next location to be written, which is not necessarily the beginning of the file. 2slides the contents of the buffer to the beginning*e      !"f(      !"( !"     "e      !"fG((c) The University of Glasgow, 2008-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy;N #$Stopped because the input contains insufficient available elements, or all of the input sequence has been sucessfully 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 'k is a specification of a conversion scheme between sequences of bytes and sequences of Unicode characters.XFor example, UTF-8 is an encoding of Unicode characters into a sequence of bytes. The ' for UTF-8 is utf8.)a string that can be passed to mkTextEncoding to create an equivalent '.*Creates a means of decoding bytes into characters: the result must not be shared between several byte sequences or simultaneously across threads+Creates a means of encode characters into bytes: the result must not be shared between several character sequences or simultaneously across threads3The 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.4The recover function is used to continue decoding in the presence of invalid or unrepresentable sequences. This includes both those detected by encode returning InvalidSequenceO and those that occur because the input byte sequence appears to be truncated.CProgress will usually be made by skipping the first element of the fromo 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.5AResources associated with the encoding may now be released. The encode1 function may not be called again after calling close.6&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.#$%&'()*+,-./01234567g#$%&'()*+,-./012345671234567'()*+,-0./#$%& #$%&'()*+,-./01234567gI((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy;%A mode that determines the effect of hSeek  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 K (see also K/). The standard libraries provide creation of K9s via Posix file operations with file descriptors (see V ) with FD being the underlying D instance.&Users may provide custom instances of D4 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 X. Seek operations are not supported on directories (other than to the zero position).ABA duplex communications channel (results in creation of a duplex K?). The standard libraries use this device type when creating Ks for open sockets.B>A file that may be read or written, and also may be seekable.CA "raw" (disk) device which supports block binary read and write operations and may be seekable only to positions of certain granularity (block- aligned).D+I/O operations required for implementing a Handle.Eready 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.FPcloses the device. Further operations on the device should produce exceptions.Greturns ( if the device is a terminal or console.Hreturns  if the device supports I operations.I+seek to the specified position in the data.J(return the current position in the data.Kreturn the size of the data.Lchange the size of the data.MKfor terminal devices, changes whether characters are echoed on the device.N#returns the current echoing status.Osome devices (e.g. terminals) support a "raw" mode where characters entered are immediately made available to the program. If available, this operations enables raw mode.P returns the ? corresponding to this device.Q}duplicates the device, if possible. The new device is expected to share a file pointer with the original device (like Unix dup).Rdup2 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).S;A low-level I/O provider where the data is bytes in memory.TbRead up to the specified number of bytes, returning the number of bytes actually read. This function should only block if there is no data available. If there is not enough data available, then the function should just return the available data. A return value of zero indicates that the end of the data stream (e.g. end of file) has been reached.U[Read up to the specified number of bytes, returning the number of bytes actually read, or , if the end of the stream has been reached.V$Write the specified number of bytes.WiWrite up to the specified number of bytes without blocking. Returns the actual number of bytes written.;<=>?@ABCDEFGHIJKLMNOPQRSTUVWh;<=>?@ABCDEFGHIJKLMNOPQRSTUVWSTUVWDEFGHIJKLMNOPQR?@ABC;<=>;<=>?@ABCDEFGHIJKLMNOPQRSTUVWhJ"(c) The University of Glasgow 2008see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) TrustworthyXThe purpose of X{ is to provide a common interface for I/O devices that can read and write data through a buffer. Devices that implement Xf include ordinary files, memory-mapped files, and bytestrings. The underlying device implementing a Handle must provide X.Yallocate 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.Zreads 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.jThere is no corresponding operation for read buffers, because before reading the client will always call Z.]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. XYZ[\]^_`ab XYZ[\]^_`ab XYZ[\]^_`abXYZ[\]^_`ab((c) The University of Glasgow, 1994-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy+,;NcSpecifies 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.e'the representation of newlines on inputf(the representation of newlines on outputg?The representation of a newline in the external file or stream.h'\n'i'\r\n'jThree 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-bufferingd: 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-bufferingD: 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.DSimilarly, 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-bufferingc: 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 Y 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.k"buffering is disabled if possible.l-line-buffering should be enabled if possible.mJblock-buffering should be enabled if possible. The size of the buffer is n items if the argument is  n+ and is otherwise implementation-dependent.njHaskell 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 manageP 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;Cwhether 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 readableE if it manages only input or both input and output; likewise, it is writableC 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 V and I 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 'e only to itself; no attempt is made to compare the internal state of different handles for equality.o<The native newline representation for the current platform: h on Unix systems, i on Windows.pMap '\r\n' into '\n' on input, and '\n' to the native newline represetnation on output. This mode can be used on any platform, and works with text files using any newline convention. The downside is that readFile >>= writeFile might yield a different file. wuniversalNewlineMode = NewlineMode { inputNL = CRLF, outputNL = nativeNewline }q>Use the native newline representation on both input and output ynativeNewlineMode = NewlineMode { inputNL = nativeNewline outputNL = nativeNewline }r!Do no newline translation at all. DnoNewlineTranslation = NewlineMode { inputNL = LF, outputNL = LF }3cdefghijklmijklmnopqrstuvwxyz{|}~nopqr71234567cdefghijklmijklmnopqrstuvwxyz{|}~nopqrcdefghijklmijklmnopqrstuvwxyz{|}~nopqr#(c) The University of Glasgow, 2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy+,;<N|,The Haskell 2010 type for exceptions in the u( monad. Any I/O operation may raise an |z instead of returning a result. For a more general type of exception, including also those that arise in pure code, see Control.Exception.Exception.(In Haskell 2010, this is an opaque type.}Exceptions that occur in the IO monad. An  IOExceptionz 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 * method of the u instance of the M class raises a ~, thus: >instance Monad IO where ... fail s = ioError (userError s)s;An abstract type that contains a value for each variant of |.t1Defines the exit codes that a program can return.u!indicates successful termination;vindicates 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).w(Exceptions generated by array operationsxCAn attempt was made to index an array outside its declared bounds.yVAn attempt was made to evaluate an element of an array that had not been initialized.zAsynchronous exceptions.{The current thread's stack exceeded its limit. Since an exception has been raised, the thread's stack will certainly be below its limit again, but the programmer should take remedial action immediately.|The program's heap is reaching its limit, and the program should take action to reduce the amount of live data it has. Notes:5It is undefined which thread receives this exception.GHC currently does not throw | exceptions.}4This exception is raised by another thread calling ZI, or by the system if it needs to terminate the thread for some reason.~This exception is raised by default in the main thread of the program when the user requests to terminate the program via the usual mechanism(s) (e.g. Control-C in the console).'Superclass for asynchronous exceptions. was applied to .5This thread has exceeded its allocation limit. See Y and Y.BThere are no runnable threads, so the program is deadlocked. The Deadlock- exception is raised in the main thread only.]The thread is waiting to retry an STM transaction, but there are no other references to any TVar&s involved, so it can't ever continue.The thread is blocked on an MVar,, but there are no other references to the MVar so it can't ever continue. Raise an | in the u monad.W|}~stuvwxyz{|}~A|}~stuvwxyz{|}~/|}~stuvwxyz{|}~M(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy< .A pointer to a foreign function equivalent to (, which may be used as a finalizer (cf C) for storage allocated with , ,  or .FAllocate a block of memory that is sufficient to hold values of type a7. The size of the area allocated is determined by the  method from the instance of  for the appropriate type.$The memory may be deallocated using  or  when no longer required.Like / but memory is filled with bytes of value zero.Allocate a block of memory of the given number of bytes. The block of memory is sufficiently aligned for any of the basic foreign types that fits into a memory block of the allocated size.$The memory may be deallocated using  or  when no longer required.Llike / but memory is filled with bytes of value zero. f executes the computation fo, passing as argument a pointer to a temporarily allocated block of memory sufficient to hold values of type a.The memory is freed when fM terminates (either normally or via an exception), so the pointer passed to f must not be used after this. n f executes the computation fO, passing as argument a pointer to a temporarily allocated block of memory of n bytes. The block of memory is sufficiently aligned for any of the basic foreign types that fits into a memory block of the allocated size.The memory is freed when fM terminates (either normally or via an exception), so the pointer passed to f must not be used after this.-Resize a memory area that was allocated with  or - to the size needed to store values of type b~. The returned pointer may refer to an entirely different memory area, but will be suitably aligned to hold values of type b. The contents of the referenced memory area will be the same as of the original pointer up to the minimum of the original size and the size of values of type b.If the argument to  is ,  behaves like .-Resize a memory area that was allocated with  or f to the given size. The returned pointer may refer to an entirely different memory area, but will be sufficiently aligned for any of the basic foreign types that fits into a memory block of the given size. The contents of the referenced memory area will be the same as of the original pointer up to the minimum of the original size and the given size.If the pointer argument to  is ,  behaves like . If the requested size is 0,  behaves like ./Free a block of memory that was allocated with , , , , N or any of the newX functions in Foreign.Marshal.Array or Foreign.C.String.  N(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy *Basic C routines needed for memory copyingLAllocate a block of memory and marshal a value into it (the combination of  and 8). The size of the area allocated is determined by the A method from the instance of  for the appropriate type.$The memory may be deallocated using M or M when no longer required. val f executes the computation fX, passing as argument a pointer to a temporarily allocated block of memory into which val) has been marshalled (the combination of  and ).The memory is freed when fM terminates (either normally or via an exception), so the pointer passed to f must not be used after this.Convert a Haskell f to its numeric representation>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 withXXXJ combinator over a list of objects, yielding a list of marshalled objectssCopies the given number of bytes from the second area (source) into the first (destination); the copied areas may not overlapoCopies the given number of bytes from the second area (source) into the first (destination); the copied areas may overlap>Fill a given number of bytes in memory area with a byte value.  O(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy<LAllocate storage for the given number of elements of a storable type (like M, but for multiple elements).Like C, 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.CTemporarily allocate space for the given number of elements (like M, but for multiple elements).Like C, but add an extra position to hold a special termination element.Adjust the size of an arrayKAdjust 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.GConvert an array terminated by the given end marker into a Haskell list/Write the list elements consecutive into memoryaWrite the list elements consecutive into memory and terminate them with the given marker elementjWrite a list of storable elements into a newly allocated, consecutive sequence of storable values (like N, 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 N, but for multiple elements).Like F, but the action gets the number of values as an additional parameterLike 1, but a terminator indicates where the array endsLike 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 overlapwCopy the given number of elements from the second array (source) into the first array (destination); the copied areas may overlapCReturn the number of elements in an array, excluding the terminator?Advance a pointer into an array by the given number of elementsP((c) The University of Glasgow, 2008-2011see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy8Marshal 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 charactersPnew storage is allocated for the C string and must be explicitly freed using  or .aMarshal a Haskell string into a C string (ie, character array) with explicit length information.Pnew storage is allocated for the C string and must be explicitly freed using  or .QMarshal 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.wMarshal 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.>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 termsEncoding of CString to createNull-terminate?String to encode/Worker that can safely use the allocated memoryEncoding of CString to createNull-terminate?String to encodeQ(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy<A wide character string with explicit length information in Ws instead of a terminating NUL (allowing NUL characters in the middle of the string).SA C wide string is a reference to an array of C wide characters terminated by NUL.A string with explicit length information in bytes instead of a terminating NUL (allowing NUL characters in the middle of the string).HA 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 charactersPnew storage is allocated for the C string and must be explicitly freed using M or M.aMarshal a Haskell string into a C string (ie, character array) with explicit length information.Pnew storage is allocated for the C string and must be explicitly freed using M or M.QMarshal 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.wMarshal 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.fConvert a Haskell character to a C character. This function is only safe on the first 256 characters. Convert a C  unsigned charL, 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 charL, 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 charactersPnew storage is allocated for the C string and must be explicitly freed using M or M.aMarshal a Haskell string into a C string (ie, character array) with explicit length information.Pnew storage is allocated for the C string and must be explicitly freed using M or M.QMarshal 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.wMarshal 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.CMarshal 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 charactersUnew storage is allocated for the C wide string and must be explicitly freed using M or M.kMarshal a Haskell string into a C wide string (ie, wide character array) with explicit length information.Unew storage is allocated for the C wide string and must be explicitly freed using M or M.VMarshal 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.$$R(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable Trustworthy Execute an u action, throwing a ~ if the predicate yields , when applied to the result returned by the uJ action. If no exception is raised, return the result of the computation.Like , but discarding the result%Guards against negative result valuesLike , but discarding the resultGuards against null pointersDiscard the return value of an u action%error condition on the result of the u action9computes an error message from erroneous results of the u actionthe u action to be executedS(c) Sven Panne 2002-2004/BSD-style (see the file libraries/base/LICENSE)sven.panne@aedion.de provisionalportable TrustworthyA memory pool.Allocate a fresh memory pool.UDeallocate a memory pool and everything which has been allocated in the pool itself.Execute an action with a fresh memory pool, which gets automatically deallocated (including its contents) after the action has finished.iAllocate 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.:Allocate the given number of bytes of storage in the pool.[Adjust the storage area for an element in the pool to the given size of the required type.EAdjust the storage area for an element in the pool to the given size.RAllocate storage for the given number of elements of a storable type in the pool.Allocate 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..Adjust the size of an array in the given pool.AAdjust the size of an array with an end marker in the given pool.XAllocate storage for a value in the given pool and marshal the value into this storage.fAllocate consecutive storage for a list of values in the given pool and marshal these values into it.Allocate consecutive storage for a list of values in the given pool and marshal these values into it, terminating the end with the given marker.(c) The FFI task force 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafeA(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafejklmntvwxyz{|efghijklmnopqrstuvwxyz{|}~(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafejklmntvwxyz{|efghijklmnopqrstuvwxyz{|}~(c) The FFI task force 2003/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafeAT(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportable TrustworthyHaskell representation for errnof values. The implementation is deliberately exposed, to allow users to add their own definitions of  values.8YYield  if the given 6 value is valid on the system. This implies that the I instance of E is also system dependent as it is only defined for valid values of .ZGet the current value of errno in the current thread.[Reset the current thread's errno value to .\ Throw an |' corresponding to the current value of Z.] Throw an |' corresponding to the current value of Z if the result value of the u" action meets the given predicate.^as ]!, but discards the result of the u action after error handling._as ], but retry the u' action when it yields the error code O - this amounts to the standard retry loop for interrupted POSIX system calls.`as _;, but additionally if the operation yields the error code  or W5, an alternative action is executed before retrying.aas _, but discards the result.bas `, but discards the result.c Throw an |' corresponding to the current value of Z if the u action returns a result of -1.das c, but discards the result.e Throw an |' corresponding to the current value of Z if the u action returns a result of -13, but retries in case of an interrupted operation.fas c, but discards the result.gas e-, but checks for operations that would block.has g, but discards the result.i Throw an |' corresponding to the current value of Z if the u action returns .j Throw an |' corresponding to the current value of Z if the u action returns 1, but retry in case of an interrupted operation.kas j-, but checks for operations that would block.las \9, but exceptions include the given path when appropriate.mas ]<, but exceptions include the given path when appropriate.nas ^<, but exceptions include the given path when appropriate.oas i<, but exceptions include the given path when appropriate.pas c<, but exceptions include the given path when appropriate.qas d<, but exceptions include the given path when appropriate.r Construct an | based on the given Y value. The optional information can be used to improve the accuracy of error messages.      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\)textual description of the error location]/predicate to apply to the result value of the u operation#textual description of the locationthe u operation to be executed^_`/predicate to apply to the result value of the u operation#textual description of the locationthe u operation to be executedDaction to execute before retrying if an immediate retry would blockabcdefghijklmnopqr%the location where the error occurredthe error number)optional handle associated with the error+optional filename associated with the error      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[r\]^_acdefij`bghklmnopq      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr(c) The FFI task force 2001/BSD-style (see the file libraries/base/LICENSE)ffi@haskell.org provisionalportableSafe      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrU"(c) The University of Glasgow 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalnon-portable (requires POSIX) Trustworthy*+,<CEstuvwxyz{|}~)stuvwxyz{|}~)~}|{zuvtyxws7stuvwxyz{|}~W((c) The University of Glasgow, 2008-2011see libraries/base/LICENSElibraries@haskell.orginternal non-portable TrustworthyThe  is used to construct  TextEncoding4s, and specifies how they handle illegal sequences.6Throw an error when an illegal sequence is encounteredDAttempt to ignore and recover if an illegal sequence is encountered?Replace with the closest visual match upon an illegal sequence_Use the private-use escape mechanism to attempt to allow illegal sequences to be roundtripped.JIn transliterate mode, we use this character when decoding unknown bytes.4This is the defined Unicode replacement character: <http://www.fileformat.info/info/unicode/char/0fffd/index.htmSome characters are actually "surrogate" codepoints defined for use in UTF-16. We need to signal an invalid character if we detect them when encoding a sequence of gs into w)s because they won't give valid Unicode._We may also need to signal an invalid character if we detect them when encoding a sequence of gs into ws because the N mode creates these to round-trip bytes through our internal UTF-16 encoding.   X#(c) The University of Glasgow, 2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy<R      byte to check lower bound upper bound     [((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)Unsafe *+<IN1@Shared memory locations that support atomic memory transactions..A monad supporting atomic memory transactions.The 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  blocked in  in an STM transactioncurrently in a foreign call)blocked on some other resource. Without  -threaded , I/O and  threadDelay show up as , with  -threaded they show up as .A 8 is an abstract type representing a handle to a thread.  is an instance of I, Q and V , where the Q6 instance implements an arbitrary total ordering over s. The V/ instance lets you convert an arbitrary-valued  to string form; showing a a value is occasionally useful when debugging or diagnosing the behaviour of a concurrent program.Note: in GHC, if you have a , you essentially have a pointer to the thread itself. This means the thread itself can't be garbage collected until you drop the >. This misfeature will hopefully be corrected at a later date.Every thread has an allocation counter that tracks how much memory has been allocated by the thread. The counter is initialized to zero, and a sets the current value. The allocation counter counts *down*, so in the absence of a call to U its value is the negation of the number of bytes of memory allocated by the thread.7There are two things that you can do with this counter:0Use it as a simple profiling mechanism, with .!Use it as a resource limit. See .8Allocation accounting is accurate only to about 4Kbytes.KReturn the current value of the allocation counter for the current thread.Enables 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 v 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.,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.bCompared to using timeouts, allocation limits don't count time spent blocked or in foreign calls.;Disable allocation limit processing for the current thread. Creates a new thread to run the u; 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 Z instead.The new thread inherits the masked state of the parent (see \).OThe newly created thread has an exception handler that discards the exceptions , , and }D, and passes all other exceptions to the uncaught exception handler.Like , 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 U ... 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.Like L, but lets you specify on which capability the thread should run. Unlike a  thread, a thread created by ; will stay on the same capability for its entire lifetime (P threads can migrate between capabilities according to the scheduling policy). l is useful for overriding the scheduling policy when you know in advance how best to distribute the threads.The j argument specifies a capability number (see ). Typically capabilities correspond to physical processors, but the exact behaviour is implementation-dependent. The value passed to G is interpreted modulo the total number of capabilities as returned by .9GHC note: the number of capabilities is specified by the +RTS -N_ option when the program is started. Capabilities can be fixed to actual processor cores with +RTS -qa if the underlying operating system supports that, although in practice this is usually unnecessary (and may actually degrade performance in some cases - experimentation is recommended).Like <, but the child thread is pinned to the given CPU, as with .the value passed to the +RTS -N flag. This is the number of Haskell threads that can run truly simultaneously at any given time, and is typically set to the number of physical processor cores on the machine.&Strictly speaking it is better to use <, because the number of capabilities might vary at runtime.Returns the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. To change this value, use .Set the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. The number passed to F is interpreted modulo this value. The initial value is given by the +RTS -N runtime flag.KThis 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./Returns the number of CPUs that the machine has>Returns the number of sparks currently in the local spark pool raises the }* exception in the given thread (GHC only). )killThread tid = throwTo tid ThreadKilled? raises an arbitrary exception in the target thread (GHC only).FException delivery synchronizes between the source and target thread:  does not return until the exception has been raised in the target thread. The calling thread can thus be certain that the target thread has received the exception. Exception delivery is also atomic with respect to other exceptions. Atomicity is a useful property to have when dealing with race conditions: e.g. if there are two threads that can kill each other, it is guaranteed that only one of the threads will get to kill the other.Whatever work the target thread was doing when the exception was raised is not lost: the computation is suspended until required by another thread.jIf the target thread is currently making a foreign call, then the exception will not be raised (and hence m 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 g will cause the RTS to attempt to cause the call to return; see the GHC documentation for more details.!Important note: the behaviour of P differs from that described in the paper "Asynchronous exceptions in Haskell" ( =http://research.microsoft.com/~simonpj/Papers/asynch-exns.htm). In the paper, [ is non-blocking; but the library implementation adopts a more synchronous design in which  does not return until the exception is received by the target thread. The trade-off is discussed in Section 9 of the paper. Like any blocking operation, m is therefore interruptible (see Section 5.3 of the paper). Unlike other interruptible operations, however,  is always3 interruptible, even if it does not actually block.There is no guarantee that the exception will be delivered promptly, although the runtime will endeavour to ensure that arbitrary delays don't occur. In GHC, an exception can only be raised when a thread reaches a  safe point, where a safe point is where memory allocation occurs. Some loops do not perform any memory allocation inside the loop and therefore cannot be interrupted by a .If the target of : is the calling thread, then the behaviour is the same as \, 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 v is called with the current thread as the target, the exception will be thrown even if the thread is currently inside  or . Returns the " of the calling thread (GHC only).The  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. stores a string as identifier for this thread if you built a RTS with debugging support. This identifier will be used in the debugging output to make distinction of different threads easier (otherwise you only have the thread state object's address in the heap).COther applications like the graphical Concurrent Haskell Debugger ( +http://www.informatik.uni-kiel.de/~fhu/chd/) may choose to overload  for their purposes as well.0Internal function used by the RTS to run sparks.returns 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.make a weak pointer to a H. 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 BlockedIndefinitelyB exceptions because the reference could be used as the target of . at any time, which would unblock the thread. Holding a  Weak ThreadIdA, 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.XUnsafely performs IO in the STM monad. Beware: this is a highly dangerous thing to do.The STM implementation will often run transactions multiple times, so you need to be prepared for this if your IO has any side effects.The STM implementation will abort transactions that are known to be invalid and need to be restarted. This may happen in the middle of , so make sure you don't acquire any resources that need releasing (exception handlers are ignored when aborting the transaction). That includes doing any IO using Handles, for example. Getting this wrong will probably lead to random deadlocks.5The transaction may have seen an inconsistent view of memory when the IO runs. Invariants that you expect to be true throughout your program may not be true inside a transaction, due to the way transactions are implemented. Normally this wouldn't be visible to the programmer, but using  can expose it.+Perform a series of STM actions atomically.You cannot use  inside an  or . Any attempt to do so will result in a runtime error. (Reason: allowing this would effectively allow a transaction inside a transaction, depending on exactly when the thunk is evaluated.) However, see , which can be called inside 4, and which allows top-level TVars to be allocated.1Retry execution of the current memory transaction because it has seen values in TVars which mean that it should not continue (e.g. the TVars represent a shared buffer that is now empty). The implementation may block the thread until one of the TVars that it has read from has been udpated. (GHC only)Compose two alternative STM actions (GHC only). If the first action completes without retrying then it forms the result of the orElse. Otherwise, if the first action retries, then the second action is tried in its place. If both actions retry then the orElse as a whole retries. A variant of {" that can only be used within the  monad.Throwing an exception in STM6 aborts the transaction and propagates the exception. Although / has a type that is an instance of the type of {*, the two functions are subtly different: ;throw e `seq` x ===> throw e throwSTM e `seq` x ===> x+The first example will cause the exception e8 to be raised, whereas the second one won't. In fact, G 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.&Exception handling within STM actions.Low-level primitive on which always and alwaysSucceeds are built. checkInv differs form these in that (i) the invariant is not checked when checkInv is called, only at the end of this and subsequent transcations, (ii) the invariant failure is indicated by raising an exception.9alwaysSucceeds adds a new invariant that must be true when passed to alwaysSucceeds, at the end of the current transaction, and at the end of every subsequent transaction. If it fails at any of those points then the transaction violating it is aborted and the exception raised by the invariant is propagated.always is a variant of alwaysSucceeds in which the invariant is expressed as an STM Bool action that must return True. Returning False or raising an exception are both treated as invariant failures.*Create a new TVar holding a value suppliedIO version of *. This is useful for creating top-level s using =, because using  inside = isn't possible.AReturn the current value stored in a TVar. This is equivalent to # readTVarIO = atomically . readTVarrbut works much faster, because it doesn't perform a complete transaction, it just reads the current value of the .)Return the current value stored in a TVar$Write the supplied value into a TVar\ !"#$%&'()*+,-./01234??O !"#$%&'()*+,-./01234"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental"non-portable (extended exceptions) Trustworthy*+,<)Thrown when the program attempts to call  atomically , from the stm" package, inside another call to  atomically.Thrown 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.A 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.A 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 StringC gives information about the source location of the record update.,An uninitialised record field was used. The StringP gives information about the source location where the record was constructed.A 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 StringE gives information about the source location of the record selector.A pattern match failed. The String= gives information about the source location of the pattern.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-u!) 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 propogated further up. If you call it again, you might get a the opposite behaviour. This is ok, because  is an u computation. The function  is like ., but it takes an extra argument which is an exception predicateI, 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 "")oAny other exceptions which are not matched by the predicate are re-raised, and may be caught by an enclosing , , etc. A version of r with the arguments swapped around; useful in situations where the code for the handler is shorter. For example: D do handle (\NonTermination -> exitWith (ExitFailure 1)) $ ... A version of ) with the arguments swapped around (see ).oThis function maps one exception into another as proposed in the paper "A semantics for imprecise exceptions". 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 exs. If any other type of exception is raised than it will be propogated up to the next enclosing exception handler. 0 try a = catch (Right `liftM` a) (return . Left) A variant of P that takes an exception predicate to select which exceptions are caught (c.f. D). If the exception does not match the predicate, it is re-thrown.Like Z, but only performs the final action if there was an exception raised by the computation.tWhen you want to acquire a resource, do some work with it, and then release the resource, it is a good idea to use  , because  will install the necessary exception handler to release the resource in the event that an exception is raised during the computation. If an exception is raised, then = will re-raise the exception (after performing the release).#A common example is opening a file: Qbracket (openFile "filename" ReadMode) (hClose) (\fileHandle -> do { ... })The arguments to < are in this order so that we can partially apply it, e.g.: 8withFile name mode = bracket (openFile name mode) hCloseA specialised variant of + with just a computation to run afterward. A variant of D where the return value from the first computation is not required.Like e, but only performs the final action if there was an exception raised by the in-between computation.2 The computation to run+Handler to invoke if an exception is raisedPredicate to select exceptionsComputation to runHandler-computation to run first ("acquire resource"),computation to run last ("release resource")computation to run in-betweencomputation to run first?computation to run afterward (even if an exception was raised)-computation to run first ("acquire resource"),computation to run last ("release resource")computation to run in-between56789:;<=>?@ABY mnopqrstuvwxyz{}wxyz{|}~Yzvwxy}mnopqrswxyz{|}~tu{  + 56789:;<=>?@AB:"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (concurrency) Trustworthy<Take a value from an _, put a new value into the _g and return the value taken. This function is atomic only if there are no other producers for this _.D is an exception-safe wrapper for operating on the contents of an _T. This operation is exception-safe: it will replace the original contents of the _" if an exception is raised (see Control.ExceptionJ). However, it is only atomic if there are no other producers for this _.Like  , but the IOQ action in the second argument is executed with asynchronous exceptions masked. ;An exception-safe wrapper for modifying the contents of an _ . Like ,  - will replace the original contents of the _| if an exception is raised during the operation. This function is only atomic if there are no other producers for this _. A slight variation on  ' that allows a value to be returned (b+) in addition to the modified value of the _. Like   , but the IOQ action in the second argument is executed with asynchronous exceptions masked. Like   , but the IOQ action in the second argument is executed with asynchronous exceptions masked.Make a i pointer to an _8, using the second argument as a finalizer to run when _ is garbage-collected      _`abcdefgh     _`abdcefh    g      \"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental"non-portable (extended exceptions) Trustworthy;NYou need this when using .YSometimes you want to catch two different sorts of exception. You could do something like wf = expr `catch` \ (ex :: ArithException) -> handleArith ex `catch` \ (ex :: IOException) -> handleIO exHowever, there are a couple of problems with this approach. The first is that having two exception handlers is inefficient. However, the more serious issue is that the second exception handler will catch exceptions in the first, e.g. in the example above, if  handleArith throws an  IOException1 then the second exception handler will catch it.Instead, we provide a function , which would be used thus: f = expr `catches` [Handler (\ (ex :: ArithException) -> handleArith ex), Handler (\ (ex :: IOException) -> handleIO ex)]When 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.CDSmnopqrstuvwxyz{}wxyz{|}~Szvwxy}mnopqrswxyz{|}~tu{CD="(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableUnsafeA slightly faster version of _ that may not be safe to use with multiple threads. The unsafety arises when used like this: = unsafeFixIO $ \r -> do forkIO (print r) return (...).In this case, the child thread will receive a NonTermination0 exception instead of waiting for the value of r to be computed.] Trustworthy EFGH EFGH^#(c) The University of Glasgow, 2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable TrustworthyRIJKLM !"#N  !"#  !"#IJKLM !"#N_#(c) The University of Glasgow, 2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy<R%)+$%OP&'QRSTUV()WX*+YZ,-./[\] $%&'()*+,-./ $%'&(),.*+-/$%OP&'QRSTUV()WX*+YZ,-./[\]`#(c) The University of Glasgow, 2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy<R15701^_23`abcde45fg67hi89:;jkl 0123456789:; 0132458:679;01^_23`abcde45fg67hi89:;jkl Trustworthy<R((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy<See <=>?@<=>?@<=>?@((c) The University of Glasgow, 1992-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (requires POSIX) Trustworthy vmnopqrstuvwxyz{|}~vmnopqrstuvwxyz{|}~vmnopqrstuvwxyz{|}~((c) The University of Glasgow, 2008-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable TrustworthyRConstruct 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.H((c) The University of Glasgow, 2008-2009see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy8*The Unicode encoding of the current locale9uThe Unicode encoding of the current locale, but allowing arbitrary undecodable bytes to be round-tripped through it.This 'i 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:The Unicode encoding of the current locale, but where undecodable bytes are replaced with their closest visual match. Used for the CString marshalling functions in Foreign.C.StringAThe 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 Handle using the A" encoding will result in an error.BThe UTF-8 Unicode encodingCyThe UTF-8 Unicode encoding, with a byte-order-mark (BOM; the byte sequence 0xEF 0xBB 0xBF). This encoding behaves like B, except that on input, the BOM sequence is ignored at the beginning of the stream, and on output, the BOM sequence is prepended.pThe byte-order-mark is strictly unnecessary in UTF-8, but is sometimes used to identify the encoding of a file.DWThe UTF-16 Unicode encoding (a byte-order-mark should be used to indicate endianness).E*The UTF-16 Unicode encoding (litte-endian)F(The UTF-16 Unicode encoding (big-endian)GWThe UTF-32 Unicode encoding (a byte-order-mark should be used to indicate endianness).H*The UTF-32 Unicode encoding (litte-endian)I(The UTF-32 Unicode encoding (big-endian)JKLMNAn 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.O2Look up the named Unicode encoding. May fail withisDoesNotExistError if the encoding is unknownFThe set of known encodings is system-dependent, but includes at least: UTF-8UTF-16, UTF-16BE, UTF-16LEUTF-32, UTF-32BE, UTF-32LEjThere 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  //TRANSLITN 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.MIn theory, this mechanism allows arbitrary data to be roundtripped via a Q 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.gIf the underlying encoding is not itself roundtrippable, this mechanism can fail. Roundtrippable encodings are those which have an injective mapping into Unicode. Almost all encodings meet this criteria, but some do not. Notably, Shift-JIS (CP932) and Big5 contain several different encodings of the same Unicode codepoint.AOn Windows, you can access supported code pages with the prefix CP; for example, "CP1250".89:ABCDEFGHIJKLMNOPQ&#$%&'()*+,-123456789:ABCDEFGHIJKLMNOPQ&1234567'()*+,-#$%&APQBCDEFGHIM89:JKLNO89:ABCDEFGHIJKLMNOPQa TrustworthyRRRR((c) The University of Glasgow, 1994-2001see libraries/base/LICENSElibraries@haskell.orginternal non-portable TrustworthyINR Just like 3, but interleaves calls to 3 with calls to 4. in order to make as much progress as possiblesyncs 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.4flushes the Char buffer only. Works on all Handles.S makes a new nTlike S, except that a n is created with two independent buffers, one for reading and one for writing. Used for full-duplex streams, such as network sockets.;      !"S.the underlying IO device, which must support D, X and Xa string describing the n:, e.g. the file path for a file. Used in error messages.T#$%&U'()*+,-./0'   !"ST$%&U+,-/0;      !"ST#$%&U'()*+,-./0<"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable TrustworthyVThe construct V compV exposes IO errors which occur within a computation, and which are not fully handled.QNon-I/O exceptions are not caught by this variant; to catch all exceptions, use \ from Control.Exception.W 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.XAn error indicating that an u? operation failed because one of its arguments already exists.YAn error indicating that an u? operation failed because one of its arguments does not exist.ZAn error indicating that an u 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).[An error indicating that an u. operation failed because the device is full.\An error indicating that an u< operation failed because the end of file has been reached.]An error indicating that an u] operation failed because the operation was not possible. Any computation which returns an u result may fail with ]. In some cases, an implementation will not be able to distinguish between the possible error causes. In this case it should fail with ].^An error indicating that an us operation failed because the user does not have sufficient operating system privilege to perform that operation._3A programmer-defined error value constructed using ~.`RI/O error where the operation failed because one of its arguments already exists.aRI/O error where the operation failed because one of its arguments does not exist.byI/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.c@I/O error where the operation failed because the device is full.dOI/O error where the operation failed because the end of file has been reached.e.I/O error where the operation is not possible.fI/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.g%I/O error that is programmer-defined.hRI/O error where the operation failed because one of its arguments already exists.iRI/O error where the operation failed because one of its arguments does not exist.jyI/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.k@I/O error where the operation failed because the device is full.lOI/O error where the operation failed because the end of file has been reached.m.I/O error where the operation is not possible.nI/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.o%I/O error that is programmer-defined.z Catch any |> that occurs in the computation and throw a modified version.{IAdds a location description and maybe a file path and file handle to an |W. If any of the file handle or file path is not given the corresponding value in the | remains unaltered.|The |3 function establishes a handler that receives any |# raised in the action protected by |. An | is caught by the most recent handler established by one of the exception handling functions. These handlers are not selective: all |s are caught. Exception propagation must be explicitly provided in a handler by re-raising any unwanted exceptions. For example, in Kf = catchIOError g (\e -> if IO.isEOFError e then return [] else ioError e) the function f returns []% when an end-of-file exception (cf. \ ) occurs in gD; otherwise, the exception is propagated to the next outer handler.aWhen an exception propagates outside the main program, the Haskell system prints the associated | value and exits the program.QNon-I/O exceptions are not caught by this variant; to catch all exceptions, use \ from Control.Exception.'VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|+|~sVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|+|~W{XYZ[\]^_prqstuvwxys`abcdefghijklmno|Vz'VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|'(c) The University of Glasgow 1997-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe< 123456789:;< # $ 56 123456789:;<b Trustworthy}~}~~}}~None<=>?@AB=>?@AB=>?@AB TrustworthyCpCopy part of the source array into the destination array. The destination array is resized if not large enough.DpCopy part of the source array into the destination array. The destination array is resized if not large enough.EBComputes 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.FGHIJKLMNOPQRSTUVWXYZ[\]^_CD`EHLOPQRSTVWYZ[\]^_C`FGHIJKLMNOPQRSTUVWXYZ[\]^_CD`E TrustworthyaGReturn monotonic time in seconds, since some unspecified starting pointbaabaUnsafeNc<The structure used to tell the IO manager thread what to do.ddCreate the structure (usually a pipe) used for waking up the IO manager thread from another thread.e2Close the control structure used by the IO manager thread. N.B. If this Control is the Control whose wakeup file was registered with the RTS, then *BEFORE* the wakeup file is closed, we must call c_setIOManagerWakeupFd (-1), so that the RTS does not try to use the wakeup file after it has been closed.cfghijklmnopqrsdetuvwxycghklmnsdevwxcfghijklmnopqrsdetuvwxyUnsafe;NzEvent notification backend.{hPoll backend for new events. The provided callback is called once per file descriptor with new events.|[Register, modify, or unregister interest in the given events on the given file descriptor.}iRegister interest in new events on a given file descriptor, set to be deactivated after the first event.~0A type alias for timeouts, specified in seconds.A pair of an event and lifetimeVHere we encode the event in the bottom three bits and the lifetime in the fourth bit.&The lifetime of an event registration.3the registration will be active for only one event,the registration will trigger multiple times An I/O event.Data is available to be read./The file descriptor is ready to accept a write.*Another thread closed the file descriptor.The longer of two lifetimes.Returns ) if the modification succeeded. Returns L if this backend does not support event notifications on this type of file.Returns ) if the modification succeeded. Returns L if this backend does not support event notifications on this type of file. Throw an IOError( corresponding to the current value of Z if the result value of the u action is -1 and Z is not ". If the result value is -1 and Z returns 9 0 is returned. Otherwise the result value is returned.mappend ==  elSupremum&z{|}~z~z{|}~ TrustworthyCCreate a new epoll backend.KChange the set of events we are interested in for a given file descriptor.NSelect a set of file descriptors which are ready for I/O operations and call fD 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.RThe size parameter to epoll_create is a hint about the expected number of handles.uThe file descriptor returned from epoll_create() should be destroyed via a call to close() after polling is finished+statetimeout in milliseconds I/O callback  TrustworthyinsertWith 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.DRemove the given key from the table and return its associated value.  Trustworthy C TrustworthyC  Trustworthy35;NThe event manager state.Callback invoked on I/O events.&A file descriptor registration cookie.Create a new event manager. Create a new  with the given polling backend.8Asynchronously shuts down the event manager, if running.IAsynchronously tell the thread executing the event manager loop to exit.GStart handling events. This function loops until told to stop, using .Note%: This loop can only be run once per >, 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.VRegister interest in the given events, without waking the event manager thread. The fE return value indicates whether the event manager ought to be woken.registerFd mgr cb fd evs lt" registers interest in the events evs on the file descriptor fd for lifetime lt. cbQ is called for each event that occurs. Returns a cookie that can be handed to .Wake up the event manager.Drop a previous file descriptor registration, without waking the event manager thread. The return value indicates whether the event manager ought to be woken.-Drop a previous file descriptor registration.+Close a file descriptor in a race-safe way.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.3               TrustworthyA mapping from keys k to priorites p.E k p binds the key k with the priority p.O(1)# The number of elements in a queue.O(1) True if the queue is empty.O(log n)L The priority and value of a given key, or Nothing if the key is not bound.O(1) Build a queue with one element.O(log n) Insert a new key, priority and value in the queue. If the key is already present in the queue, the associated priority and value are replaced with the supplied priority and value.O(log n) 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(log n) Update a priority at a specific key with the result of the provided function. When the key is not a member of the queue, the original queue is returned. O(n*log n)! Build a queue from a list of keypriorityvalue tuples. If the list contains more than one priority and value for the same key, the last priority and value for the key is retained.O(n) Convert to a list of keypriority value tuples.O(n) Convert to an ascending list.O(n) Convert to a descending list.O(1)& The element with the lowest priority.O(log n)] Delete the element with the lowest priority. Returns an empty queue if the queue is empty.O(log n)c Retrieve the binding with the least priority, and the rest of the queue stripped of that binding.O(r*(log n - log r))H Return a list of elements ordered by key whose priorities are at most pt.Balance factor Take two pennants and returns a new pennant that is the union of the two with the precondition that the keys in the rst tree are strictly smaller than the keys in the second tree.! A version of  c that can be used if the shape of the tree has not changed or if the tree is known to be balanced.G"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM !NOPQRST-012345:"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM !NOPQRSTR  TrustworthyCUVWXYZ[\]^_`abcdefghijklmnobcUVWXYZ[\]^_`abcdefghijklmno  Trustworthy35;N The event manager state.pAn edit to apply to a q.q5A priority search queue, with timeouts as priorities.#Callback invoked on timeout events.A timeout registration cookie.rCreate a new event manager.s8Asynchronously shuts down the event manager, if running.tGStart handling events. This function loops until told to stop, using s.Note%: This loop can only be run once per >, as it closes all of its control resources when it finishes.uWake up the event manager.GRegister 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.Unregister an active timeout.FUpdate an active timeout to fire in the given number of microseconds.vwxyz{pq|}~rstu{rstuvwxyz{pq|}~rstu  Trustworthy KSuspends 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.Set the value of returned TVar to True after a given number of microseconds. The caveats associated with threadDelay also apply.YBlock the current thread until data is available to read from the given file descriptor.This will throw an IOError if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with , use .SBlock the current thread until the given file descriptor can accept data to write.This will throw an IOError 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 IOError 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 .4Allows 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 IOError 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 .]Retrieve the system event manager for the capability on which the calling thread is running.This function always returns E the current thread's event manager when using the threaded RTS and  otherwise.The ioManagerLock protects the H value: Only one thread at a time can start or shutdown event managers. Action that performs the close.File descriptor to close.  ((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy<bBlock the current thread until data is available to read on the given file descriptor (GHC only).This will throw an IOError 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 data can be written to the given file descriptor (GHC only).This will throw an IOError if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with , use .Returns 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.Returns 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.QClose a file descriptor in a concurrency-safe way (GHC only). If you are using  or  to perform blocking I/O, you mustS use this function to close file descriptors, or blocked threads may not be woken.9Any threads that are blocked on the file descriptor via  or 3 will be unblocked by having IO exceptions thrown.KSuspends 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.Set the value of returned TVar to True after a given number of microseconds. The caveats associated with threadDelay also apply. .Low-level action that performs the real close.File descriptor to close.   Y((c) The University of Glasgow, 1994-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions)UnsafeJJ((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy+,Open a file and make an 4 for it. Truncates the file to zero size when the < is >.Make a i from an existing file descriptor. Fails if the FD refers to a directory. If the FD refers to a file, y locks the file according to the Haskell 2010 single writer/multiple reader locking semantics (this is why we need the < argument too).9 file to openmode in which to open the file#open the file in non-blocking mode?is a socket (on Windows)is in non-blocking mode on Unix6((c) The University of Glasgow, 1992-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy<R  Computation  hdl t+ waits until input is available on handle hdl. It returns " as soon as input is available on hdl, or ! if no input is available within t milliseconds. Note that  waits until one or more full  characterse are available, which means that it needs to do decoding, and hence may fail with a decoding error.If t is less than zero, then  hWaitForInput waits indefinitely.This operation may fail with:\% if the end of file has been reached.ba 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 >= 0Y will block all other Haskell threads for the duration of the call. It behaves like a safe foreign call in this respect. Computation  hdl8 reads a character from the file or channel managed by hdl*, blocking until a character is available.This operation may fail with:\% if the end of file has been reached. Computation  hdl3 reads a line from the file or channel managed by hdl.This operation may fail with:\8 if the end of file is encountered when reading the first character of the line.If  encounters end-of-file at any other point while reading in a line, it is treated as a line terminator and the (partial) line is returned. Computation  hdlh returns the list of characters corresponding to the unread portion of the channel or file managed by hdl+, which is put into an intermediate state,  semi-closed. In this state, hdl1 is effectively closed, but items are read from hdl: on demand and accumulated in a special list returned by  hdl.tAny operation that fails because a handle is closed, also fails if a handle is semi-closed. The only exception is hClose'. A semi-closed handle becomes closed:if hClose is applied to it;<if an I/O error occurs when reading an item from the handle;8or once the entire contents of the handle has been read. Once a semi-closed handle becomes closed, the contents of the associated list becomes fixed. The contents of this final list is only partially specified: it will contain at least all the items of the stream that were evaluated prior to the handle becoming closed.OAny I/O errors encountered while a handle is semi-closed are simply discarded.This operation may fail with:\% if the end of file has been reached. Computation  hdl ch writes the character ch$ to the file or channel managed by hdl;. Characters may be buffered if buffering is enabled for hdl.This operation may fail with:[ if the device is full; or^4 if another system resource limit would be exceeded. Computation  hdl s writes the string s# to the file or channel managed by hdl.This operation may fail with:[ if the device is full; or^4 if another system resource limit would be exceeded. The same as , but adds a newline character.  hdl buf count writes count 8-bit bytes from the buffer buf to the handle hdl. It returns ()./ ignores any text encoding that applies to the n?, writing the bytes directly to the underlying file or device. ignores the prevailing  TextEncoding and c on the n, and writes bytes directly.This operation may fail with: if the handle is a pipe or socket, and the reading end is closed. (If this is a POSIX system, and the program has not asked to ignore SIGPIPE, then a SIGPIPE may be delivered instead, whose default action is to terminate the program).  hdl buf count reads data from the handle hdl into the buffer buf! until either EOF is reached or count 8-bit bytes have been read. It returns the number of bytes actually read. This may be zero if EOF was reached before any data was read (or if count is zero).I never raises an EOF exception, instead it returns a value smaller than count.CIf the handle is a pipe or socket, and the writing end is closed, # will behave as if EOF was reached. ignores the prevailing  TextEncoding and c on the n, and reads bytes directly.  hdl buf count reads data from the handle hdl into the buffer buf1. If there is any data available to read, then H returns it immediately; it only blocks if there is no data to be read.tIt returns the number of bytes actually read. This may be zero if EOF was reached before any data was read (or if count is zero).I never raises an EOF exception, instead it returns a value smaller than count.CIf the handle is a pipe or socket, and the writing end is closed, # will behave as if EOF was reached. ignores the prevailing  TextEncoding and c on the n, and reads bytes directly.  hdl buf count reads data from the handle hdl into the buffer buf" until either EOF is reached, or countU 8-bit bytes have been read, or there is no more data available to read immediately. is identical to , except that it will never block waiting for data to become available, instead it returns only whatever data is available. To wait for data to arrive before calling , use .CIf the handle is a pipe or socket, and the writing end is closed, # will behave as if EOF was reached. ignores the prevailing  TextEncoding and c on the n, and reads bytes directly.TNOTE: on Windows, this function does not work correctly; it behaves identically to .((K((c) The University of Glasgow, 1994-2009see libraries/base/LICENSElibraries@haskell.org provisional non-portable TrustworthyR 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: isFullError if the device is full;isPermissionError if a system resource limit would be exceeded. It is unspecified whether the characters in the buffer are discarded or retained under these circumstances. Computation  hdl makes handle hdl/ closed. Before the computation finishes, if hdl+ is writable its buffer is flushed as for . Performing  on a handle that has already been closed has no effect; doing so is not an error. All other operations on a closed handle will fail. If ; fails for any reason, any further operations (apart from &) on the handle will still fail as if hdl had been successfully closed. For a handle hdl% which attached to a physical file,  hdl. returns the size of that file in 8-bit bytes. hdl size) truncates the physical file with handle hdl to size bytes.For a readable handle hdl,  hdl returns ' if no further input can be taken from hdlr or for a physical file, if the current I/O position is equal to the length of the file. Otherwise, it returns .NOTE: v may block, because it has to attempt to read from the stream to determine whether there is any more data to be read. Computation  returns the next character from the handle without removing it from the input buffer, blocking until a character is available.This operation may fail with: isEOFError% if the end of file has been reached. Computation  hdl mode( sets the mode of buffering for handle hdl on subsequent reads and writes.#If the buffer mode is changed from m or l to k, thenif hdl+ is writable, the buffer is flushed as for ;if hdl: is not writable, the contents of the buffer is discarded.This operation may fail with:isPermissionError if the handle has already been used for reading or writing and the implementation does not allow the buffering mode to be changed. The action  hdl encoding+ changes the text encoding for the handle hdl to encoding. The default encoding when a n is created is localeEncoding6, namely the default encoding for the current locale. To create a n with no encoding at all, use openBinaryFile8. To stop further encoding or decoding on an existing n, use .B may need to flush buffered data in order to change the encoding.Return the current ' for the specified n, or  if the n is in binary mode.Note that the 'J remembers nothing about the state of the encoder/decoder in use on this n>. For example, if the encoding in use is UTF-16, then using  and d to save and restore the encoding may result in an extra byte-order-mark being written to the file. The action  hdl flushes all buffered data in hdl, including any buffered read data. Buffered read data is flushed by seeking the file position back to the point before the bufferred data was read, and hence only works if hdl is seekable (see ).This operation may fail with: isFullError if the device is full;isPermissionError if a system resource limit would be exceeded. It is unspecified whether the characters in the buffer are discarded or retained under these circumstances;isIllegalOperation if hdl1 has buffered read data, and is not seekable. Computation  hdl& returns the current I/O position of hdl! as a value of the abstract type . If a call to  hdl returns a position p, then computation  p sets the position of hdl5 to the position it held at the time of the call to .This operation may fail with:isPermissionError. if a system resource limit would be exceeded. Computation   hdl mode i sets the position of handle hdl depending on mode. The offset i" is given in terms of 8-bit bytes.If hdl is block- or line-buffered, then seeking to a position which is not in the current buffer will first cause any items in the output buffer to be written to the device, and then cause the input buffer to be discarded. Some handles may not be seekable (see H), 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:isIllegalOperationErrorQ if the Handle is not seekable, or does not support the requested seek mode.isPermissionError. if a system resource limit would be exceeded. Computation  hdl- returns the current position of the handle hdlm, as the number of bytes from the beginning of the file. The value returned may be subsequently passed to 2 to reposition the handle to the current position.This operation may fail with:isIllegalOperationError if the Handle is not seekable. Computation  hdl) returns the current buffering mode for hdl.;Set the echoing status of a handle connected to a terminal.;Get the echoing status of a handle connected to a terminal.&Is the handle connected to a terminal?Select binary mode () or text mode () on a open handle. (See also openBinaryFile.)$This has the same effect as calling  with N, together with  with r.Set the c on the specified n'. All buffered data is flushed first.Returns 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.wMakes the second handle a duplicate of the first handle. The second handle will be closed first, if it is not already.?This can be used to retarget the standard Handles, for example: >do h <- openFile "mystdout" WriteMode hDuplicateTo h stdout is in the uI monad, and gives more comprehensive output than the (pure) instance of V for n.)@;<=>cdefghijklmnopqrSTU@njklmSTU;<=>ghicdeforpq(V((c) The University of Glasgow, 1994-2008see libraries/base/LICENSElibraries@haskell.orginternal non-portable Trustworthy JA handle managing output to the Haskell program's standard output channel.JA handle managing input from the Haskell program's standard input channel.IA handle managing output to the Haskell program's standard error channel.The computation  is identical to  , except that it works only on . Computation   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 @.aIf the file does not exist and it is opened for output, it should be created as a new file. If mode is > and the file already exists, then it should be truncated to zero length. Some operating systems delete empty files, so there is no guarantee that the file will exist following an  with mode >h 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:isAlreadyInUseError4 if the file is already open and cannot be reopened;isDoesNotExistError if the file does not exist; orisPermissionError7 if the user does not have permission to open the file.YNote: if you will be working with files containing binary data, you'll want to be using .Like , but opens the file in ordinary blocking mode. This can be useful for opening a FIFO for reading: if we open in non-blocking mode then the open will fail if there are no writers, whereas a blocking open will block until a writer appears.Like , 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 .)&Old API kept to avoid breaking clientsmTurn 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.       ((c) The University of Glasgow, 2001-2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy<   is wrapped around  (or whatever main is called in the program). It catches otherwise uncaught exceptions, and also flushes stdout/stderr before exiting.   is wrapped around every foreign export and foreign import "wrapper"B to mop up any uncaught exceptions. Thus, the result of running L_ in a foreign-exported function is the same as in the main thread: it terminates the program.Like  (, 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, tryEmain = 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. The same as  3, but for non-IO computations. Used for wrapping foreign export and foreign import "wrapper"D when these are used to export Haskell functions with non-IO types.        "(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy The  function outputs a value of any printable type to the standard output device. Printable types are those that are instances of class V; 2 converts values to strings for output using the * operation and adds a newline.aFor 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]]):Write a character to the standard output device (same as  ).7Write a string to the standard output device (same as  ). The same as , but adds a newline character.:Read a character from the standard input device (same as  ).5Read a line from the standard input device (same as  ).The f operation returns all user input as a single string, which is read lazily as it is needed (same as  ).The # 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.The w function reads a file and returns the contents of the file as a string. The file is read lazily, on demand, as with .The computation  file str function writes the string str, to the file file.The computation  file str function appends the string str, to the file file. Note that  and U 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]])The  function combines  and .The  function is similar to ^. except that it signals parse failure to the u* monad instead of terminating the program.*The Unicode encoding of the current localeMThis is the initial locale encoding: if it has been subsequently changed by J) this value will not reflect that change. Computation  hdlI indicates whether at least one item is available for input from handle hdl.This operation may fail with:<% if the end of file has been reached. Computation  hdl t% writes the string representation of t given by the -, function to the file or channel managed by hdl and appends a newline.This operation may fail with:< if the device is full; or<4 if another system resource limit would be exceeded. name mode act opens a file using 5 and passes the resulting handle to the computation act+. The handle will be closed on exit from , whether by normal termination or by raising an exception. If closing the handle raises an exception, then this exception will be raised by & rather than any exception raised by act. name mode act opens a file using 5 and passes the resulting handle to the computation act+. The handle will be closed on exit from <, whether by normal termination or by raising an exception.The function creates a temporary file in ReadWrite mode. The created file isn't deleted automatically, so you need to delete it manually.XThe file is creates 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.Like ), but opens the file in binary mode. See  for more comments.Like ', but uses the default file permissionsLike ', but uses the default file permissions#!"#$%%Directory in which to create the file~File name template. If the template is "foo.ext" then the created file will be "fooXXX.ext" where XXX is some random number.&'()*+,ju';<=>cdefghijklmnopqr<=>?@ABCDEFGHINOjun<=>?@jklm;<=>'ABCDEFGHINOghiocdefrpq !"#$%&'()*+,a(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2002/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy/+The fixed point of a monadic computation. / f executes the action fD only once, with the eventual output fed back as the input. Hence f! should not be strict, for then / f would diverge.YHMonads having fixed points with a 'knot-tying' semantics. Instances of Y# should satisfy the following laws: purity/ (return . h) = return (; h)left shrinking (or  tightening)/+ (\x -> a >>= \y -> f x y) = a >>= \y -> / (\x -> f x y)sliding/ (  h . f) =   h (/ (f . h)), for strict h.nesting/ (\x -> / (\y -> f x y)) = / (\x -> f x x)7This class is used in the translation of the recursive do% notation supported by GHC and Hugs./Y-./012/Y;Y/;Y/-./012(c) Ross Paterson 20024BSD-style (see the LICENSE file in the distribution)libraries@haskell.org provisionalportable Trustworthy0Lift a function to an arrow.1oSend the first component of the input through the argument arrow, and copy the rest unchanged to the output.3RFanin: Split the input between the two argument arrows and merge their outputs.UThe default definition may be overridden with a more efficient version if desired.The 4 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. 4# should satisfy the following laws:  extension4 (0 f) = 0 (\ b ->  (; (\ (c,d) -> f (b,d))))left tightening4 (1 h >>> f) = h >>> 4 fright tightening4 (f >>> 1 h) = 4 f >>> hsliding4 (f >>> 0 (/ *** k)) = 4 (0 (/ *** k) >>> f) vanishing4 (4 f) = 4 (0 unassoc >>> f >>> 0 assoc) superposing (4 f) = 4 (0 assoc >>>  f >>> 0 unassoc)where 9assoc ((a,b),c) = (a,(b,c)) unassoc (a,(b,c)) = ((a,b),c)The  class is equivalent to M: any monad gives rise to a  arrow, and any instance of  defines a monad.lSome arrows allow application of arrow inputs to other inputs. Instances should satisfy the following laws: 1 (0 (\x -> 0 (\y -> (x,y)))) >>> 2 = / 1 (0 (g >>>)) >>> 2 =  g >>> 2 1 (0 (>>> h)) >>> 2 = 2 >>> h*Such arrows are equivalent to monads (see ).?Choice, for arrows that support it. This class underlies the if and case constructs in arrow notation.,Instances should satisfy the following laws:  (0 f) = 0 ( f)  (f >>> g) =  f >>>  g f >>> 0  = 0  >>>  f  f >>> 0 (/ +++ g) = 0 (/ +++ g) >>>  f  ( f) >>> 0 assocsum = 0 assocsum >>>  fwhere qassocsum (Left (Left x)) = Left x assocsum (Left (Right y)) = Right (Left y) assocsum (Right z) = Right (Right z)aThe other combinators have sensible default definitions, which may be overridden for efficiency.cFeed marked inputs through the argument arrow, passing the rest through unchanged to the output.A mirror image of .UThe default definition may be overridden with a more efficient version if desired.Split the input between the two argument arrows, retagging and merging their outputs. Note that this is in general not a functor.UThe default definition may be overridden with a more efficient version if desired.A monoid on arrows.'An associative operation with identity .Kleisli arrows of a monad.The basic arrow class.,Instances should satisfy the following laws: 0 id = / 0 (f >>> g) = 0 f >>> 0 g 1 (0 f) = 0 (1 f) 1 (f >>> g) = 1 f >>> 1 g 1 f >>> 0  = 0  >>> f 1 f >>> 0 (/ *** g) = 0 (/ *** g) >>> 1 f 1 (1 f) >>> 0 assoc = 0 assoc >>> 1 fwhere assoc ((a,b),c) = (a,(b,c))aThe other combinators have sensible default definitions, which may be overridden for efficiency.A mirror image of 1.UThe default definition may be overridden with a more efficient version if desired.ySplit the input between the two argument arrows and combine their output. Note that this is in general not a functor.UThe default definition may be overridden with a more efficient version if desired.KFanout: send the input to both argument arrows and combine their output.UThe default definition may be overridden with a more efficient version if desired.,The identity arrow, which plays the role of . in arrow notation.$Precomposition with a pure function.%Postcomposition with a pure function.<Precomposition with a pure function (right-to-left variant).=Postcomposition with a pure function (right-to-left variant).Any instance of $ can be made into an instance of  by defining  = .31Beware that for many monads (those for which the +* operation is strict) this instance will not3 satisfy the right-tightening law required by the  class..012343456789:;<=>?@AB 0123412 0121324423013456789:;<=>?@AB 3$Conor McBride and Ross Paterson 20054BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportable Trustworthy+,0CNLists, but with an [" functor based on zipping, so that f 8  xs1 E ... E  xsn =  (zipWithn f xs1 ... xsn)  One or none.     CDEFGHIJKLMNEF[8     [FE    8      CDEFGHIJKLMN$Conor McBride and Ross Paterson 20054BSD-style (see the LICENSE file in the distribution)libraries@haskell.org experimentalportable Trustworthy ]PFunctors representing data structures that can be traversed from left to right.A definition of ! must satisfy the following laws:  naturalityt .  f =  (t . f)) for every applicative transformation tidentity Identity = Identity composition (Compose . - g . f) = Compose . - ( g) .  fA definition of ! must satisfy the following laws:  naturalityt .  =  . - t) for every applicative transformation tidentity . - Identity = Identity composition . - Compose = Compose . -  .  where an applicative transformation is a function 1t :: (Applicative f, Applicative g) => f a -> g apreserving the [ operations, i.e. t (F x) = F x t (x E y) = t x E t yand the identity functor Identity and composition of functors Compose are defined as + newtype Identity a = Identity a instance Functor Identity where fmap f (Identity x) = Identity (f x) instance Applicative Indentity where pure x = Identity x Identity f <*> Identity x = Identity (f x) newtype Compose f g a = Compose (f (g a)) instance (Functor f, Functor g) => Functor (Compose f g) where fmap f (Compose x) = Compose (fmap (fmap f) x) instance (Applicative f, Applicative g) => Applicative (Compose f g) where pure x = Compose (pure (pure x)) Compose f <*> Compose x = Compose ((<*>) <$> f <*> x)1(The naturality law is implied by parametricity.)Instances are similar to O, e.g. given a data type 7data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)a suitable instance would be instance Traversable Tree where traverse f Empty = pure Empty traverse f (Leaf x) = Leaf <$> f x traverse f (Node l k r) = Node <$> traverse f l <*> f k <*> traverse f r:This is suitable even for abstract types, as the laws for E imply a form of associativity.6The superclass instances should satisfy the following:In the O instance, -N should be equivalent to traversal with the identity applicative functor ().In the \ instance, P should be equivalent to traversal with a constant applicative functor ().Map 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 .Evaluate each action in the structure from left to right, and and collect the results. For a version that ignores the results see .Map 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 .Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see . is I with its arguments flipped. For a version that ignores the results see . is I with its arguments flipped. For a version that ignores the results see .The ( function behaves like a combination of - and foldl; 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.The ( function behaves like a combination of - and foldr; 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.)This function may be used as a value for - in a O instance, provided that  is defined. (Using  with a ] instance defined only by $ will result in infinite recursion.))This function may be used as a value for  in a \ instance.!]OPQRSTUVWXYZ[\]^_`abcd ] ]]OPQRSTUVWXYZ[\]^_`abcd "(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy:: b is F () if b is , and  if b is . This generalizes the list-based filter function.,Left-to-right Kleisli composition of monads.-Right-to-left Kleisli composition of monads. (), with the arguments flipped act repeats the action infinitely.The  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-transforming monad.The  function generalizes % to arbitrary monads. is the extension of  which ignores the final result.The  function is analogous to foldl?, except that its result is encapsulated in a monad. Note that P works from left-to-right over the list arguments. This could be an issue where (,)/ and the `folded function' are not commutative. " foldM f a1 [x1, x2, ..., xm]== P do a2 <- f a1 x1 a3 <- f a2 x2 ... f am xmKIf right-to-left evaluation is required, the input list should be reversed.Note:  is the same as H Like , but discards the result.!! n act performs the action n times, gathering the results."Like !, but discards the result.#The reverse of .$Strict version of  .%Direct  equivalent of filter filter = $(mfilter:: (a -> Bool) -> [a] -> [a] applicable to any , for example mfilter odd (Just 1) == Just 1 mfilter odd (Just 2) == Nothing: !"#$%**+,-.:DMO:KLNP !"#$%*O-M+,.*KLN:DP% !":#$: !"#$%$d Trustworthy&0Global garbage collection and memory statistics.(Total number of bytes allocated)'Number of garbage collections performed*(Maximum number of live bytes seen so far+WNumber of byte usage samples taken | Sum of all byte usage samples, can be used with +c to calculate averages with arbitrary weighting (if you are sampling this record multiple times).- Number of bytes copied during GC.Current number of live bytes/$Current number of bytes lost to slop0;Maximum number of bytes lost to slop at any one time so far1Maximum number of megabytes allocated | CPU time spent running mutator threads. This does not include any profiling overhead or initialization.3VWall clock time spent running mutator threads. This does not include initialization.4CPU time spent running GC5 Wall clock time spent running GC6*Total CPU time elapsed since program start7Total wall clock time elapsed since start | Number of bytes copied during GC, minus space held by mutable lists held by the capabilities. Can be used with 97 to determine how well parallel GC utilized all cores.9[Sum of number of bytes copied each GC by the most active GC thread each GC. The ratio of 8 divided by 9i approaches 1 for a maximally sequential run and approaches the number of threads (set by the RTS flag -N) for a maximally parallel run.:1Returns whether GC stats have been enabled (with +RTS -T, for example).;Retrieves garbage collection and memory statistics as of the last garbage collection. If you would like your statistics as recent as possible, first run a |!.&'()*+,-./0123456789:e;&'()*+,-./0123456789:;&'()*+,-./0123456789;:&'()*+,-./0123456789:e;e"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy<The <& function takes two lists and returns 8 if the first list is a subsequence of the second list.< x y is equivalent to B x ( y).Examples5isSubsequenceOf "GHC" "The Glorious Haskell Compiler"True)isSubsequenceOf ['a','d'..'z'] ['a'..'z']True!isSubsequenceOf [1..10] [10,9..0]False<t   !#$%&'(]^_`bcdefghijklmnopqrsvwz{|}~9;<=>@ABCDEFQRSTUVWXYZ9=QRSTUVEFCD   ]^def<BY!Zs#_`bc$%&'(giklnvhjmowWXz{|}~<"(c) The University of Glasgow 2007/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportable Trustworthy35ZnClass for string-like datastructures; used by the overloaded string extension (-XOverloadedStrings in GHC).5Zf5ZZ5Z5ff"(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental6non-portable (local universal quantification in ReadP)Safe+,=A =- represents the version of a software entity.An instance of IS is provided, which implements exact equality modulo reordering of the tags in the @ field.An instance of Q= is also provided, which gives lexicographic ordering on the ? fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.). This is expected to be sufficient for many uses, but note that you may need to use a more specific ordering for your versioning scheme. For example, some versioning schemes may include pre-releases which have tags "pre1", "pre2", and so on, and these would need to be taken into account when determining ordering. In some cases, date ordering may be more appropriate, so the application would have to look for date tags in the @G field and compare those. The bottom line is, don't always assume that  and other Q* operations are the right thing for every =.sSimilarly, concrete representations of versions may differ. One possible concrete representation is provided (see A and B`), but depending on the application a different concrete representation may be more appropriate.?The 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 j\, so version 3.2.1 becomes [3,2,1]. Lexicographic ordering (i.e. the default instance of Q for [Int]*) gives the natural ordering of branches.@A 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.A2Provides one possible concrete representation for =. For a version with ?  = [1,2,3] and @ = ["tag1","tag2"], the output will be 1.2.3-tag1-tag2.B0A parser for versions in the format produced by A.CConstruct tag-less = =>?@ABCgh=>?@ABC=>?@ABC=>?@ABCgh-(c) The University of Glasgow, CWI 2001--2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental-non-portable (local universal quantification) Trustworthy!"'*+,35>IKLN7NThe N+ class comprehends a fundamental primitive U 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 U 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 [, ^, `<, etc are all provided with default definitions in terms of U_, leaving open the opportunity to provide datatype-specific definitions. (The inclusion of the gmap! combinators as members of class Nk allows the programmer or the compiler to derive specialised, and maybe more efficient code per datatype. Note: U 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 N.)$Conceptually, the definition of the gmap' combinators in terms of the primitive U$ requires the identification of the UQ function arguments. Technically, we also need to identify the type constructor cC 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 Uw because the result type of a query does not involve the (polymorphic) type of the term argument. In the definition of \; we simply use the plain constant type constructor because UJ 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 r2, then the result type withing generic folding is r -> rQ. 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 N9 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.DFixity of constructorsGiUnique index for datatype constructors, counting from 1 in the order they are given in the program text.H%Public representation of constructorsM"Public representation of datatypesSRepresentation of constructors. Note that equality on constructors with different types may not work -- i.e. the constructors for  and  may compare equal.TeRepresentation of datatypes. A package of constructor representations with names of type and module.i1The type constructor used in definition of gmapMpj1The type constructor used in definition of gmapQrk/Type constructor for adding counters to querieslAThe constant type constructor needed for the definition of gmapQlm@The identity type constructor needed for the definition of gmapTU=Left-associative fold operation for constructor applications. The type of UP is a headache, but operationally it is a simple generalisation of a list fold.The default definition for U is  B, which is suitable for abstract datatypes with no substructures.V"Unfolding constructor applicationsWObtaining 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).X&The outer type constructor of the typeY/Mediate types and unary type constructors. In N instances of the form T a, Y should be defined as .The default definition is  8, which is appropriate for non-unary type constructors.Z0Mediate types and binary type constructors. In N instances of the form T a b, Z should be defined as .The default definition is  9, which is appropriate for non-binary type constructors.[>A generic transformation that maps over the immediate subterms9The default definition instantiates the type constructor c in the type of U^ to an identity datatype constructor, using the isomorphism pair as injection and projection.\7A generic query with a left-associative binary operator]8A generic query with a right-associative binary operator^A 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._>A generic query that processes one child by index (zero-based)`FA generic monadic transformation that maps over the immediate subterms9The default definition instantiates the type constructor c in the type of UM to the monad datatype constructor, defining injection and projection using . and +.a>Transformation of at least one immediate subterm does not failb4Transformation of one immediate subterm with successcBuild a term skeletond4Build a term and use a generic function for subtermseMonadic variation on df.Gets the type constructor including the moduleg*Gets the public presentation of a datatypeh"Gets the datatype of a constructori,Gets the public presentation of constructorsj+Look up a constructor by its representationk Constructs an algebraic datatypelConstructs a constructorm.Gets the constructors of an algebraic datatypenGets 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.o Gets the fixity of a constructorp!Gets the string for a constructorq!Lookup a constructor via a stringrTest for an algebraic types<Gets the constructor for an index (algebraic datatypes only)t:Gets the index of a constructor (algebraic datatypes only)u;Gets the maximum constructor index of an algebraic datatypevConstructs the j typewConstructs the i typexConstructs the g typen Helper for v, w{Makes a constructor for g.|<Constructs a non-representation for a non-representable type}!Test for a non-representable type~AGets the unqualified type constructor: drop *.*.*... before nameAGets the module of a type constructor: take *.*.*... before nameoEquality of constructorsNDEFGHIJKLMNOPQRSpqrstuTvwxiyzj{|k}l~mUdefines how nonempty constructor applications are folded. It takes the folded tail of the constructor application and its head, i.e., an immediate subterm, and combines them in some way.mdefines how the empty constructor application is folded, like the neutral / start element for list folding.structure to be folded.(result, with a type defined in terms of a=, but variability is achieved by means of type constructor c0 for the construction of the actual result type.VWXYZ[\]^_`abcdefghijklmnopqrstuvwxnyz{|}~ojBNXDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~=NUVWXYZ[\]^_`abTkvwx|fMNOPQRgjrmsu}SGDEFlyz{hHIJKLinotpq~cdeNUVWXYZ[\]^_`abDEFGHIJKLMNOPQRSpqrstuTvwxiyzj{|k}l~mcdefghijklmnopqrstuvwxnyz{|}~o"#(c) The University of Glasgow, 2007see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC extensions) Trustworthy;INhF(C) 2014 Herbert Valerio Riedel, (C) 2011 Edward Kmettsee libraries/base/LICENSElibraries@haskell.orginternalnon-portable (GHC Extensions)Unsafe+,<C<Type representing arbitrary-precision non-negative integers.+Operations whose result would be negative { (o :: m).in [0, maxBound::Word]in ]maxBound::Word, +inf[ Invariant:  is used iff value doesn't fit in  constructor.6Test whether all internal invariants are satisfied by  valueNThis operation is mostly useful for test-suites and/or code which constructs o values directly. Compute greatest common divisor. compute least common multiplier. Addition multiplication subtraction. May { o. subtraction. Returns s for non-positive results. Helper for  and Convert  to  . Throws o if passed a .Convert j to  . Throws o when passed a negative j. Construct  from v value.Try downcasting  to v value. Returns  if value doesn't fit in v." b e m" computes base b raised to exponent e modulo m. gF(C) 2014 Herbert Valerio Riedel, (C) 2011 Edward Kmettsee libraries/base/LICENSElibraries@haskell.org provisionalportable TrustworthyiNoneshow timestamp in stderr outputtrace scheduler eventstrace GC events&trace spark events by a sampled method"trace spark events 100% accurately-trace user events (emitted from Haskell code)time between samplesticks between samples (derived)JFlags to control debugging output & extra checking in various subsystems.siwGgbStpl the object linkeramz# stack squeezing & lazy blackholingc coverager:address to ask the OS for memory for the linker, 0 ==> offTrue  = "compact all the time"Duse "mostly mark-sweep" instead of copying for the oldest generation address to ask the OS for memorynat defined in  rts/Types.h is defined as a  StgWord64 in  stg/Types.hGRead a NUL terminated string. Return Nothing in case of a NULL pointer.      !"kk&       !"8 TrustworthydComputes the hash of a given file. This function loops over the handle, running in constant memory. #$%& #$%&c Trustworthy Trustworthy&(345;<>IKLNcThis class gives the integer associated with a type-level natural. There are instances of the class for every concrete literal: 0, 1, 2, etc.dThis class gives the string associated with a type-level symbol. There are instances of the class for every concrete literal: "hello", etc.6(Kind) This is the kind of type-level natural numbers..(Kind) This is the kind of type-level symbols. Addition of type-level naturals.&Multiplication of type-level naturals.&Exponentiation of type-level naturals.rComparison of type-level naturals, as a function. NOTE: The functionality for this function should be subsumed by k, so this might go away in the future. Please let us know, if you encounter discrepancies between the two. #Subtraction of type-level naturals.0Comparison of type-level symbols, as a function.1Comparison of type-level naturals, as a function.3Comparison of type-level naturals, as a constraint.0This type represents unknown type-level symbols.8This type represents unknown type-level natural numbers.6Convert an integer into an unknown type-level natural.3Convert a string into an unknown type-level symbol.aWe either get evidence that this function was instantiated with the same type-level numbers, or .aWe either get evidence that this function was instantiated with the same type-level symbols, or .0cd'()*+,-./0123456789:;<=>cdcd(c2d1'()*+,-./03456789:;<=>Safe(79>e The syntax ?x :: a is desugared into IP "x" aeeee#,(c) 2001-2011 The Data Parallel Haskell teamsee libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy<@?@A?@A?@A"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable Trustworthy !"#$%&'()*+,-.6789EFGHIJKLMOPQRSTUV[\]fghijopruv}  !#$%&'()*+,-./08DEFGHIJKLMNOPQRSTUV[\]^_`  89;=>@ABCDEFKNQRSTUVY[^|~f}pgI'Q(HDEFG#$%&GHIjoihrvP!) S9LQRSTUV8KOP"JUJKLMNT[\_`]^67O-8[FEM+,.*KN\89;=>@ABCDEF]#STUVQR  Y!$%&'(,V)*+-./0R[ ^ u|~jSafe%A single location in the source code. B               B    &"(c) The University of Glasgow 2011see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions) Trustworthy<  CallStackWs are an alternate method of obtaining the call stack at a given point in the program.#When an implicit-parameter of type  CallStackO occurs in a program, GHC will solve it with the current location. If another  CallStack implicit-parameter is in-scope (e.g. as a function argument), the new location will be appended to the one in-scope, creating an explicit call-stack. For example, emyerror :: (?loc :: CallStack) => String -> a myerror msg = error (msg ++ "n" ++ showCallStack ?loc) oghci> myerror "die" *** Exception: die ?loc, called at MyError.hs:7:51 in main:MyError myerror, called at  interactive:2:1 in interactive:Ghci1 CallStackDs do not interact with the RTS and do not require compilation with -prof. On the other hand, as they are built up explicitly using implicit-parameters, they will generally not contain as much information as the simulated call-stacks maintained by the RTS.The  CallStack3 type is abstract, but it can be converted into a [(String, SrcLoc)] via  . 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.]returns a '[String]' representing the current call stack. This can be useful for debugging.The implementation uses the call-stack simulation maintined by the profiler, so it only works if the program was compiled with -prof7 and contains suitable SCC annotations (e.g. by using  -fprof-autoI). Otherwise, the list returned is likely to be empty or uninformative.*Get the stack trace attached to an object.Like the function F, but appends a stack trace to the error message if one is available.C    C k"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableUnsafe< The s function outputs the trace message from the IO monad. This sequences the output with respect to other IO actions.The t function outputs the trace message given as its first argument, before returning the second argument as its result.'For example, this returns the value of f x but first outputs the message. -trace ("calling f with x = " ++ show x) (f x)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. Like 2 but returns the message instead of a third value.!Like  , but uses *$ on the argument to convert it to a .This makes it convenient for printing the values of interesting variables or expressions inside a function. For example here we print the value of the variables x and z: Af x y = traceShow (x, z) $ result where z = ... ..."Like !6 but returns the shown value instead of a third value.#Like r but returning unit in an arbitrary monad. Allows for convenient use in do-notation. Note that the application of # is not an action in the monad, as  is in the u monad. T... = do x <- ... traceM $ "x: " ++ show x y <- ... traceM $ "y: " ++ show y$Like # , but uses *$ on the argument to convert it to a . D... = do x <- ... traceMShow $ x y <- ... traceMShow $ x + y%like <, but additionally prints a call stack if one is available.eIn the current GHC implementation, the call stack is only availble if the program was compiled with -prof ; otherwise % behaves exactly like ,. Entries in the call stack correspond to SCC+ annotations, so it is a good idea to use  -fprof-auto or -fprof-auto-calls& to add SCC annotations automatically.&The & function behaves like ~ with the difference that the message is emitted to the eventlog, if eventlog profiling is available and enabled at runtime.:It is suitable for use in pure code. In an IO context use ' instead.Note that when using GHC's SMP runtime, it is possible (but rare) to get duplicate events emitted if two CPUs simultaneously evaluate the same thunk that uses &.'The 'f function emits a message to the eventlog, if eventlog profiling is available and enabled at runtime. Compared to &, '7 sequences the event with respect to other IO actions.(The (j function emits a marker to the eventlog, if eventlog profiling is available and enabled at runtime. The Stringx is the name of the marker. The name is just used in the profiling tools to help you keep clear which marker is which.FThis function is suitable for use in pure code. In an IO context use ) instead.Note that when using GHC's SMP runtime, it is possible (but rare) to get duplicate events emitted if two CPUs simultaneously evaluate the same thunk that uses (.)The )e function emits a marker to the eventlog, if eventlog profiling is available and enabled at runtime. Compared to (, )7 sequences the event with respect to other IO actions.D !"#$%&'()  !"#$%&'()  !"%#$&'()D !"#$%&'()"(c) The University of Glasgow 2002see libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)Unsafe +,357<>L The  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 elements<The <d class and its methods are intended to be used in conjunction with the OverloadedLists extension.=The =# function constructs the structure l from the given list of Item l>The >\ function takes the input list's length as a hint. Its behaviour should be equivalent to =5. The hint can be used to construct the structure l more efficiently compared to =U. If the given hint does not equal to the input list's length the behaviour of > is not specified.?The ? function extracts a list of Item l from the structure l.. It should satisfy fromList . toList = id.*The *= type function returns the type of items of the structure l.//^ ensures that all the elements of the list are identical and then returns that unique element0The 0m function sorts a list of elements using the user supplied function to project something out of each elementE<=>?*+,-./0F1EG ! % & ' )5<=>? *Z + , - .g /h 0i 1 2j 3 4 5 6 7 8s 9 : ; < = > ? @ A B Cv D E F G{| H I J K L M~ N P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  *+,-./013jvihg{|.Z50/1+,-~<*=>? <*=>?+,-./0F1EGs(c) Nils Schweinsberg 2011, (c) George Giorgidze 2011 (c) University Tuebingen 2011/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafe22! type class. Minimal definition: ; or 3"Instances should satisfy the laws: Naturality : =liftM (f *** g) (mzip ma mb) = mzip (liftM f ma) (liftM g mb)Information Preservation: LliftM (const ()) ma = liftM (const ()) mb ==> munzip (mzip ma mb) = (ma, mb);2345;2342;3452;345%(C) 2014 I/O Tweagsee libraries/base/LICENSEcvs-ghc@haskell.orginternalnon-portable (GHC Extensions)None+;<N A reference to a value of type a.6:Miscelaneous information available for debugging purposes.7>Package key of the package where the static pointer is defined86Name of the module where the static pointer is defined9VAn internal name that is distinct for every static pointer defined in a given module.:>Source location of the definition of the static pointer as a (Line, Column) pair.; A key for  StaticPtrs' that can be serialized and used with >.<Dereferences a static pointer.=The ;' that can be used to look up the given .> Looks up a  by its ;.If the  is not found returns Nothing._This function is unsafe because the program behavior is undefined if the type of the returned ! does not match the expected one.?6 of the given .@A list of all known keys.H6789:;IJK<=>?@ 6789:;<=>?@ <;=>6789:?@ H6789:;IJK<=>?@l"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (concurrency) Trustworthy*+, AA< is an abstract type representing an unbounded FIFO channel.B$Build and returns a new instance of A.CWrite a value to a A.DRead the next value from the A.E Duplicate a A: the duplicate channel begins empty, but data written to either channel from then on will be available from both. Hence this creates a kind of broadcast channel, where data written by anyone is seen by everyone else.C(Note that a duplicated channel is not equal to its original. So: fmap (c /=) $ dupChan c returns True for all c.)FIPut a data item back onto a channel, where it will be the next item read.GReturns  if the supplied A is empty.H>Return a lazy list representing the contents of the supplied A , much like .I#Write an entire list of items to a A. LMNAOBCDEFGHI ABCDEFGHI ABCDEFGHI LMNAOBCDEFGHIm"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (concurrency)Safe+,JJ is a quantity semaphore in which the resource is aqcuired and released in units of one. It provides guaranteed FIFO ordering for satisfying blocked L calls. The pattern $ bracket_ waitQSem signalQSem (...)/is safe; it never loses a unit of the resource.K Build a new JM with a supplied initial quantity. The initial quantity must be at least 0.L#Wait for a unit to become availableMSignal that a unit of the J is availableJPKLMQJKLMJKLMJPKLMQn"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (concurrency)Safe+,NN is a quantity semaphore in which the resource is aqcuired and released in units of one. It provides guaranteed FIFO ordering for satisfying blocked P calls. The pattern . bracket_ (waitQSemN n) (signalQSemN n) (...),is safe; it never loses any of the resource.O Build a new NM with a supplied initial quantity. The initial quantity must be at least 0.P3Wait for the specified quantity to become availableQ7Signal that a given quantity is now available from the N.NROPQSNOPQNOPQNROPQSZ"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (concurrency) Trustworthy<N R% if bound threads are supported. If rtsSupportsBoundThreads is , U will always return  and both T and V will fail.Sfork a thread and call the supplied function when the thread is about to terminate, with an exception or a returned value. The function is called with asynchronous exceptions masked. aforkFinally action and_then = mask $ \restore -> forkIO $ try (restore action) >>= and_thenWThis function is useful for informing the parent when a child terminates, for example.TLike *, this sparks off a new thread to run the u; computation passed as the first argument, and returns the  of the newly created thread. However, T creates a bound thread, which is necessary if you need to call foreign (non-Haskell) libraries that make use of thread-local state, such as OpenGL (see Control.Concurrent#boundthreads).Using T instead of  makes no difference at all to the scheduling behaviour of the Haskell runtime system. It is a common misconception that you need to use T instead of  to avoid blocking all the Haskell threads when making a foreign call; this isn't the case. To allow foreign calls to be made without blocking all the Haskell threads (with GHC), it is only necessary to use the  -threadedU option when linking your program, and to make sure the foreign import is not marked unsafe.UReturns  if the calling thread is boundl, that is, if it is safe to use foreign libraries that rely on thread-local state from the calling thread.VRun the uH computation passed as the first argument. If the calling thread is not bound), a bound thread is created temporarily. runInBoundThread doesn't finish until the u computation finishes.UYou can wrap a series of foreign function calls that rely on thread-local state with runInBoundThreadH so that you can use them without knowing whether the current thread is bound.WRun the uD computation passed as the first argument. If the calling thread is bound1, an unbound thread is created temporarily using . runInBoundThread doesn't finish until the u computation finishes.Use this function only in the rare case that you have actually observed a performance loss due to the use of bound threads. A program that doesn't need its main thread to be bound and makes heavy@ use of concurrency (e.g. a web server), might want to wrap its main action in runInUnboundThread.Note that exceptions which are thrown to the current thread are thrown in turn to the thread that is executing the given computation. This ensures there's always a way of killing the forked thread.XbBlock 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 X, use .Y\Block 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 Y, use .ZReturns 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.[Returns 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.TURSVWTUVWXXYZ[<_`abcdefgh     ABCDEFGHIJKLMNOPQRSTUVWXYZ[SXYZ[RTUVWTURSVWTUVWXXYZ[$"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafe*+,-.MOO-M+,.*%"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental:non-portable (requires universal quantification for runST)Unsafes3456!"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental:non-portable (requires universal quantification for runST) Trustworthys356365s&"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental:non-portable (requires universal quantification for runST) Trustworthys356365s'"(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)Safes356+"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental:non-portable (requires universal quantification for runST)Unsafe44("(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)Unsafe<IN\9The lazy state-transformer monad. A computation of type \ s a* transforms an internal state indexed by s, and returns a value of type a. The s parameter is either5an unstantiated type variable (inside invocations of ]), ors (inside invocations of a).CIt serves to keep the internal states of different invocations of ]2 separate from each other and from invocations of a.The + and ,6 operations are not strict in the state. For example, ]5 (writeSTRef _|_ v >>= readSTRef _|_ >> return 2) = 2]CReturn the value computed by a state transformer computation. The forall- ensures that the internal state used by the \9 computation is inaccessible to the rest of the program.^oAllow the result of a state transformer computation to be used (lazily) inside the computation. Note that if f is strict, ^ f = _|_._Convert a strict \A computation into a lazy one. The strict state thread passed to _S is not performed until the result of the lazy state thread it returns is demanded.`Convert a lazy \ computation into a strict one.a=A monad transformer embedding lazy state transformers in the u monad. The s: parameter indicates that the internal state used by the \. computation is a special one supplied by the u= monad, and thus distinct from those used by invocations of ].YZ\[]^_`abc\]^_ s\]^_`abc YZ\[]^_`abc\]^_o"(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) Trustworthys\]^_`a\]^_`sa)"(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) Trustworthys\]^_`a\]^_`sap"(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)Unsafebcbcq(C) 2008-2014 Edward Kmett, BSD-style (see the file LICENSE)libraries@haskell.org provisionalportableSafedFormally, the class d represents a bifunctor from Hask -> Hask.WIntuitively it is a bifunctor where both the first and second arguments are covariant.You can define a d by either defining e or by defining both f and g.If you supply e, you should ensure that: e   "a If you supply f and g , ensure: f  "a  g  "a  +If you supply both, you should also ensure: e f g "a f f  g gThese ensure by parametricity: e (f  g) (h  i) "a e f h  e g i f (f  g) "a f f  f g g (f  g) "a g f  g g e)Map over both arguments at the same time. e f g "a f f  g gf(Map covariantly over the first argument. f f "a e f g)Map covariantly over the second argument. g "a e  defg`abcdefgdefgdefg defg`abcdefgr"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy*+, h&Complex numbers are an algebraic type.For a complex number z,  z# is a number with the magnitude of z8, but oriented in the positive real direction, whereas  z has the phase of z, but unit magnitude.iKforms a complex number from its real and imaginary rectangular components.j+Extracts the real part of a complex number.k0Extracts the imaginary part of a complex number.l"The conjugate of a complex number.mCForm a complex number from polar components of magnitude and phase.nn t# is a complex value with magnitude 1 and phase t (modulo 2*).o The function o takes a complex number and returns a (magnitude, phase) pair in canonical form: the magnitude is nonnegative, and the phase in the range (-, ]2; if the magnitude is zero, then so is the phase.p.The nonnegative magnitude of a complex number.q,The phase of a complex number, in the range (-, ]2. If the magnitude is zero, then so is the phase.hijklmnopqhijk hijklmnopq hijkmnopql hijklmnopqhijkis#(c) Ashley Yakeley 2005, 2006, 2009/BSD-style (see the file libraries/base/LICENSE)$Ashley Yakeley <ashley@semantic.org> experimentalportable Trustworthy+,N r$resolution of 10^-12 = .000000000001t resolution of 10^-9 = .000000001vresolution of 10^-6 = .000001xresolution of 10^-3 = .001z>resolution of 10^-2 = .01, useful for many monetary currencies|resolution of 10^-1 = .1~/resolution of 1, this works the same as Integer,The type parameter should be an instance of .generalisation of S to any instance of Realgeneralisation of V to any instance of Realgeneralisation of T to any instance of Real/First arg is whether to chop off trailing zeros-rstuvwxyz{|}~lmnopqrstuvwxyz{|}~rstuvwxyz{|}~~}|{zyxwvutsr+rstuvwxyz{|}~lmnopqrstuvwxyz{|}~t`(c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology 2001 BSD-style (see the file LICENSE)ross@soi.city.ac.uk experimentalportable Trustworthy+,-./00Identity functor and monad. (a non-strict monad)Internal (non-exported)  helper for B See Note [Function coercion] in  Data.Foldable for more details.CThis instance would be equivalent to the derived instances of the  newtype if the  field were removedCThis instance would be equivalent to the derived instances of the  newtype if the  field were removed  "(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportable TrustworthyWabcdWabcd "(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.orgstableportableSafe), applied to two real fractional numbers x and epsilon/, returns the simplest rational number within epsilon of x. A rational number y is said to be simpler than another y' if (X y) <=  (X y'), andY y <= Y y'.QAny real interval contains a unique simplest rational; in particular, note that 0/1! is the simplest rational of all.qrWXYqrWXY0"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental$non-portable (uses Control.Monad.ST) TrustworthyMutate the contents of an .Be warned that I does not apply the function strictly. This means if the program calls  many times, but seldomly uses the value, thunks will pile up in memory resulting in a space leak. This is a common mistake made when using an STRef as a counter. For example, the following will leak memory and likely produce a stack overflow: iprint $ runST $ do ref <- newSTRef 0 replicateM_ 1000000 $ modifySTRef ref (+1) readSTRef refTo avoid this problem, use  instead.Strict version of u"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental)non-portable (uses Control.Monad.ST.Lazy)Safe*"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisional+non-portable (uses Control.Monad.ST.Strict)Safev"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental non-portable Trustworthy+,<,An abstract unique object. Objects of type < may be compared for equality and ordering and hashed into j.Creates a new object of type I. The value returned will not compare equal to any other value of type  returned by previous calls to -. There is no limit on the number of times  may be called. Hashes a  into an j. Two Ks may hash to the same value, although in practice this is unlikely. The j! returned makes a good hash key.w(C) 2008-2014 Edward Kmett/BSD-style (see the file libraries/base/LICENSE)Edward Kmett <ekmett@gmail.com> provisionalportableSafe*+,0YUninhabited data typeSince b values logically don't exist, this witnesses the logical reasoning tool of "ex falso quodlibet".If  is uninhabited then any O! that holds only values of type  is holding no values. Reading a - value is always a parse error, considering % as a data type with no constructors.  x"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy R Computation  returns the number of picoseconds CPU time used by the current program. The precision of this result is implementation-dependent.The  constant is the smallest measurable difference in CPU time that the implementation can record, and is given as an integral number of picoseconds.y(c) Sven Panne 2002-2005/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafe sDescribes whether an option takes an argument or not, and if so how the argument is injected into a value of type a.no argument expectedoption requires argumentoptional argumentEach  describes a single option.The arguments to  are:list of short option characters*list of long option strings (without "--")argument descriptorexplanation of option for user-What to do with options following non-options+no option processing after first non-option*freely intersperse options and non-optionswrap non-options into optionsReturn a string describing the usage of a command, derived from the header (first argument) and the options described by the second argument.pProcess the command-line, and return the list of values that matched (and those that didn't). The arguments are:The order requirements (see )The option descriptions (see ):The actual command line arguments (presumably got from z+).j returns a triple consisting of the option arguments, a list of non-options, and a list of error messages.This is almost the same as , but returns a quadruple consisting of the option arguments, a list of non-options, a list of unrecognized options, and a list of error messages.   ,"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafe Reads the FilePath1 pointed to by the symbolic link and returns it.See readlink(2)8Returns the absolute pathname of the current executable.aNote that for scripts and interactive sessions, this is the path to the interpreter (e.g. ghci.)z"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafe  Computation Z returns a list of the program's command line arguments (not including the program name). Computation 3 returns the name of the program as it was invoked.!However, this is hard-to-impossible to implement on some non-Unix OSes, so instead, for maximum portability, we just return the leafname of the program as invoked. Even then there are some differences between platforms: on Windows, for example, a program invoked as foo is probably really FOO.EXE, and that is what  will return. Computation  var0 returns the value of the environment variable var(. For the inverse, POSIX users can use -..This computation may fail with:</0 if the environment variable does not exist.-Return the value of the environment variable var, or Nothing if there is no such value.'For POSIX users, this is equivalent to -0.setEnv name value, sets the specified environment variable to value.2On Windows setting an environment variable to the  empty string removes that environment variable from the environment. For the sake of compatibility we adopt that behavior. In particular setEnv name "" has the same effect as  name iIf you don't care about Windows support and want to set an environment variable to the empty string use System.Posix.Env.setEnv from the unix package instead.Throws \1 if name1 is the empty string or contains an equals sign. unSet nameY removes the specified environment variable from the environment of the current process.Throws \1 if name1 is the empty string or contains an equals sign. args act - while executing action act, have  return args. name act - while executing action act, have  return name.0 retrieves the entire environment as a list of  (key,value) pairs.,If an environment entry does not contain an '=' character, the key is the whole entry and the value is the empty string.  L"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportable Trustworthy Computation  code throws t code3. Normally this terminates the program, returning code to the program's caller.%On program termination, the standard ns  and / are flushed automatically; any other buffered nOs need to be flushed manually, otherwise the buffered data will be discarded.FA program that fails in any other way is treated as if it had called :. A program that terminates successfully without calling , explicitly is treated as it it had called  u.As an t is not an |, % bypasses the error handling in the u% monad and cannot be intercepted by catch from the Prelude. However it is a  SomeException,, and can be caught using the functions of Control.Exception4. This means that cleanup computations added with \ (from Control.Exception ) are also executed properly on .Note: in GHC, q should be called from the main program thread in order to exit the process. When called from another thread,  will throw an  ExitExceptionI as normal, but the exception will not cause the process itself to exit.The computation  is equivalent to  (v exitfail) , where exitfail is implementation-dependent.The computation  is equivalent to  u*, It terminates the program successfully.Write given error message to  and terminate with .tuvtuv{"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalportableSafeThe version of > with which the program was compiled or is being interpreted.5The operating system on which the program is running.9The machine architecture on which the program is running.XThe Haskell implementation with which the program was compiled or is being interpreted.|"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafe/Triggers an immediate minor garbage collection.)Triggers an immediate garbage collection.)Triggers an immediate garbage collection.}"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental non-portable Trustworthy*+,<CAn 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  mkStableName may return a different  after an object is evaluated.-Stable Names are similar to Stable Pointers (Foreign.StablePtr&), but differ in the following ways: There is no freeStableName operation, unlike Foreign.StablePtr[s. 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.Makes a X for an arbitrary object. The object passed as the first argument is not evaluated by . Convert a  to an j. The j. returned is not necessarily unique; several s may map to the same jI (in practice however, the chances of this are small, so the result of  makes a good hash key). Equality on > that does not require that the types of the arguments match.;"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental non-portable TrustworthyA specialised version of j3, where the key and the value are the same object: 2mkWeakPtr key finalizer = mkWeak key key finalizerA specialised version of  , where the i object returned is simply thrown away (however the finalizer will be remembered by the garbage collector, and will still be run when the key becomes unreachable).Note: adding a finalizer to a C using + won't work; use the specialised version C2$ instead. For discussion see the i type. .A specialised version of jD where the value is actually a pair of the key and value passed to : =mkWeakPair key val finalizer = mkWeak key (key,val) finalizer:The advantage of this is that the key can be retrieved by k in addition to the value.ijklijkl~"(c) The University of Glasgow 2007/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimental non-portableSafe*+,Wrap an u$ computation to time out and return Nothing( in case no result is available within n microseconds (1/10^6F seconds). In case a result is available before the timeout expires, Just a is returned. A negative timeout interval means "wait indefinitely". When specifying long timeouts, be careful not to exceed maxBound :: Int.?The design of this combinator was guided by the objective that  timeout n f$ should behave exactly the same as f as long as f$ doesn't time out. This means that f has the same < it would have without the timeout wrapper. Any exceptions fP might throw cancel the timeout and propagate further up. It also possible for f7 to receive exceptions thrown to it by another thread.BA tricky implementation detail is the question of how to abort an IO computation. This combinator relies on asynchronous exceptions internally. The technique works very well for computations executing inside of the Haskell runtime system, but it doesn't work at all for non-Haskell code. Foreign function calls, for example, cannot be timed out with this combinator simply because an arbitrary C function cannot receive asynchronous exceptions. When timeout is used to wrap an FFI call that blocks, no timeout event can be delivered until the FFI call returns, which pretty much negates the purpose of the combinator. In practice, however, this limitation is less severe than it may sound. Standard I/O functions like 3, 4, Network.Socket.accept, or 5j appear to be blocking, but they really don't because the runtime system uses scheduling mechanisms like  select(2)u to perform asynchronous I/O, so it is possible to interrupt standard socket I/O or file I/O using this combinator.+(c) Lennart Augustsson and Bart Massey 20135BSD-style (see the file LICENSE in this distribution)Bart Massey <bart@cs.pdx.edu> provisionalportableSafe!"%OType of a function that will parse modifier characters from the format string.AThis is the type of a field formatter reified over its argument.The "format parser" walks over argument-type-specific modifier characters to find the primary format character. This is the type of its result.Any modifiers found.Primary format character.Rest of the format string.$Description of field formatting for  . See UNIX 5(3) for a description of how field formatting works.Total width of the field. Secondary field width specifier.)Kind of filling or padding to be done.8Whether to insist on a plus sign for positive numbers.`Indicates an "alternate format". See printf(3) for the details, which vary by argument spec.6Characters that appeared immediately to the left of 1 in the format and were accepted by the type's . Normally the empty string.The format character  was invoked with.  should fail unless this character matches the type. It is normal to handle many different format characters for a single type.PHow to handle the sign of a numeric field. These are mutually exclusive, with  taking precedence.PWhether to left-adjust or zero-pad a field. These are mutually exclusive, with  taking precedence.SThis class, with only the one instance, is used as a workaround for the fact that A, as a concrete type, is not allowable as a typeclass instance. ) is exported for backward-compatibility. Typeclass of -formattable values. The m method takes a value and a field format descriptor and either fails due to a bad descriptor or produces a , as the result. The default C expects no modifiers: this is the normal case. Minimal instance: .The 1 class provides the variable argument magic for E. Its implementation is intentionally not visible from this module.The 1 class provides the variable argument magic for . Its implementation is intentionally not visible from this module. If you attempt to pass an argument of a type which is not an instance of this class to  or =, then the compiler will report it as a missing instance of .fFormat a variable number of arguments with the C-style formatting string. The return value is either  or (u a) (which should be (u '()')., but Haskell's type system makes this hard).7The format string consists of ordinary characters and conversion specifications7, which specify how to format one of the arguments to D in the output string. A format specification is introduced by the %N character; this character can be self-escaped into the format string using %%1. A format specification ends with a /format character/ that provides the primary information about how to format the value. The rest of the conversion specification is optional. In order, one may have flag characters, a width specifier, a precision specifier, and type-specific modifier characters. Unlike C  printf(3), the formatting of this W is driven by the argument type; formatting is type specific. The types formatted by  "out of the box" are:L types, including gT types6 is also extensible to support other types: see below.6A conversion specification begins with the character %2, followed by zero or more of the following flags:  - left adjust (default is right adjust) + always use a sign (+ or -) for signed conversions space leading space for positive numbers in signed conversions 0 pad with zeros rather than spaces # use an \"alternate form\": see belowWhen both flags are given, - overrides 0 and +3 overrides space. A negative width specifier in a *E conversion is treated as positive but implies the left adjust flag.@The "alternate form" for unsigned radix conversions is as in C  printf(3):  %o prefix with a leading 0 if needed %x prefix with a leading 0x if nonzero %X prefix with a leading 0X if nonzero %b prefix with a leading 0b if nonzero %[eEfFgG] ensure that the number contains a decimal point3Any flags are followed optionally by a field width: D num field width * as num, but taken from argument listhThe field width is a minimum, not a maximum: it will be expanded as needed to avoid mutilating a value.6Any field width is followed optionally by a precision: W .num precision . same as .0 .* as num, but taken from argument list_Negative precision is taken as 0. The meaning of the precision depends on the conversion type.  Integral minimum number of digits to show RealFloat number of digits after the decimal point String maximum number of charactersThe precision for Integral types is accomplished by zero-padding. If both precision and zero-pad are given for an Integral field, the zero-pad is ignored.Any precision is followed optionally for Integral types by a width modifier; the only use of this modifier being to set the implicit size of the operand for conversion of a negative operand to unsigned: N hh Int8 h Int16 l Int32 ll Int64 L Int64/The specification ends with a format character:  c character Integral d decimal Integral o octal Integral x hexadecimal Integral X hexadecimal Integral b binary Integral u unsigned decimal Integral f floating point RealFloat F floating point RealFloat g general format float RealFloat G general format float RealFloat e exponent format float RealFloat E exponent format float RealFloat s string String v default format any typeThe "%v" specifier is provided for all built-in types, and should be provided for user-defined type formatters as well. It picks a "best" representation for the given type. For the built-in types the "%v" specifier is converted as follows: u c Char u other unsigned Integral d other signed Integral g RealFloat s StringMismatch between the argument types and the format string, as well as any other syntactic or semantic errors in the format string, will cause an exception to be thrown at runtime.Note that the formatting for T4 types is currently a bit different from that of C  printf(3), conforming instead to ,  and  (and their alternate versions  and ). This is hard to fix: the fixed versions would format in a backward-incompatible way. In any case the Haskell behavior is generally more sensible than the C behavior. A brief summary of some key differences:Haskell @ never uses the default "6-digit" precision used by C printf.Haskell ` treats the "precision" specifier as indicating the number of digits after the decimal point.Haskell ~ prints the exponent of e-format numbers without a gratuitous plus sign, and with the minimum possible number of digits.Haskell : will place a zero after a decimal point when possible.Examples q > printf "%d\n" (23::Int) 23 > printf "%s %s\n" "Hello" "World" Hello World > printf "%.2f\n" pi 3.14 Similar to +, except that output is via the specified n$. The return type is restricted to (u a).RSubstitute a 'v' format character with the given default format character in the H. A convenience for user-implemented types, which should support "%v".Formatter for g values.Formatter for  values.Formatter for j values.Formatter for o values.Formatter for T values. Raises an 6 with a printf-specific prefix on the message string.Calls 8 to indicate an unknown format letter for a given type.Calls 1 to indicate that the format string ended early.Calls D to indicate that there is a missing argument in the argument list.Calls J to indicate that there is a type error or similar in the given argument.U++?6"(c) The University of Glasgow 2001/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org provisionalportableSafe789:;<=>?@ABCDEFGHIJKLMN=OPQR=OSTUVW=>XYZ[\]^_=`a=`bcdefghijklmnopqrs tuvwxyz{|}~=`=`=======>==$=>Z=%&=======$$===%'=`=`=`=`=`=`=`=`=`=`=(     ******* *!*"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ \] ^ _ `a,b,,,c-defghijklmnopqrstuvwxyz{|}~///////////////////////////////1111111111111111111111111111111111122222222222222222333333333333333333333      !"#$%& ' ' (4a4)4*4+4,4-4.4/4041424354555656575-5.586966 6:6;6<6=6>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~77777...............'8899999$$$$$$ ) ) ) ) ) ) ))))))))))))))))))))))*y()E34,- !"FHABCDFi#$%&'()*+,-./0123456789:;;<=>?@A1BCDEFGHIJKLMNOPQRST>U>V>W>X>Y>Z?[@\@]@^@_@`@a@bAAAcAdAeAfAgAhAiBjBjBkBkBlBlBmBmBnBoBpBqBqBrBrBsBsBtBtBuBuBvBvBwBwBxBxByByBzBzB{B{B|B|B}B}B~B~BBBBBBBBBBBBBB2EE2#######FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGGHHHIIIIIIIIIIIIIIIIIIIIIIIIII&IIIJJJJJJJJJJJ     MMMM M!MM"M#M$M%MNNN&N'N(N)N*N+N,N-N.OOO/O0O1O2O3O4O5O6O7O8O9O:O;O<O=O>O?O@OAOBPCPDPEPFPGPHPIQJQKQLQMQCQDQEQFQGQHQIQNQOQPQQQRQSQTQUQVQWQXQYQZQ[Q\Q]Q^Q_R`RaRbRcRdR]SeSfSgShSiSjSkSlSmSnSoSpSqSrSsTtTtTuTvTwTxTyTzT{T|T}T~TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU U U U U U U U U U KVWWWWWWWWWXXXX[[[[[[[ [!["[#[$[%[&['[([)[*[*[[+[[,[[[-[.[/[0[1[2[3[4[[[5[6[7[8[9[:[;[<[=[>[?[@[A[B[C[D[E[F[G[H[I[J[K[L[M[N[O[P[QRRSSTTUUVVWWXXYZ[\]^_`abc:d:K:e:L:f:g:h:i:j\k\k\l\m=n]o]p]q]r]s^t^u^v^w^x^y^z^{^|^}^~____________````````````HtHHHHHHHHHHHHHHH|Hza<<<</<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<bb                 543KKKKKKKKKKKKKKKKKKKKKKKKKKK K K K V VVVVVVVV !"#$%&'()**+,-./01233456789:;<=>??@ABCDEFGGH|}IJ K L M N O P Q R S T U V W XdYdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmenfofofpfqfrfsftuvwxyz{|}~hhhhhhhhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii1iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii i i i i iiiiiiiii888 !"#$j%j&j'j(j)j*j+j,j-&.&/&0&1&2&3&4&5&6&7&8&9&:&;&<&=k>k?k@kAkBkCkDkEkFkGkHkIkJKLMNOPQGRSTU%%V%W%X%Y%Z%[%\%]%^%_l`lalblcldlelflglhmimjmkmlnmnnnonpZqZrZZsZtZuZZZZ(W(Z(Y(v(w((X(Hqxqyqkq6rzr{r|r}r~rrrrrssssssssssssssssssssssttt 00uuuuvvvwwwxxyyyyyyyyyyyyy,z+zz0zzzzzzLLLL{{{{|||!}}}};;;~(                           ! " # $ %=> &= ' (= ' )= ' *=> +=> ,=> -=O .=> /=> 0=> 1=> 2=> 3=> 4=> 5=> 6=> 7=> 8=> 9=> :=> ;=> <=> ==> >=> ?=>=> @=> A=> B=> C=> D=> E=> F=> G=> H=> I=> J=> K=> L=> M=> N=> O=>=> P=> Q=> R= S=> T=> U=> V=> W=> X=> Y=> Z=> [=> \=> ]=> ^=> _=> `=> a=> b=> c=> d=> e=> f=> g=> h=> i=> j=> k=> l=> m=> n=> o=> p=> q=> r=> s==> t=> u=> v=> w=> x=> y=> z=> {=> |=> }=> ~=> => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => !=> "=> #=> $=> %=> &=> '=> (=> )=> *=> +=> ,=> -=> .=> /=> 0=> 1=> 2=> 3=> 4=> 5=> 6=> 7=> 8=> 9=> :=> ;=> <=> ==> >=> ?=> @=> A=> B=> C=> D=> E=> F=> G=> H=> I=> J=> K=> L=> M=> N=> O=> P=> Q=> R=> S=> T=> U=> V=> W=> X=> Y=> Z=> [=> \=> ]=> ^=> _=> `=> a=> b=> c=> d=> e=> f=> g=> h=> i=> j=> k=> l=> m=> n=> o=> p=> q=> r=> s=> t=> u=> v=> w=> x=> y=> z=> {=> |=> }=> ~=> => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => !=> "=> #=> $=> %=> &=> '=> (=> )=> *=> +=> ,=> -=> .=> /=> 0=> 1=> 2=> 3=> 4=> 5=> 6=> 7=> 8=> 9=> :=> ;=> <=> ==> >=> ?=> @=> A=> B=> C=> D=> E=> F=> G=> H=> I=> J=> K=> L=> M=> N=> O=> P=> Q=> R=> S=> T=> U=> V=> W=> X=> Y=> Z=> [=> \=> ]=> ^=> _=> `=> a=> b=> c=> d=> e=> f=> g=> h=> i=> j=> k=> l=> m=> n=> o=> p=> q=> r=> s=> t=> u=> v=> w=> x=> y=> z=> {=> |=> }=> ~=> => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => !=> "=> #=> $=> %=> &=> '=> (=> )=> *=> +=> ,=> -=> .=> /=> 0=> 1=> 2=> 3=> 4=> 5=> 6=> 7=> 8=> 9=> :=> ;=> <=> ==> >=> ?=> @=> A=> B=> C=> D=> E=> F=> G=> H=> I=> J=> K=> L=> M=> N=> O=> P=> Q=> R=> S=> T=> U=> V=> W=> X=> Y=> Z=> [=> \=> ]=> ^=> _=> `=> a=> b=> c=> d=> e=> f=> g=> h=> i=> j=> k=> l=> m=> n=> o=> p=> q=> r=> s=> t=> u=> v=> w=> x=> y=> z=> {=> |=> }=> ~=> => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => !=> "=> #=> $=> %=> &=> '=> (=> )=> *=> +=> ,=> -=> .=> /=> 0=> 1=> 2=> 3=> 4=> 5=> 6=> 7=> 8=> 9=> :=> ;=> <=> ==> >=> ?=> @=> A=> B=> C=> D=> E=> F=> G=> H=> I=> J=> K=> L=> M=> N=> O=> P=> Q=> R=> S=> T=> U=> V=> W=> X=> Y=> Z=> [=> \=> ]=> ^=> _=> `=> a=> b=> c=> d=> e=> f=> g=> h=> i=> j=> k=> l=> m=> n=> o=> p=> q=> r=> s=> t=> u=> v=> w=> x=> y=> z=> {=> |=> }=> ~=> => => => => => => => => => => => => => => => => => => => => =` =` =` =` =` =` =` =` =` =` = ' = ' = = S                                               *      W !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~////////1111111111111111112222223t333333333333333333333333333      !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ 4444444444444444444444444444444444444444444 4 4 4 5 5 555555 !"#$7%7&7'7(7)7*7+7,7-7.7/.012'3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~$$$$$)))))))))i0^_QX@@\@@AAAAAAAAAAAAAAAAAAAAABnBoBpBBBBBBBBBBBBBBBBBBBBBBBB B B B B BBBBBBBBBBBBBBBBBBB B!B"B#$%&'()*$+,-./0123456789:;<###=#>#?#@FAFBGCIDEFGHIJKLMNOOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyzA{|}~MMMMMNNNAPMPLPPPPPPPPQQQQQQQSeTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUWWWWWXXXXXXXXXXXXXXXXXXXX[[[[[[[[[[[[[[[[[[[[[[[[[[[[[     \\]]]]M^^^^^^ _!_"_#_$_%_&___'_(_)_*__+_,`-`.````/`0`1`2`3`4`5```6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~HHHHHa&A3)     njFY !"#$%&'()*+,-./0123456+78/9:;<=>?@ABCqDEF3CGHHIJJKLMMNOOPQRSTUVq4WXYZ[\]^_`abcdefgqhihjklmmnoppGqrstVuvwxy z { | n  } ~                                   V    ( G  ~ q  w y                                   - .                                      V  3 4  C e     c d     { n ~               z                                  88      | !"#$%&'()*+,-./0123456789:;<K=K>K?K@KAKBKCKDKEKFVGVHVIVJVKLMNOPQRSTUVWXYZ[\]^_`abcdefg  hijklmnopqrstuvwxyz{|}~dff    ";" ""hhhhhhhhhhhhhhhh h!h"h#h$h%h&h'h(ii)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiiLiMiNiO8P8Q8R8STTUUVVWWXYZ[\]^_`abcdefg#h#i#ij%&kjklm%%n%o%plqlqll`mimrnmnrZsZtZuZvZw((x(W(h(((qyqzq{q|q}q~qqrrrrssssssssssssssssssssssstttttttttvvwwwwwwxxxxxyyyyyyyyyyyyyyyyyyy,,zzzzzzzzzzz.zzzzz{}}~/~/~~6baseControl.Exception.BaseGHC.Exts GHC.OldListPreludeForeign.StablePtr System.IO Data.Tuple Data.Bool Data.Function Data.CoerceData.EqData.Ord Control.Monad Data.FunctorControl.Monad.Fix Control.Arrow Data.StringControl.Monad.ZipData.Typeable.InternalControl.Applicative Data.Data Text.Read Text.ShowData.Ix Data.FoldableData.Traversable GHC.Generics GHC.TypeLitsGHC.IP Data.CharData.Int Data.RatioControl.Monad.ST Data.Word Foreign.Ptr Data.Either GHC.StaticPtr GHC.StackGHC.Fingerprint.Type Unsafe.Coerce Data.Monoid Data.MaybeControl.Monad.ST.UnsafeData.Type.BoolGHC.CharNumeric Data.Bits Data.STRefText.ParserCombinators.ReadPText.ParserCombinators.ReadPrec Text.Read.LexData.Type.EqualityData.Type.CoercionControl.Category Data.ProxyGHC.Fingerprint Data.TypeableControl.Concurrent.MVarSystem.Mem.WeakSystem.IO.ErrorSystem.IO.Unsafe Data.IORefForeign.Marshal.Unsafe Data.DynamicForeign.StorableForeign.C.TypesForeign.ForeignPtrForeign.ForeignPtr.UnsafeForeign.Concurrent GHC.IO.BufferGHC.IO.Encoding.TypesGHC.IO.Encoding GHC.IO.DeviceGHC.IO.BufferedIO GHC.IO.Handle System.ExitForeign.Marshal.AllocForeign.Marshal.UtilsForeign.Marshal.Array GHC.ForeignForeign.C.StringForeign.Marshal.ErrorForeign.Marshal.PoolForeign.C.ErrorSystem.Posix.TypesGHC.IO.Handle.FDGHC.IO.Encoding.FailureGHC.IO.Encoding.UTF8GHC.ConcControl.Concurrent GHC.Conc.SyncControl.ExceptionGHC.Conc.SignalGHC.IO.Encoding.Latin1GHC.IO.Encoding.UTF16GHC.IO.Encoding.UTF32GHC.Environment GHC.Profiling GHC.Event GHC.Stats Data.List Data.VersionNumeric.Natural GHC.Natural GHC.RTS.Flags GHC.SrcLoc Debug.TraceControl.Concurrent.ChanControl.Concurrent.QSemControl.Concurrent.QSemNControl.Monad.ST.LazyControl.Monad.ST.Lazy.UnsafeData.Bifunctor Data.Complex Data.FixedData.Functor.IdentityData.STRef.Lazy Data.Unique Data.VoidSystem.CPUTimeSystem.Console.GetOptSystem.Environment System.Info System.MemSystem.Mem.StableNameSystem.Timeout Text.PrintfGHC.ErrGHC.BasezipWithMaybeIOEitherfromEnumCharGHC.NumGHC.GHCiGHC.List genericLength maximumBy minimumBygenericReplicate genericTake genericDropgenericSplitAt genericIndexGHC.ShowRead readsPrecGHC.STstToIOsortBytoEnumGHC.EnumGHC.RealGHC.Arr GHC.UnicodeisLetter GHC.STRefGHC.ConsoleHandler GHC.ConstantsGHC.Float.RealFracMethodsGHC.Float.ConversionUtils GHC.FloatGHC.ReadShow showsPrecGHC.WordisAlpha Data.OldListGHC.PtrStorableInt8Int16Int32Int64Word8Word16Word32Word64 StablePtrfreeHaskellFunPtr GHC.StablePtrnullPtrGHC.Int GHC.Storablefoldrfoldlfoldr1foldl1traverseformapMforM sequenceAsequenceGHC.MVarGHC.Weak GHC.ExceptionGHC.IO hGetContentsthrowTobracketforkIOWithUnmaskforkIOforkIOUnmasked GHC.IORefMVar GHC.IOArrayGHC.ForeignPtrmallocwithForeignPtrForeign.ForeignPtr.Imp mallocArray mallocArray0Foreign.ForeignPtr.SafeHandle mkFileHandlemkHandleFromFDSystem.DirectorygetDirectoryContentsGHC.IO.Handle.TypeshFlush hLookAheadGHC.IO.Exception killThreadsetAllocationCounterenableAllocationLimit ForeignPtrnewsizeOffree finalizerFreeallocawithForeign.MarshalForeign Foreign.SafeForeign.Marshal.Safe Foreign.CforkOSmaskthrowIOunsafePerformIOfixIOGHC.IO.Encoding.CodePage GHC.IO.IOModeopenFileSystem.Posix.InternalsGHC.IO.Encoding.IconvGHC.IO.Handle.InternalstrycatchGHC.Pack GHC.Event.ArrGHC.Event.ArrayGHC.Event.ClockGHC.Event.ControlGHC.Event.InternalGHC.Event.EPollGHC.Event.IntTableGHC.Event.KQueueGHC.Event.UniqueGHC.Event.Manager GHC.Event.PSQGHC.Event.PollGHC.Event.TimerManagerGHC.Event.Thread GHC.Conc.IO GHC.IO.FDGHC.IO.Handle.TextGHC.TopHandlerMainmainexitWith isEOFError isFullErrorisPermissionErrorliftMfoldMap traverse_ sequenceA_mapM_ sequence_for_forM_<$> performGC GHC.DesugarGHC.PArrControl.Monad.InstancesControl.Monad.ST.ImpControl.Monad.ST.SafeControl.Monad.ST.StrictControl.Monad.ST.Lazy.ImpControl.Monad.ST.Lazy.SafeData.STRef.StrictgetArgs!System.Environment.ExecutablePathSystem.Posix.EnvputEnvisDoesNotExistErrorgetEnv IOExceptionaddForeignPtrFinalizerhGetBufhPutBuf hWaitForInputText.Show.Functions absentErroraugment++builderror recSelErrorghc-primGHC.PrimseqirrefutPatErrornoMethodBindingErrornonExhaustiveGuardsError runtimeErrorpatError recConErrorconcatfilterzip newStablePtrprintfstsnd otherwiseassert GHC.Magiclazy breakpointbreakpointCondinlinemap groupWith$ undefinedcoerce fromInteger- fromRationalenumFrom enumFromThen enumFromToenumFromThenTo GHC.Classes==>=negatefail>>=>>fmapreturnmfixarrfirstapp|||loop fromString fromIntegral realToFrac toInteger toRationalguardmzipIsListfromList fromListNtoListmkTyConmkPolyTyConAppmkAppTytypeLitTypeRepjoin<*>pureBoundedEnumEqFloating FractionalIntegralMonadDataFunctorNumOrdReal RealFloatRealFracIxTypeableMonadFixIsString ApplicativeFoldable TraversableGenericGeneric1Datatype ConstructorSelectorKnownNat KnownSymbolIP GHC.TypesBoolDoubleFloatInt integer-gmpGHC.Integer.TypeIntegerOrderingRatioRational RealWorldWordFunPtr ConstraintStringV1U1Par1Rec1K1M1:+::*::.:RPDCSRec0Par0D1C1S1 NoSelectorRepRep1NatSymbol+*^<=? CmpSymbolCmpNat Coercible StaticPtr CallStackTypeRepC#D#FalseF#I#TrueW#LeftRightLTEQGT StaticPtrInfo Fingerprintminmax><not||&&<=compare/=isTrue# unsafeCoerce SomeException MonadPlusmzeromplus Alternativeempty<|>somemany*><*<$MonoidmemptymappendmconcatNothingJust<**>liftAliftA2liftA3=<<whenliftM2liftM3liftM4liftM5apordidconst.flip$!untilasTypeOfshiftL#shiftRL#iShiftL# iShiftRA# iShiftRL#abssignumsubtractcurryuncurryswapmaybeisJust isNothingfromJust fromMaybe maybeToList listToMaybe catMaybesmapMaybeheadunconstaillastinitnulllengthfoldl'foldl1'sumproductscanlscanl1scanl'scanrscanr1maximumminimumiteraterepeat replicatecycle takeWhile dropWhiletakedropsplitAtspanbreakreverseandoranyallelemnotElemlookup concatMap!!zip3zipWith3unzipunzip3showshowListShowSshowsshowChar showString showParen showLitChar intToDigitSTunsafeInterleaveSTfixSTrunST showListWith$>voidfixon&boolNotIfchrsuccpredminBoundmaxBoundproperFractiontruncateroundceilingfloor/recipquotremdivmodquotRemdivMod% numerator denominator showSignedevenodd^^gcdlcmrangeindexinRange rangeSize FiniteBits finiteBitSizecountLeadingZeroscountTrailingZerosBits.&..|.xor complementshiftrotatezeroBitsbitsetBitclearBit complementBittestBit bitSizeMaybebitSizeisSignedshiftL unsafeShiftLshiftR unsafeShiftRrotateLrotateRpopCount bitDefaulttestBitDefaultpopCountDefaulttoIntegralSizedisAsciiisLatin1 isAsciiLower isAsciiUpperisSpaceisDigit isOctDigit isHexDigit isAlphaNum isControlisPrintisUpperisLowertoLowertoUppertoTitleSTRefnewSTRef readSTRef writeSTRefReadPReadSgetlookpfail+++<++gathersatisfychareofstringmunchmunch1choice skipSpacescountbetweenoptionoptionalmany1skipMany skipMany1sepBysepBy1endByendBy1chainrchainlchainr1chainl1manyTill readP_to_S readS_to_PPrecReadPrecminPrecliftstepresetprec readPrec_to_P readP_to_Prec readPrec_to_S readS_to_PrecNumberLexemePuncIdentEOFnumberToInteger numberToFixednumberToRangedRationalnumberToRationallexexpecthsLexlexCharreadIntPreadOctPreadDecPreadHexP floatRadix floatDigits floatRange decodeFloat encodeFloatexponent significand scaleFloatisNaN isInfiniteisDenormalizedisNegativeZeroisIEEEatan2piexplogsqrt**logBasesincostanasinacosatansinhcoshtanhasinhacoshatanh showFloat floatToDigitsfromRatreadListreadPrec readListPrec readParenreadListDefaultreadListPrecDefault lexLitChar readLitChar lexDigitslexPparens byteSwap16 byteSwap32uncheckedShiftL64#uncheckedShiftRL64# byteSwap64Down comparing TestEquality testEquality:~:ReflsymtranscastWith gcastWithapplyinnerouter TestCoercion testCoercionCoercion coerceWithreprCategory<<<>>>$fCategorykCoercion$fCategoryk:~:$fCategory*(->)GeneralCategoryUppercaseLetterLowercaseLetterTitlecaseLetterModifierLetter OtherLetterNonSpacingMarkSpacingCombiningMark EnclosingMark DecimalNumber LetterNumber OtherNumberConnectorPunctuationDashPunctuationOpenPunctuationClosePunctuation InitialQuote FinalQuoteOtherPunctuation MathSymbolCurrencySymbolModifierSymbol OtherSymbolSpace LineSeparatorParagraphSeparatorControlFormat Surrogate PrivateUse NotAssigned digitToIntgeneralCategoryisMarkisNumber isPunctuationisSymbol isSeparator dropWhileEnd stripPrefix elemIndex elemIndicesfind findIndex findIndices isPrefixOf isSuffixOf isInfixOfnubnubBydeletedeleteBy\\unionunionBy intersect intersectBy intersperse intercalate transpose partition mapAccumL mapAccumRinsertinsertByzip4zip5zip6zip7zipWith4zipWith5zipWith6zipWith7unzip4unzip5unzip6unzip7deleteFirstsBygroupgroupByinitstails subsequences permutationssortsortOnunfoldrlinesunlineswordsunwordsKProxyProxy asProxyTypeOfreadIntreadOctreadDecreadHex readFloat readSignedshowInt showEFloat showFFloat showGFloat showFFloatAlt showGFloatAlt showIntAtBaseshowHexshowOctcastPtrplusPtralignPtrminusPtr nullFunPtr castFunPtrcastFunPtrToPtrcastPtrToFunPtrfingerprintStringfingerprintFingerprints Typeable7 Typeable6 Typeable5 Typeable4 Typeable3 Typeable2 Typeable1typeRep#TyContyConFingerprint tyConPackage tyConModule tyConNameKindRep mkTyConAppmkFunTy splitTyConAppsplitPolyTyConApp funResultTymkTyCon3 typeRepTyCon typeRepArgs typeRepKinds tyConStringtypeRepFingerprinttypeReptypeOftypeOf1typeOf2typeOf3typeOf4typeOf5typeOf6typeOf7 showsTypeRep rnfTypeReprnfTyConlistTcfunTc freeStablePtrdeRefStablePtrcastStablePtrToPtrcastPtrToStablePtrcasteqTgcastgcast1gcast2uncheckedIShiftL64#uncheckedIShiftRA64#eitherleftsrightspartitionEithersisLeftisRightfrom1to1fromto AssociativityLeftAssociativeRightAssociativeNotAssociativeFixityPrefixInfixArityNoArityconName conFixity conIsRecordselName datatypeName moduleName isNewtypeComp1unComp1L1R1unM1unK1unRec1unPar1AltgetAltLastgetLastFirstgetFirstProduct getProductSumgetSumAnygetAnyAllgetAllEndoappEndoDualgetDual<>foldfoldr'foldrMfoldlMasummsumreads readEither readMayberead newEmptyMVarnewMVartakeMVarreadMVarputMVar tryTakeMVar tryPutMVar tryReadMVar isEmptyMVarWeakmkWeak deRefWeakfinalizeArithExceptionOverflow UnderflowLossOfPrecision DivideByZeroDenormalRatioZeroDenominator ErrorCall Exception toException fromExceptiondisplayExceptionthrowIOError userError MaskingStateUnmaskedMaskedInterruptibleMaskedUninterruptibleFilePath unsafeIOToST unsafeSTToIOunsafeDupablePerformIOunsafeInterleaveIOgetMaskingStatemask_uninterruptibleMask_uninterruptibleMaskevaluateIORefnewIORef readIORef writeIORef mkWeakIORef modifyIORef modifyIORef'atomicModifyIORefatomicModifyIORef'atomicWriteIORefunsafeLocalStateDynamictoDynfromDyn fromDynamicdynApplydynApp dynTypeRep alignment peekElemOff pokeElemOff peekByteOff pokeByteOffpeekpokeCUIntMaxCIntMaxCUIntPtrCIntPtrCJmpBufCFposCFile CSUSeconds CUSecondsCTimeCClock CSigAtomicCWcharCSizeCPtrdiffCDoubleCFloatCULLongCLLongCULongCLongCUIntCIntCUShortCShortCUCharCSCharCCharFinalizerEnvPtr FinalizerPtrmallocForeignPtrmallocForeignPtrBytesaddForeignPtrFinalizerEnvnewForeignPtr_touchForeignPtrunsafeForeignPtrToPtrcastForeignPtrfinalizeForeignPtr newForeignPtrIntPtrWordPtr ptrToWordPtr wordPtrToPtr ptrToIntPtr intPtrToPtrnewForeignPtrEnvmallocForeignPtrArraymallocForeignPtrArray0 BufferState ReadBuffer WriteBuffer CharBufferBufferbufRawbufStatebufSizebufLbufR RawCharBuffer CharBufElem RawBuffer readWord8Buf writeWord8Buf peekCharBuf readCharBuf writeCharBufreadCharBufPtrwriteCharBufPtrcharSize withBuffer withRawBuffer isEmptyBuffer isFullBufferisFullCharBuffer isWriteBuffer bufferElemsbufferAvailable bufferRemove bufferAdjustL bufferAdd emptyBuffer newByteBuffer newCharBuffer newBuffer slideContents summaryBuffer checkBufferCodingProgressInputUnderflowOutputUnderflowInvalidSequence TextEncodingtextEncodingName mkTextDecoder mkTextEncoder TextEncoder TextDecoder EncodeBuffer DecodeBuffer CodeBuffer BufferCodecencoderecoverclosegetStatesetStategetLocaleEncodinggetFileSystemEncodinggetForeignEncodingSeekMode AbsoluteSeek RelativeSeek SeekFromEnd IODeviceType DirectoryStream RegularFile RawDeviceIODeviceready isTerminal isSeekableseektellgetSizesetSizesetEchogetEchosetRawdevTypedupdup2RawIOreadNonBlockingwritewriteNonBlocking BufferedIOfillReadBufferfillReadBuffer0emptyWriteBufferflushWriteBufferflushWriteBuffer0readBufreadBufNonBlockingwriteBufwriteBufNonBlocking NewlineModeinputNLoutputNLNewlineLFCRLF BufferMode NoBuffering LineBufferingBlockBuffering nativeNewlineuniversalNewlineModenativeNewlineModenoNewlineTranslation IOErrorTypeExitCode ExitSuccess ExitFailureArrayExceptionIndexOutOfBoundsUndefinedElementAsyncException StackOverflow HeapOverflow ThreadKilled UserInterruptSomeAsyncExceptionAssertionFailedAllocationLimitExceededDeadlockBlockedIndefinitelyOnSTMBlockedIndefinitelyOnMVarasyncExceptionToExceptionasyncExceptionFromExceptionioErrorcalloc mallocBytes callocBytes allocaBytesallocaBytesAlignedrealloc reallocBytesfromBooltoBoolmaybeNew maybeWith maybePeekwithMany copyBytes moveBytes fillBytes callocArray callocArray0 allocaArray allocaArray0 reallocArray reallocArray0 peekArray peekArray0 pokeArray pokeArray0newArray newArray0 withArray withArrayLen withArray0 withArrayLen0 copyArray moveArray lengthArray0 advancePtr peekCStringpeekCStringLen newCString newCStringLen withCStringwithCStringLencharIsRepresentable CWStringLenCWString CStringLenCStringcastCCharToCharcastCharToCCharcastCUCharToCharcastCharToCUCharcastCSCharToCharcastCharToCSChar peekCAStringpeekCAStringLen newCAStringnewCAStringLen withCAStringwithCAStringLen peekCWStringpeekCWStringLen newCWStringnewCWStringLen withCWStringwithCWStringLenthrowIfthrowIf_ throwIfNeg throwIfNeg_ throwIfNullPoolnewPoolfreePoolwithPool pooledMallocpooledMallocBytes pooledReallocpooledReallocBytespooledMallocArraypooledMallocArray0pooledReallocArraypooledReallocArray0 pooledNewpooledNewArraypooledNewArray0ErrnoeOKe2BIGeACCES 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_errnoToIOErrorLimitProcessGroupID FileOffset ProcessIDFileModeFileIDDeviceID EpochTime ClockTick ByteCountGroupIDUserID LinkCountFdCRLimCTcflagCSpeedCCcCUidCNlinkCGidCSsizeCPidCOffCModeCInoCDevstdoutCodingFailureModeErrorOnCodingFailureIgnoreCodingFailureTransliterateCodingFailureRoundtripFailurecodingFailureModeSuffix isSurrogate recoverDecode recoverEncodeutf8mkUTF8utf8_bom mkUTF8_bomTVarSTM ThreadStatus ThreadRunningThreadFinished ThreadBlocked ThreadDied BlockReason BlockedOnMVarBlockedOnBlackHoleBlockedOnException BlockedOnSTMBlockedOnForeignCallBlockedOnOtherThreadIdgetAllocationCounterdisableAllocationLimitforkOnforkOnWithUnmasknumCapabilitiesgetNumCapabilitiessetNumCapabilitiesgetNumProcessors numSparks childHandler myThreadIdyield labelThreadpseqpar runSparks threadStatusthreadCapabilitymkWeakThreadId unsafeIOToSTM atomicallyretryorElsethrowSTMcatchSTMalwaysSucceedsalwaysnewTVar newTVarIO readTVarIOreadTVar writeTVarwithMVar modifyMVar_ sharedCAFreportStackOverflow reportErrorsetUncaughtExceptionHandlergetUncaughtExceptionHandlerNestedAtomicallyNonTermination NoMethodError RecUpdError RecConError RecSelErrorPatternMatchFail catchJusthandle handleJust mapExceptiontryJust onExceptionfinallybracket_bracketOnErrornonTerminationnestedAtomicallyswapMVarwithMVarMasked modifyMVarmodifyMVarMasked_modifyMVarMaskedaddMVarFinalizer mkWeakMVarHandlercatchesallowInterrupt unsafeFixIO HandlerFunSignal setHandler runHandlersrunHandlersPtrlatin1mkLatin1latin1_checkedmkLatin1_checkedasciimkAscii latin1_decode ascii_decode latin1_encodelatin1_checked_encode ascii_encodeutf16mkUTF16 utf16_encode utf16_decodeutf16be mkUTF16beutf16le mkUTF16leutf16be_decodeutf16le_decodeutf16be_encodeutf16le_encodeutf32mkUTF32 utf32_encode utf32_decodeutf32be mkUTF32beutf32le mkUTF32leutf32be_decodeutf32le_decodeutf32be_encodeutf32le_encodeIOModeReadMode WriteMode AppendMode ReadWriteModesetLocaleEncodingsetFileSystemEncodingsetForeignEncodinginitLocaleEncodingchar8mkTextEncoding getFullArgsmkDuplexHandle hClose_help tryIOError mkIOErrorisAlreadyExistsErrorisAlreadyInUseErrorisIllegalOperation isUserErroralreadyExistsErrorTypedoesNotExistErrorTypealreadyInUseErrorType fullErrorType eofErrorTypeillegalOperationErrorTypepermissionErrorType userErrorTypeisAlreadyExistsErrorTypeisDoesNotExistErrorTypeisAlreadyInUseErrorTypeisFullErrorTypeisEOFErrorTypeisIllegalOperationErrorTypeisPermissionErrorTypeisUserErrorTypeioeGetErrorTypeioeGetErrorStringioeGetLocation ioeGetHandleioeGetFileNameioeSetErrorTypeioeSetErrorStringioeSetLocation ioeSetHandleioeSetFileName modifyIOErrorannotateIOError catchIOError stopProfTimerstartProfTimerLifetimeOneShot MultiShotEventevtReadevtWrite EventManager IOCallbackFdKeykeyFd registerFd unregisterFd_ unregisterFdcloseFd TimerManagerTimeoutCallback TimeoutKeyregisterTimeoutunregisterTimeout updateTimeoutgetSystemEventManagergetSystemTimerManagerensureIOManagerIsRunningioManagerCapabilitiesChangedthreadWaitReadthreadWaitWritethreadWaitReadSTMthreadWaitWriteSTM closeFdWith threadDelay registerDelayhGetCharhGetLinehPutCharhPutStr hPutStrLnhPutBufNonBlocking hGetBufSomehGetBufNonBlockingHandlePosition HandlePosnhClose hFileSize hSetFileSizehIsEOF hSetBuffering hSetEncoding hGetEncoding hFlushAllhGetPosnhSetPosnhSeekhTellhIsOpen hIsClosed hIsReadable hIsWritable hGetBuffering hIsSeekablehSetEchohGetEchohIsTerminalDevicehSetBinaryModehSetNewlineMode hDuplicate hDuplicateTohShowstdinstderrisEOFopenFileBlockingopenBinaryFile fdToHandle' fdToHandleputCharputStrputStrLngetChargetLine getContentsinteractreadFile writeFile appendFilereadLnreadIOlocaleEncodinghReadyhPrintwithFilewithBinaryFile openTempFileopenBinaryTempFile"openTempFileWithDefaultPermissions(openBinaryTempFileWithDefaultPermissions ArrowLoop ArrowMonad ArrowApply ArrowChoiceleftright ArrowPlus<+> ArrowZero zeroArrowKleisli runKleisliArrowsecond***&&&returnA^>>>>^<<^^<<leftAppZipList getZipList WrappedArrow WrapArrow unwrapArrow WrappedMonad WrapMonad unwrapMonadConstgetConst fmapDefaultfoldMapDefaultfilterM>=><=<forever mapAndUnzipMzipWithM zipWithM_foldMfoldM_ replicateM replicateM_unless<$!>mfilterGCStatsbytesAllocatednumGcs maxBytesUsednumByteUsageSamplescumulativeBytesUsed bytesCopiedcurrentBytesUsedcurrentBytesSlop maxBytesSloppeakMegabytesAllocatedmutatorCpuSecondsmutatorWallSeconds gcCpuSeconds gcWallSeconds cpuSeconds wallSecondsparTotBytesCopiedparMaxBytesCopiedgetGCStatsEnabled getGCStatsisSubsequenceOfVersion versionBranch versionTags showVersion parseVersion makeVersionConIndex ConstrRep AlgConstr IntConstr FloatConstr CharConstrDataRepAlgRepIntRepFloatRepCharRepNoRepConstrDataTypegfoldlgunfoldtoConstr dataTypeOf dataCast1 dataCast2gmapTgmapQlgmapQrgmapQgmapQigmapMgmapMpgmapMo fromConstr fromConstrB fromConstrM dataTypeName dataTypeRep constrType constrRep repConstr mkDataTypemkConstrdataTypeConstrs constrFields constrFixity showConstr readConstr isAlgType indexConstr constrIndexmaxConstrIndex mkIntType mkFloatType mkCharTypemkIntegralConstr mkRealConstr mkCharConstr mkNoRepType isNorepType tyconUQname tyconModuleNaturalNatS#NatJ#isValidNaturalminusNaturalMaybe wordToNaturalnaturalToWordMaybe powModNaturalRTSFlagsgcFlagsconcurrentFlags miscFlags debugFlagscostCentreFlagsprofilingFlags traceFlags tickyFlags TickyFlagsshowTickyStats tickyFile TraceFlagstracing timestamptraceSchedulertraceGc sparksSampled sparksFulluser ProfFlags doHeapProfileheapProfileIntervalheapProfileIntervalTicks includeTSOsshowCCSOnExceptionmaxRetainerSetSize ccsLength modSelector descrSelector typeSelector ccSelector ccsSelectorretainerSelector bioSelectorCCFlags doCostCentres profilerTicks msecsPerTick DebugFlags scheduler interpreterweakgccafsgc block_allocsanitystableproflinkerstmsqueezehpcsparks MiscFlags tickIntervalinstallSignalHandlersmachineReadable linkerMemBase ConcFlagsctxtSwitchTimectxtSwitchTicksGCFlags statsFile giveStats maxStkSizeinitialStkSize stkChunkSizestkChunkBufferSize maxHeapSizeminAllocAreaSize minOldGenSizeheapSizeSuggestionheapSizeSuggestionAuto oldGenFactor pcFreeHeap generationsstepssqueezeUpdFramescompactcompactThresholdsweepringBell frontpanelidleGCDelayTimedoIdleGCheapBaseallocLimitGrace getRTSFlags getGCFlags getConcFlags getMiscFlags getDebugFlags getCCFlags getProfFlags getTraceFlags getTickyFlags fingerprint0fingerprintData getFileHash SomeSymbolSomeNatnatVal symbolValnatVal' symbolVal' someNatVal someSymbolValsameNat sameSymbolipSrcLoc srcLocPackage srcLocModule srcLocFilesrcLocStartLinesrcLocStartCol srcLocEndLine srcLocEndCol showSrcLoc getCallStack CostCentreCostCentreStack getCurrentCCSgetCCSOfccsCC ccsParentccLabelccModule ccSrcSpancurrentCallStack ccsToStrings whoCreated renderStackerrorWithStackTrace showCallStacktraceIO putTraceMsgtracetraceId traceShow traceShowIdtraceM traceShowM traceStack traceEvent traceEventIO traceMarker traceMarkerIOItemSpecConstrAnnotation NoSpecConstrForceSpecConstr maxTupleSizethesortWithMonadZipmzipWithmunzip $fMonadZip[]spInfoPackageKeyspInfoModuleName spInfoName spInfoSrcLoc StaticKeydeRefStaticPtr staticKeyunsafeLookupStaticPtr staticPtrInfo staticPtrKeysChannewChan writeChanreadChandupChan unGetChan isEmptyChangetChanContentswriteList2ChanQSemnewQSemwaitQSem signalQSemQSemNnewQSemN waitQSemN signalQSemNrtsSupportsBoundThreads forkFinallyisCurrentThreadBoundrunInBoundThreadrunInUnboundThreadstrictToLazySTlazyToStrictST BifunctorbimapComplex:+realPartimagPart conjugatemkPolarcispolar magnitudephasePicoE12NanoE9MicroE6MilliE3CentiE2DeciE1UniE0 HasResolution resolutionFixedMkFixeddiv'divMod'mod' showFixedIdentity runIdentityapproxRational modifySTRef modifySTRef'Unique newUnique hashUniqueVoidabsurdvacuous getCPUTimecpuTimePrecisionArgDescrNoArgReqArgOptArgOptDescrOptionArgOrder RequireOrderPermute ReturnInOrder usageInfogetOptgetOpt'getExecutablePath getProgName lookupEnvsetEnvunsetEnvwithArgs withProgNamegetEnvironment exitFailure exitSuccessdiecompilerVersionosarch compilerNameperformMinorGCperformMajorGC StableNamemakeStableNamehashStableName eqStableName mkWeakPtr addFinalizer mkWeakPairtimeoutModifierParserFieldFormatter FormatParse fpModifiersfpCharfpRest FieldFormatfmtWidth fmtPrecision fmtAdjustfmtSign fmtAlternate fmtModifiersfmtChar FormatSignSignPlus SignSpaceFormatAdjustment LeftAdjustZeroPadIsChartoCharfromChar PrintfArg formatArg parseFormat HPrintfType PrintfTypeprintfhPrintfvFmt formatChar formatString formatInt formatIntegerformatRealFloatperrorerrorBadFormaterrorShortFormaterrorMissingArgumenterrorBadArgumentlocal_id absentErreqStringgetTag $fMonoidMaybebindIOreturnIOthenIOOpaqueOmapFB unsafeChrminIntmaxIntunIOquotIntremIntdivIntmodInt quotRemInt divModInt divModInt# $fMonadIO$fApplicativeIO $fFunctorIO $fMonadPlus[]$fAlternative[] $fMonad[]$fApplicative[] $fFunctor[]$fMonadPlusMaybe$fAlternativeMaybe $fMonadMaybe$fApplicativeMaybe$fFunctorMaybe $fFunctor(,) $fMonad(->)$fApplicative(->) $fFunctor(->)$fApplicative(,)$fMonoidOrdering$fMonoid(,,,,) $fMonoid(,,,) $fMonoid(,,) $fMonoid(,) $fMonoid() $fMonoid(->) $fMonoid[] realWorld# GHC.CStringunpackCStringUtf8#unpackFoldrCString#unpackCString#void# unsafeCoerce# nullAddr#oneShot magicDictproxy#Addr#Array# ByteArray#Char#Double#Float#(->)Int#Int32#Int64#Weak# MutableArray#MutableByteArray#MVar# StablePtr# ArrayArray#MutableArrayArray#State# StableName#~#~R#MutVar#Void#Word#Word32#Word64# ThreadId#BCO#TVar#BOXAnyKOpenKind#Proxy#SPEC SmallArray#SmallMutableArray#Int8X16#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#gtChar#geChar#eqChar#neChar#ltChar#leChar#ord#+#-#*#mulIntMayOflo#quotInt#remInt# quotRemInt#andI#orI#xorI#notI# negateInt#addIntC#subIntC#>#>=#==#/=#<#<=#chr# int2Word# int2Float# int2Double# word2Float# word2Double#uncheckedIShiftL#uncheckedIShiftRA#uncheckedIShiftRL# plusWord# 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#clz8#clz16#clz32#clz64#clz#ctz8#ctz16#ctz32#ctz64#ctz# byteSwap16# byteSwap32# byteSwap64# byteSwap# narrow8Int# narrow16Int# narrow32Int# narrow8Word# narrow16Word# narrow32Word#>##>=##==##/=##<##<=##+##-##*##/## negateDouble# double2Int# double2Float# expDouble# logDouble# sqrtDouble# sinDouble# cosDouble# tanDouble# asinDouble# acosDouble# atanDouble# sinhDouble# coshDouble# tanhDouble#**##decodeDouble_2Int#decodeDouble_Int64#gtFloat#geFloat#eqFloat#neFloat#ltFloat#leFloat# plusFloat# minusFloat# timesFloat# divideFloat# negateFloat# float2Int# expFloat# logFloat# sqrtFloat# sinFloat# cosFloat# tanFloat# asinFloat# acosFloat# atanFloat# sinhFloat# coshFloat# tanhFloat# powerFloat# float2Double#decodeFloat_Int# newArray#sameMutableArray# readArray# writeArray# sizeofArray#sizeofMutableArray# indexArray#unsafeFreezeArray#unsafeThawArray# copyArray#copyMutableArray# cloneArray#cloneMutableArray# freezeArray# thawArray# casArray#newSmallArray#sameSmallMutableArray#readSmallArray#writeSmallArray#sizeofSmallArray#sizeofSmallMutableArray#indexSmallArray#unsafeFreezeSmallArray#unsafeThawSmallArray#copySmallArray#copySmallMutableArray#cloneSmallArray#cloneSmallMutableArray#freezeSmallArray#thawSmallArray#casSmallArray# newByteArray#newPinnedByteArray#newAlignedPinnedByteArray#byteArrayContents#sameMutableByteArray#shrinkMutableByteArray#resizeMutableByteArray#unsafeFreezeByteArray#sizeofByteArray#sizeofMutableByteArray#indexCharArray#indexWideCharArray#indexIntArray#indexWordArray#indexAddrArray#indexFloatArray#indexDoubleArray#indexStablePtrArray#indexInt8Array#indexInt16Array#indexInt32Array#indexInt64Array#indexWord8Array#indexWord16Array#indexWord32Array#indexWord64Array#readCharArray#readWideCharArray# readIntArray#readWordArray#readAddrArray#readFloatArray#readDoubleArray#readStablePtrArray#readInt8Array#readInt16Array#readInt32Array#readInt64Array#readWord8Array#readWord16Array#readWord32Array#readWord64Array#writeCharArray#writeWideCharArray#writeIntArray#writeWordArray#writeAddrArray#writeFloatArray#writeDoubleArray#writeStablePtrArray#writeInt8Array#writeInt16Array#writeInt32Array#writeInt64Array#writeWord8Array#writeWord16Array#writeWord32Array#writeWord64Array#copyByteArray#copyMutableByteArray#copyByteArrayToAddr#copyMutableByteArrayToAddr#copyAddrToByteArray# setByteArray#atomicReadIntArray#atomicWriteIntArray# casIntArray#fetchAddIntArray#fetchSubIntArray#fetchAndIntArray#fetchNandIntArray#fetchOrIntArray#fetchXorIntArray#newArrayArray#sameMutableArrayArray#unsafeFreezeArrayArray#sizeofArrayArray#sizeofMutableArrayArray#indexByteArrayArray#indexArrayArrayArray#readByteArrayArray#readMutableByteArrayArray#readArrayArrayArray#readMutableArrayArrayArray#writeByteArrayArray#writeMutableByteArrayArray#writeArrayArrayArray#writeMutableArrayArrayArray#copyArrayArray#copyMutableArrayArray# plusAddr# minusAddr#remAddr# addr2Int# int2Addr#gtAddr#geAddr#eqAddr#neAddr#ltAddr#leAddr#indexCharOffAddr#indexWideCharOffAddr#indexIntOffAddr#indexWordOffAddr#indexAddrOffAddr#indexFloatOffAddr#indexDoubleOffAddr#indexStablePtrOffAddr#indexInt8OffAddr#indexInt16OffAddr#indexInt32OffAddr#indexInt64OffAddr#indexWord8OffAddr#indexWord16OffAddr#indexWord32OffAddr#indexWord64OffAddr#readCharOffAddr#readWideCharOffAddr#readIntOffAddr#readWordOffAddr#readAddrOffAddr#readFloatOffAddr#readDoubleOffAddr#readStablePtrOffAddr#readInt8OffAddr#readInt16OffAddr#readInt32OffAddr#readInt64OffAddr#readWord8OffAddr#readWord16OffAddr#readWord32OffAddr#readWord64OffAddr#writeCharOffAddr#writeWideCharOffAddr#writeIntOffAddr#writeWordOffAddr#writeAddrOffAddr#writeFloatOffAddr#writeDoubleOffAddr#writeStablePtrOffAddr#writeInt8OffAddr#writeInt16OffAddr#writeInt32OffAddr#writeInt64OffAddr#writeWord8OffAddr#writeWord16OffAddr#writeWord32OffAddr#writeWord64OffAddr# newMutVar# readMutVar# writeMutVar# sameMutVar#atomicModifyMutVar# casMutVar#catch#raise#raiseIO#maskAsyncExceptions#maskUninterruptible#unmaskAsyncExceptions#getMaskingState# atomically#retry# catchRetry# catchSTM#check#newTVar# readTVar# readTVarIO# writeTVar# sameTVar#newMVar# takeMVar# tryTakeMVar#putMVar# tryPutMVar# readMVar# tryReadMVar# sameMVar# isEmptyMVar#delay# waitRead# waitWrite#fork#forkOn# killThread#yield# myThreadId# labelThread#isCurrentThreadBound# noDuplicate# threadStatus#mkWeak#mkWeakNoFinalizer#addCFinalizerToWeak# deRefWeak# finalizeWeak#touch#makeStablePtr#deRefStablePtr# eqStablePtr#makeStableName# eqStableName#stableNameToInt#reallyUnsafePtrEquality#par#spark#seq# getSpark# numSparks# parGlobal# parLocal#parAt# parAtAbs# parAtRel# parAtForNow# dataToTag# tagToEnum# addrToAny# mkApUpd0#newBCO#unpackClosure#getApStackVal# getCCSOf#getCurrentCCS# traceEvent# traceMarker#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#modInt#divInt# compareInt# compareIntleIntltIntgeIntgtIntneInteqInt unpackNBytes#unpackAppendCString#SPEC2 $fNumInteger $fNumWord$fNumInt mkInteger smallInteger integerToWord integerToInt plusInteger timesInteger minusInteger negateInteger eqInteger# neqInteger# absInteger signumInteger leInteger# gtInteger# ltInteger# geInteger#compareInteger quotInteger remInteger divInteger modInteger divModIntegerquotRemIntegerfloatFromIntegerdoubleFromIntegerencodeFloatIntegerencodeDoubleInteger andInteger orInteger xorIntegercomplementInteger shiftLInteger shiftRInteger wordToIntegerdecodeDoubleIntegertestBitInteger geInteger gtInteger ltInteger leInteger eqInteger neqInteger hashInteger GHCiSandboxIONoIO ghciStepIOnoio$fGHCiSandboxIONoIO $fMonadNoIO$fApplicativeNoIO $fFunctorNoIO$fGHCiSandboxIOIO mapMaybeFBbadHead lastErrorlenAcclengthFBidLengthfilterFBscanlFB constScanlscanlFB' flipSeqScanl'strictUncurryScanrscanrFB strictMaximum strictMinimum iterateFBrepeatFB takeWhileFB unsafeTake flipSeqTaketakeFBtooLargenegIndexfoldr2 foldr2_leftzipFB zipWithFBerrorEmptyList prel_list_str showLitStringshowMultiLineString showList__appPrecappPrec1showWord show_tuple showSpaceisDec protectEscasciiTab showSignedIntitosintegerToString $fShowInteger$fShow(,,,,,,,,,,,,,,)$fShow(,,,,,,,,,,,,,)$fShow(,,,,,,,,,,,,)$fShow(,,,,,,,,,,,)$fShow(,,,,,,,,,,)$fShow(,,,,,,,,,)$fShow(,,,,,,,,)$fShow(,,,,,,,)$fShow(,,,,,,) $fShow(,,,,,) $fShow(,,,,) $fShow(,,,) $fShow(,,) $fShow(,) $fShowWord $fShowInt $fShowChar$fShow[]runSTRepSTretSTRepliftST$fShowST $fMonadST$fApplicativeST $fFunctorSTboundedEnumFromboundedEnumFromThen toEnumError fromEnumError succError predError eftCharFBeftChar efdCharFBefdChar efdtCharFBefdtChar go_up_char_fb go_dn_char_fbgo_up_char_listgo_dn_char_listeftInteftIntFBefdIntefdtInt efdtIntFB efdtIntUp efdtIntUpFB efdtIntDn efdtIntDnFB maxIntWordintegerToWordXwordToIntegerXenumDeltaIntegerFBenumDeltaIntegerenumDeltaToIntegerFBenumDeltaToIntegerup_fbdn_fbup_listdn_list $fEnumInteger $fEnumWord $fBoundedWord $fEnumInt $fBoundedInt $fEnumChar $fBoundedChar$fEnumOrdering$fBoundedOrdering $fEnumBool $fBoundedBool$fBounded(,,,,,,,,,,,,,,)$fBounded(,,,,,,,,,,,,,)$fBounded(,,,,,,,,,,,,)$fBounded(,,,,,,,,,,,)$fBounded(,,,,,,,,,,)$fBounded(,,,,,,,,,)$fBounded(,,,,,,,,)$fBounded(,,,,,,,)$fBounded(,,,,,,)$fBounded(,,,,,)$fBounded(,,,,)$fBounded(,,,) $fBounded(,,) $fBounded(,)$fEnum() $fBounded()reduce:% divZeroErrorratioZeroDenominatorError overflowError ratioPrec ratioPrec1infinity notANumbernumericEnumFromnumericEnumFromThennumericEnumFromTonumericEnumFromThenTo^%^^^%^^gcdInt'gcdWord'integralEnumFromintegralEnumFromThenintegralEnumFromTointegralEnumFromThenTo $fEnumRatio $fShowRatio$fRealFracRatio $fRealRatio$fFractionalRatio $fNumRatio $fOrdRatio$fIntegralInteger $fRealInteger$fIntegralWord $fRealWord $fIntegralInt $fRealIntSTArrayArray unsafeIndexunsafeRangeSizearraybounds listArray! numElementsindiceselems foldrElems foldlElems foldrElems' foldlElems' foldl1Elems foldr1Elemsassocs accumArray//accumixmap indexErrorhopelessIndexError arrEleBottom unsafeArray unsafeArray'filldone safeRangeSizenegRange safeIndex lessSafeIndex badSafeIndexunsafeAtunsafeAccumArrayunsafeAccumArray'adjust unsafeReplace unsafeAccumamapeqArraycmpArray cmpIntArray newSTArray boundsSTArraynumElementsSTArray readSTArrayunsafeReadSTArray writeSTArrayunsafeWriteSTArray freezeSTArrayunsafeFreezeSTArray thawSTArrayunsafeThawSTArray $fShowArray $fOrdArray $fEqArray$fFunctorArray $fEqSTArray $fIx(,,,,) $fIx(,,,)$fIx(,,)$fIx(,)$fIx() $fIxOrdering$fIxBool $fIxInteger$fIxWord$fIxInt$fIxChar isBitSubType $fBitsInteger$fFiniteBitsWord $fBitsWord$fFiniteBitsInt $fBitsInt$fFiniteBitsBool $fBitsBoolwgencattowtitletowuppertowloweriswupperiswloweriswprintiswspaceiswcntrliswalnumiswalpha $fEqSTRefGetLookFailResultFinalfinalrun$fMonadPlusReadP$fAlternativeReadP $fMonadReadP$fApplicativeReadP$fFunctorReadP$fAlternativeP$fMonadP $fMonadPlusP$fApplicativeP$fAlternativeReadPrec$fMonadPlusReadPrec$fMonadReadPrec$fApplicativeReadPrec$fFunctorReadPrecDigitsBaseMkNumber MkDecimallexTokenlexEOFlexPunc lexSymbollexIdlexCharE lexString lexNumber lexHexOct lexBaseChar lexDecNumberlexFraclexExp lexIntegerval valSimple valIntegerfracExpvalDig valDecDig readIntP' c_rintFloat c_rintDoubleproperFractionFloatInt floorFloatIntceilingFloatInt roundFloatIntproperFractionFloatIntegertruncateFloatIntegerfloorFloatIntegerceilingFloatIntegerroundFloatIntegerproperFractionDoubleIntfloorDoubleIntceilingDoubleIntroundDoubleIntproperFractionDoubleIntegertruncateDoubleIntegerfloorDoubleIntegerceilingDoubleIntegerroundDoubleInteger double2Int int2Double float2Int int2Floatdouble2Integer float2IntegerBAelim64#elimZerosInteger elimZerosInt# zeroCounttoByte# zeroCountArrrationalToFloatrationalToDoubleFFFormat FFExponentFFFixed FFGenericisDoubleFiniteisDoubleNegativeZeroisDoubleDenormalizedisDoubleInfinite isDoubleNaN isFloatFiniteisFloatNegativeZeroisFloatDenormalizedisFloatInfinite isFloatNaNformatRealFloatAltroundTofromRat'minExptmaxExptexptexpts maxExpt10expts10integerLogBase fromRat'' plusFloat minusFloat timesFloat divideFloat negateFloatgtFloatgeFloateqFloatneFloatltFloatleFloatexpFloatlogFloat sqrtFloatsinFloatcosFloattanFloat asinFloat acosFloat atanFloat sinhFloat coshFloat tanhFloat powerFloat plusDouble minusDouble timesDouble divideDouble negateDoublegtDoublegeDoubleeqDoubleneDoubleltDoubleleDouble double2Float float2Double expDouble logDouble sqrtDouble sinDouble cosDouble tanDouble asinDouble acosDouble atanDouble sinhDouble coshDouble tanhDouble powerDouble word2Double word2FloatshowSignedFloatclamp $fEnumDouble $fEnumFloat $fShowDouble$fRealFloatDouble$fRealFracDouble$fFloatingDouble$fFractionalDouble $fRealDouble $fNumDouble $fShowFloat$fRealFloatFloat$fFloatingFloat$fRealFracFloat$fFractionalFloat $fRealFloat $fNumFloatparenlistchooseexpectP readNumber convertInt convertFracwrap_tup read_comma read_tup2 read_tup4 read_tup8$fRead(,,,,,,,,,,,,,,)$fRead(,,,,,,,,,,,,,)$fRead(,,,,,,,,,,,,)$fRead(,,,,,,,,,,,)$fRead(,,,,,,,,,,)$fRead(,,,,,,,,,)$fRead(,,,,,,,,)$fRead(,,,,,,,)$fRead(,,,,,,) $fRead(,,,,,) $fRead(,,,,) $fRead(,,,) $fRead(,,) $fRead(,)$fRead() $fReadRatio $fReadDouble $fReadFloat $fReadInteger $fReadWord $fReadInt $fReadLexeme $fReadArray$fRead[] $fReadMaybe$fReadOrdering $fReadBool $fReadCharW64#W32#W16#W8# $fReadWord64 $fIxWord64$fBoundedWord64 $fRealWord64 $fShowWord64$fFiniteBitsWord64 $fBitsWord64$fIntegralWord64 $fEnumWord64 $fNumWord64 $fReadWord32 $fIxWord32$fBoundedWord32 $fRealWord32 $fShowWord32$fFiniteBitsWord32 $fBitsWord32$fIntegralWord32 $fEnumWord32 $fNumWord32$fFiniteBitsWord16 $fBitsWord16 $fReadWord16 $fIxWord16$fBoundedWord16$fIntegralWord16 $fEnumWord16 $fRealWord16 $fNumWord16 $fShowWord16$fFiniteBitsWord8 $fBitsWord8 $fReadWord8 $fIxWord8$fBoundedWord8$fIntegralWord8 $fEnumWord8 $fRealWord8 $fNumWord8 $fShowWord8 $fOrdDownEq15Eq14Eq13Eq12Eq11Eq10Eq9Eq8Eq7Eq6Eq5Eq4Eq3Eq2EqMaybeEqListEqUnit EqOrderingEqBoolEqArrowEqStarTFCo:R:==(,,,,,,,,,,,,,,)abTFCo:R:==(,,,,,,,,,,,,,)abTFCo:R:==(,,,,,,,,,,,,)abTFCo:R:==(,,,,,,,,,,,)abTFCo:R:==(,,,,,,,,,,)abTFCo:R:==(,,,,,,,,,)abTFCo:R:==(,,,,,,,,)abTFCo:R:==(,,,,,,,)abTFCo:R:==(,,,,,,)abTFCo:R:==(,,,,,)abTFCo:R:==(,,,,)abTFCo:R:==(,,,)abTFCo:R:==(,,)abTFCo:R:==(,)abTFCo:R:==Maybeab TFCo:R:==[]ab TFCo:R:==()abTFCo:R:==OrderingabTFCo:R:==BoolabTFCo:R:==(->)ab TFCo:R:==*ab$fTestEqualityk:~: $fBounded:~: $fEnum:~: $fRead:~:Symunsym$fTestCoercionkCoercion$fTestCoercionk:~:$fBoundedCoercion$fEnumCoercion$fReadCoercionnonEmptySubsequences SnocBuilder dropLengthdropLengthMaybeelem_by prependToAllselect pairWithNil mapAccumLFstrictGenericLengthwordsFB tailUnwords unwordsFBsbemptySBsnocSBtoListSB $fMonadProxy$fApplicativeProxy$fFunctorProxy $fMonoidProxy$fBoundedProxy $fIxProxy $fEnumProxy $fReadProxy $fShowProxy $fOrdProxy $fEqProxy readFloatP $fShowFunPtr $fShowPtr$fShowFingerprint isTupleTyConshowArgs showTuple $fShowTyCon $fShowTypeRep $fOrdTyCon $fEqTyCon $fOrdTypeRep $fEqTypeRep $fEqStablePtrI64#I32#I16#I8# $fIxInt64$fBoundedInt64 $fRealInt64$fFiniteBitsInt64 $fBitsInt64 $fReadInt64$fIntegralInt64 $fEnumInt64 $fNumInt64 $fShowInt64 $fIxInt32$fBoundedInt32 $fRealInt32$fFiniteBitsInt32 $fBitsInt32 $fReadInt32$fIntegralInt32 $fEnumInt32 $fNumInt32 $fShowInt32$fFiniteBitsInt16 $fBitsInt16 $fReadInt16 $fIxInt16$fBoundedInt16$fIntegralInt16 $fEnumInt16 $fRealInt16 $fNumInt16 $fShowInt16$fFiniteBitsInt8 $fBitsInt8 $fReadInt8$fIxInt8 $fBoundedInt8$fIntegralInt8 $fEnumInt8 $fRealInt8 $fNumInt8 $fShowInt8readWideCharOffPtr readIntOffPtrreadWordOffPtr readPtrOffPtrreadFunPtrOffPtrreadFloatOffPtrreadDoubleOffPtrreadStablePtrOffPtrreadInt8OffPtrreadWord8OffPtrreadInt16OffPtrreadWord16OffPtrreadInt32OffPtrreadWord32OffPtrreadInt64OffPtrreadWord64OffPtrwriteWideCharOffPtrwriteIntOffPtrwriteWordOffPtrwritePtrOffPtrwriteFunPtrOffPtrwriteFloatOffPtrwriteDoubleOffPtrwriteStablePtrOffPtrwriteInt8OffPtrwriteWord8OffPtrwriteInt16OffPtrwriteWord16OffPtrwriteInt32OffPtrwriteWord32OffPtrwriteInt64OffPtrwriteWord64OffPtrEqEitherTFCo:R:==Eitherab $fMonadEither$fApplicativeEither$fFunctorEitherC_CharD_CharC_DoubleD_DoubleC_FloatD_FloatC_IntD_Int $fGenericChar$fConstructorC_Char$fDatatypeD_Char$fGenericDouble$fConstructorC_Double$fDatatypeD_Double$fGenericFloat$fConstructorC_Float$fDatatypeD_Float $fGenericInt$fConstructorC_Int$fDatatypeD_Int$fSelectorNoSelector $fMonoidAlt $fMonoidLast $fMonoidFirst$fMonoidProduct $fMonoidSum $fMonoidAny $fMonoidAll $fMonoidEndo $fMonoidDualMingetMinMaxgetMax#. $fMonoidMin $fMonoidMax$fFoldableProxy$fFoldableArray $fFoldable(,)$fFoldableEither $fFoldable[]$fFoldableMaybe$fEqMVarrunFinalizerBatcherrorCallExceptiondivZeroExceptionoverflowExceptionratioZeroDenomException$fShowArithException$fExceptionArithException$fShowErrorCall$fExceptionErrorCall$fExceptionSomeException$fShowSomeException noDuplicatefailIOliftIOioToSTunsafeDupableInterleaveIOcatchExceptioncatchAnyblockunblock unsafeUnmaskblockUninterruptible $fEqIORefObj$fExceptionDynamic $fShowDynamicIOArray newIOArrayunsafeReadIOArrayunsafeWriteIOArray readIOArray writeIOArray boundsIOArray $fEqIOArraypeekFingerprintpokeFingerprint$fStorableFingerprint$fStorableRatio$fStorableInt64$fStorableInt32$fStorableInt16$fStorableInt8$fStorableWord64$fStorableWord32$fStorableWord16$fStorableWord8$fStorableDouble$fStorableFloat$fStorableStablePtr$fStorableFunPtr $fStorablePtr$fStorableWord $fStorableInt$fStorableChar$fStorableBool$fShowCUIntMax$fReadCUIntMax $fShowCIntMax $fReadCIntMax$fShowCUIntPtr$fReadCUIntPtr $fShowCIntPtr $fReadCIntPtr$fShowCSUSeconds$fReadCSUSeconds$fShowCUSeconds$fReadCUSeconds $fShowCTime $fReadCTime $fShowCClock $fReadCClock$fShowCSigAtomic$fReadCSigAtomic $fShowCWchar $fReadCWchar $fShowCSize $fReadCSize$fShowCPtrdiff$fReadCPtrdiff $fShowCDouble $fReadCDouble $fShowCFloat $fReadCFloat $fShowCULLong $fReadCULLong $fShowCLLong $fReadCLLong $fShowCULong $fReadCULong $fShowCLong $fReadCLong $fShowCUInt $fReadCUInt $fShowCInt $fReadCInt $fShowCUShort $fReadCUShort $fShowCShort $fReadCShort $fShowCUChar $fReadCUChar $fShowCSChar $fReadCSChar $fShowCChar $fReadCCharMyWeaknewConcForeignPtrmallocForeignPtrAlignedBytesmallocPlainForeignPtrmallocPlainForeignPtrBytes!mallocPlainForeignPtrAlignedBytesaddForeignPtrConcFinalizerForeignPtrContentsPlainForeignPtr MallocPtrPlainPtr Finalizers NoFinalizers CFinalizersHaskellFinalizersaddForeignPtrConcFinalizer_insertHaskellFinalizerinsertCFinalizerensureCFinalizerWeak noMixingErrorforeignPtrFinalizertouch$fShowForeignPtr$fOrdForeignPtr$fEqForeignPtr $fShowIntPtr $fReadIntPtr $fShowWordPtr $fReadWordPtrmemmovecheck$fShowTextEncodingioe_unsupportedOperation HandleType ClosedHandleSemiClosedHandle ReadHandle WriteHandle AppendHandleReadWriteHandle BufferList BufferListNilBufferListConsHandle__haDevicehaType haByteBuffer haBufferMode haLastDecode haCharBuffer haBuffers haEncoder haDecoderhaCodec haInputNL haOutputNL haOtherSide FileHandle DuplexHandleisReadableHandleTypeisWritableHandleTypeisReadWriteHandleTypecheckHandleInvariants showHandle $fShowHandle$fShowHandleType $fEqHandle assertErrorunsupportedOperation AlreadyExists NoSuchThing ResourceBusyResourceExhaustedIllegalOperationPermissionDenied UserErrorUnsatisfiedConstraints SystemError ProtocolError OtherErrorInvalidArgumentInappropriateType HardwareFaultUnsupportedOperation TimeExpiredResourceVanished Interrupted ioe_handleioe_type ioe_locationioe_description ioe_errno ioe_filenameblockedIndefinitelyOnMVarblockedIndefinitelyOnSTMallocationLimitExceeded stackOverflow heapOverflow ioExceptionuntangle$fShowIOException$fShowIOErrorType$fEqIOErrorType$fEqIOException$fExceptionIOException$fExceptionExitCode$fShowArrayException$fShowAsyncException$fExceptionArrayException$fExceptionAsyncException$fExceptionSomeAsyncException$fShowSomeAsyncException$fShowAssertionFailed$fExceptionAssertionFailed$fShowAllocationLimitExceeded"$fExceptionAllocationLimitExceeded$fShowDeadlock$fExceptionDeadlock$fShowBlockedIndefinitelyOnSTM#$fExceptionBlockedIndefinitelyOnSTM$fShowBlockedIndefinitelyOnMVar$$fExceptionBlockedIndefinitelyOnMVar_free_realloc_calloc_malloc failWhenNULLmemcpymemset c_DEBUG_DUMP putDebugMsgnUL cCharSizepeekEncodedCStringwithEncodedCStringnewEncodedCStringtryFillBufferAndCall newArrayLenwNULcWcharsToCharscharsToCWcharscastCWcharToCharcastCharToCWcharstrerror set_errno get_errno $fEqErrno$fShowFd$fReadFd $fShowCRLim $fReadCRLim $fShowCTcflag $fReadCTcflag $fShowCSpeed $fReadCSpeed $fShowCCc $fReadCCc $fShowCUid $fReadCUid $fShowCNlink $fReadCNlink $fShowCGid $fReadCGid $fShowCSsize $fReadCSsize $fShowCPid $fReadCPid $fShowCOff $fReadCOff $fShowCMode $fReadCMode $fShowCIno $fReadCIno $fShowCDev $fReadCDevunrepresentableChar#escapeToRoundtripCharacterSurrogate#unescapeRoundtripCharacterSurrogateioe_decodingErrorioe_encodingErrorutf8_DFutf8_EF utf8_bom_DF utf8_bom_EFutf8_bom_decodeutf8_bom_encodebom0bom1bom2 utf8_decode utf8_encodeord2ord3ord4chr2chr3chr4 validate3 validate4checkInv errorBelchcallStackOverflowHookenabled_capabilitiesc_getNumberOfProcessorsc_setNumCapabilities rts_disableThreadAllocationLimitrts_enableThreadAllocationLimitrts_getThreadAllocationCounterrts_setThreadAllocationCounter cmp_thread getThreadIdid2TSO cmpThread real_handlerunSTMbindSTMthenSTM returnSTMuncaughtExceptionHandler$fEqTVar$fMonadPlusSTM$fAlternativeSTM $fMonadSTM$fApplicativeSTM $fFunctorSTM $fOrdThreadId $fEqThreadId$fShowThreadId$fExceptionNestedAtomically$fShowNestedAtomically$fExceptionNonTermination$fShowNonTermination$fExceptionNoMethodError$fShowNoMethodError$fExceptionRecUpdError$fShowRecUpdError$fExceptionRecConError$fShowRecConError$fExceptionRecSelError$fShowRecSelError$fExceptionPatternMatchFail$fShowPatternMatchFailcatchesHandler$fFunctorHandler'getOrSetGHCConcSignalSignalHandlerStoremaxSigsignal_handlers latin1_DF latin1_EFlatin1_checked_EFascii_DFascii_EFsingle_byte_checked_encodeutf16_DFutf16_EFbomBbomLutf16_native_decodeutf16_native_encode utf16be_DF utf16be_EF utf16le_DF utf16le_EF validate1 validate2utf32_DFutf32_EFbom3utf32_native_decodeutf32_native_encode utf32be_DF utf32be_EF utf32le_DF utf32le_EFvalidate 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_waitpidc_utime c_tcsetattr c_tcgetattr c_sigprocmask c_sigaddset c_sigemptysetc_pipec_mkfifoc_linkc_fork c_fcntl_lock c_fcntl_write c_fcntl_readc_getpidc_unlink c_ftruncate c_safe_writec_writec_umaskc_stat c_safe_readc_read c_safe_openc_openlstatc_lseekc_isattyc_fstatc_dup2c_dupc_creatc_closec_chmodc_accessset_saved_termiosget_saved_termiosputs fdFileSizefileTypefdStatfdType statGetTypeioe_unknownfiletype fdGetMode withFilePath newFilePath peekFilePathpeekFilePathLen setCooked tcSetAttrsetNonBlockingFDsetCloseOnExecs_isregs_ischrs_isblks_isdirs_isfifos_issockmkIconvEncodingIConvc_localeEncodinghs_iconvhs_iconv_close hs_iconv_open iconv_tracelocaleEncodingName haskellChar char_shift iconvEncodingnewIConv iconvDecode iconvEncode iconvRecodeinitFileSystemEncodinginitForeignEncodingmkGlobalmkTextEncoding'unknownEncodingErrgetFullProgArgvrecoveringEncode flushBufferflushCharBufferHandleFinalizer newFileHandle withHandle withHandle' withHandle_ withHandle_'withAllHandles__ withHandle__' do_operationaugmentIOErrorwantWritableHandlewantWritableHandle'checkWritableHandlewantReadableHandlewantReadableHandle_wantReadableHandle'checkReadableHandlewantSeekableHandlecheckSeekableHandleioe_closedHandleioe_EOFioe_notReadableioe_notWritableioe_notSeekableioe_cannotFlushNotSeekableioe_finalizedHandle ioe_bufsiz streamEncodehandleFinalizerdEFAULT_CHAR_BUFFER_SIZE getCharBuffer mkUnBufferflushByteWriteBufferwriteCharBufferflushCharReadBufferflushByteReadBuffermkHandleioModeToHandleTypeinitBufferStateopenTextEncodingcloseTextCodecstrymaybehClose_handle_ noCharBuffer noByteBuffer hLookAhead_debugIOreadTextDevicereadTextDevice'readTextDeviceNonBlocking decodeByteBufMutableByteArray ByteArray unpackCString packCString# packString packStringST packNBytesST new_ps_arraywrite_ps_arrayfreeze_ps_arrayArrsizecopycopy' firstPowerOf2AC allocArray duplicatecapacity unsafeRead unsafeWrite unsafeWrite' unsafeLoadensureCapacityensureCapacity'useAsPtrsnocclearremoveAtgetMonotonicTimegetMonotonicNSec newControl closeControlW controlReadFdcontrolWriteFdcontrolEventFddidRegisterWakeupFdControlMessage CMsgWakeupCMsgDie CMsgSignalc_setIOManagerWakeupFdc_eventfd_write c_eventfdsizeof_siginfo_t wakeupReadFdio_MANAGER_WAKEUPio_MANAGER_DIEreadControlMessage sendWakeupsendDie sendMessageBackend_bePoll _beModifyFd_beModifyFdOnceTimeout EventLifetimeevtClose elSupremummodifyFd modifyFdOncethrowErrnoIfMinus1NoRetry$fMonoidLifetime_beState _beDeleteForeverEL evtNothingeventIs evtCombine evtConcat eventLifetime elLifetimeelEventbackendpoll$fMonoidEventLifetime $fMonoidEvent $fShowEvent epollOneShot EventType unEventType ControlOp eventTypeseventFdEPollFd fromEPollFdEPollepollFd epollEventsc_epoll_wait_unsafe c_epoll_wait c_epoll_ctlc_epoll_create available controlOpAddcontrolOpModifycontrolOpDeleteepollInepollOutepollErrepollHup epollCreate epollControl epollControl_ epollWaitepollWaitNonBlock fromEventtoEvent fromTimeout$fStorableEvent insertWithBucketEmpty bucketKey bucketValue bucketNextITtabArrtabSizeIntTablenew_growindexOf updateWithasInt64 UniqueSourceUS newSource $fShowUniquenewWithshutdownrelease registerFd_ wakeManagercloseFd_ onFdEvent emBackendemFdsemStateemUniqueSource emControlemLockStateCreatedRunningDying ReleasingFinished keyUniqueFdDatafdKeyfdEvents _fdCallbackcallbackArraySizehashFdcallbackTableVar haveOneShothandleControlEventnewDefaultBackendfailOnInvalidFileregisterControlFdfinishedcleanupeventsOf nullToNothingPrioElem singleton toAscList toDescListfindMin deleteMinminViewatMostomegaplay unsafePlaySequTourViewNullSinglePlayLTreeStartLLoserRLoserSizePSQWinnerKeyEkeypriovalue toAscLists toDescLists secondBestatMostssize'maxKeylloserrloserlbalancerbalance lbalanceLeft lbalanceRight rbalanceLeft rbalanceRight lsingleLeft rsingleLeft lsingleRight rsingleRight ldoubleLeft ldoubleRight rdoubleLeft rdoubleRighttourView moduleError emptySequ singleSequ seqToList $fShowSequPollFdpfdFd pfdEvents pfdReventsPoll pollChangespollFd c_poll_unsafec_pollreworkFdpollInpollOutpollErrpollHup$fStorablePollFd TimeoutEdit TimeoutQueue emTimeoutsTK editTimeouts ioManagerLock eventManagerc_setTimerManagerControlFdc_setIOManagerControlFdthreaded-getOrSetSystemTimerThreadIOManagerThreadStore*getOrSetSystemTimerThreadEventManagerStore-getOrSetSystemEventThreadIOManagerThreadStore*getOrSetSystemEventThreadEventManagerStore threadWaitblockedOnBadFD threadWaitSTMgetSystemEventManager_numEnabledEventManagers timerManagertimerManagerThreadVarstartIOManagerThreadsshow_intrestartPollLoopstartIOManagerThreadstartTimerManagerThreadmkFDfdFDfdIsNonBlocking unlockFilelockFileunsafe_fdReadyfdReadydEFAULT_FD_BUFFER_SIZEreadBuf' writeBuf' std_flags output_flags read_flags write_flagsrw_flags append_flagsnonblock_flagsgetUniqueFileInfostdFDsetNonBlockingModefdReadfdReadNonBlockingfdWritefdWriteNonBlockingreadRawBufferPtrreadRawBufferPtrNoBlockwriteRawBufferPtrwriteRawBufferPtrNoBlock isNonBlockingthrowErrnoIfMinus1RetryOnBlock$fBufferedIOFD $fIODeviceFD $fRawIOFD$fShowFDhGetLineBufferedhGetLineBufferedLoopmaybeFillReadBufferunpack unpack_nllazyReadlazyReadBufferedgetSomeCharacters hPutcBufferedhPutStr' hPutCharsgetSpareBuffer writeBlocks commitBuffer commitBuffer'hPutBuf'bufWrite writeChunkwriteChunkNonBlockingbufReadNonEmpty bufReadEmptyhaFDbufReadNBEmptybufReadNBNonEmptycopyToRawBuffercopyFromRawBufferillegalBufferSizehClose_maybethrowhClose_rethrowhClose' dupHandle dupHandle_ioe_dupHandlesNotCompatible dupHandleTo showHandle'$fShowHandlePosn$fEqHandlePosnstdHandleFinalizer setBinaryModeaddFilePathToIOError openFile'dEFAULT_OPEN_IN_BINARY_MODE runMainIOrunIO runIOFastExitrunNonIOshutdownHaskellAndExitshutdownHaskellAndSignalstg_sig_installinstall_interrupt_handler topHandlertopHandlerFastExitdisasterHandlerflushStdHandlessafeExitfastExit unreachable exitHelperexitInterrupted useFastExit useSafeExitOpenNewFileResultNewFileCreated FileExists OpenNewErrorc_rand openTempFile' rand_string openNewFile pathSeparator $fMonadFixST$fMonadFixEither$fMonadFix(->) $fMonadFixIO $fMonadFix[]$fMonadFixMaybe$fArrowLoopKleisli$fArrowLoop(->)$fMonadPlusArrowMonad$fAlternativeArrowMonad$fMonadArrowMonad$fApplicativeArrowMonad$fFunctorArrowMonad$fArrowApplyKleisli$fArrowApply(->)$fArrowChoiceKleisli$fArrowChoice(->)$fArrowPlusKleisli$fArrowZeroKleisli$fArrowKleisli$fCategory*Kleisli $fArrow(->)$fApplicativeZipList$fAlternativeWrappedArrow$fApplicativeWrappedArrow$fFunctorWrappedArrow$fAlternativeWrappedMonad$fApplicativeWrappedMonad$fFunctorWrappedMonad$fApplicativeConst$fFunctorConst$fFoldableConst $fShowConst $fReadConstIdgetIdStateR runStateRStateL runStateL$fApplicativeId $fFunctorId$fApplicativeStateR$fFunctorStateR$fApplicativeStateL$fFunctorStateL$fTraversableConst$fTraversableProxy$fTraversableArray$fTraversable(,)$fTraversableEither$fTraversable[]$fTraversableMaybe getGCStats_ $fIsString[] $fOrdVersion $fEqVersionMpQrQiCONSTID mkPrimType $fEqConstrconrep constring confields confixitydatatypetycondatarepunMpunQrunCONSTunID mkPrimCon falseConstr trueConstr boolDataTypecharType floatType doubleTypeintType integerTypeint8Type int16Type int32Type int64TypewordType word8Type word16Type word32Type word64Type ratioConstr ratioDataType nilConstr consConstr listDataType nothingConstr justConstr maybeDataTypeltConstreqConstrgtConstrorderingDataType leftConstr rightConstreitherDataType tuple0Constrtuple0DataType tuple2Constrtuple2DataType tuple3Constrtuple3DataType tuple4Constrtuple4DataType tuple5Constrtuple5DataType tuple6Constrtuple6DataType tuple7Constrtuple7DataType proxyConstr proxyDataType reflConstrequalityDataTypecoercionConstrcoercionDataType versionConstrversionDataType $fDataVersion$fDataCoercion $fData:~: $fDataProxy $fDataArray$fDataForeignPtr $fDataPtr$fData(,,,,,,) $fData(,,,,,) $fData(,,,,) $fData(,,,) $fData(,,) $fData(,)$fData() $fDataEither$fDataOrdering $fDataMaybe$fData[] $fDataRatio $fDataWord64 $fDataWord32 $fDataWord16 $fDataWord8 $fDataWord $fDataInt64 $fDataInt32 $fDataInt16 $fDataInt8 $fDataInteger $fDataInt $fDataDouble $fDataFloat $fDataChar $fDataBool $fShowConstrtoAnnotationWrapperAnnotationWrapper gcdNatural lcmNatural plusNatural timesNatural minusNatural subWordC#bigNatToNaturalBigNat nullBigNat intToNaturalenumDeltaNaturalenumDeltaToNaturalenumNegDeltaToNaturalnaturalToBigNat naturalToWord naturalToInt naturalType $fDataNatural $fBitsNatural $fIxNatural$fIntegralNatural $fEnumNatural $fRealNatural $fNumNatural $fReadNatural $fShowNaturalTimepeekCStringOptDoTrace TraceNone TraceEventLog TraceStderr DoHeapProfileNoHeapProfiling HeapByCCS HeapByMod HeapByDescr HeapByTypeHeapByRetainer HeapByLDVHeapByClosureType DoCostCentresCostCentresNoneCostCentresSummaryCostCentresVerboseCostCentresAllCostCentresXML GiveGCStats NoGCStatsCollectGCStatsOneLineGCStatsSummaryGCStatsVerboseGCStatsgetTickyFlagsPtrgetTraceFlagsPtrgetProfFlagsPtr getCcFlagsPtrgetDebugFlagsPtrgetMiscFlagsPtrgetConcFlagsPtr getGcFlagsPtr $fEnumDoTrace$fEnumDoHeapProfile$fEnumDoCostCentres$fEnumGiveGCStats MD5Context c_MD5Final c_MD5Update c_MD5InitWrapSWrapNSSymbolSNatEqSymbolEqNat symbolSingnatSingwithSNat withSSymbolTFCo:R:==SymbolabTFCo:R:==Natab$fReadSomeSymbol$fShowSomeSymbol$fOrdSomeSymbol$fEqSomeSymbol $fReadSomeNat $fShowSomeNat $fOrdSomeNat $fEqSomeNat[::]PArr debugBelch$fIsListVersion groupByFB $fIsList[] hs_spt_keyshs_spt_key_count hs_spt_lookupChItemsignalforkOS_createThreadforkOS_entry_reimported forkOS_entryfailNonThreaded unsafeResultS#$fBifunctorConst$fBifunctorEither$fBifunctor(,,,,,,)$fBifunctor(,,,,,)$fBifunctor(,,,,)$fBifunctor(,,,)$fBifunctor(,,)$fBifunctor(,)$fStorableComplex$fFloatingComplex$fFractionalComplex $fNumComplextyFixed conMkFixedwithTypewithResolution chopZerosshowIntegerZeroswithDot convertFixed$fHasResolutionE12$fHasResolutionE9$fHasResolutionE6$fHasResolutionE3$fHasResolutionE2$fHasResolutionE1$fHasResolutionE0 $fReadFixed $fShowFixed$fRealFracFixed$fFractionalFixed $fRealFixed $fNumFixed $fEnumFixed $fDataFixed$fShowIdentity$fReadIdentity$fMonadZipIdentity$fMonadFixIdentity$fMonadIdentity$fApplicativeIdentity$fFunctorIdentity$fFoldableIdentity uniqSource $fReadVoid$fExceptionVoid$fIxVoid $fShowVoid $fOrdVoid$fEqVoidCRUsageclk_tck getrusage realToInteger clockTicksOptKindOptUnreqOptNonOpt EndOfOptsOptErrfmtOptfmtShortfmtLonggetNextlongOptshortOpterrAmbigerrReqerrUnrecerrNoArg$fFunctorArgDescr$fFunctorOptDescr$fFunctorArgOrderreadSymbolicLink c_readlink getEnvBlock c_setProgArgv c_unsetenvc_putenvc_getenv getProgArgvunpackProgNamebasenameioe_missingEnvVarsetEnv_withArgv withProgArgv freeProgArgv setProgArgvdivvycompilerVersionRaw$fEqStableName$fExceptionTimeout $fShowTimeoutUPrintfhsprsprintModifierMapparseIntFormat fixupModsformatIntegraluprintfuprintfsfmt adjustSignedfmtifmtu integral_precstoi adjustmentgetSpecsgetStardfmt $fIsCharChar$fPrintfArgDouble$fPrintfArgFloat$fPrintfArgNatural$fPrintfArgInteger$fPrintfArgWord64$fPrintfArgWord32$fPrintfArgWord16$fPrintfArgWord8$fPrintfArgWord$fPrintfArgInt64$fPrintfArgInt32$fPrintfArgInt16$fPrintfArgInt8$fPrintfArgInt $fPrintfArg[]$fPrintfArgChar$fHPrintfType(->)$fPrintfType(->)$fHPrintfTypeIO$fPrintfTypeIO$fPrintfType[] $fShow(->)