From 2f4e21c6f741995e20cc3b53b109ff9edf18eb3c Mon Sep 17 00:00:00 2001 From: "sven.panne@aedion.de" Date: Wed, 7 Feb 2007 16:19:27 +0000 Subject: [PATCH] Make the User's Guide DocBook XML 4.2 conformant again --- docs/users_guide/ghci.xml | 42 ++++++++++++++++++------------------- docs/users_guide/glasgow_exts.xml | 17 +++++++-------- docs/users_guide/using.xml | 17 ++++++++------- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml index 5f38b37..d82127d 100644 --- a/docs/users_guide/ghci.xml +++ b/docs/users_guide/ghci.xml @@ -966,7 +966,7 @@ $ ghci -lm :continue :continue - Shortcut to :breakpoint continue + Shortcut to :breakpoint continue @@ -1623,7 +1623,7 @@ Local bindings in scope: qsort2.hs:2:15-46> What is happening here is that GHCi has interrupted the evaluation of - qsort at the breakpoint set in line 2, as the prompt indicates. + qsort at the breakpoint set in line 2, as the prompt indicates. At this point you can freely explore the contents of the bindings in scope, but with two catches. First, take into account that due to the lazy nature of Haskell, some of @@ -1631,9 +1631,9 @@ qsort2.hs:2:15-46> trigger a computation. Second: look at the types of the things in scope. GHCi has left its types parameterised by a variable! - Look at the type of qsort, which is + Look at the type of qsort, which is polymorphic on the type of its argument. It does not - tell us really what the types of x and xs can be. + tell us really what the types of x and xs can be. In general, polymorphic programs deal with polymorphic values, and this means that some of the bindings available in a breakpoint site will be parametrically typed. @@ -1644,11 +1644,11 @@ qsort2.hs:2:15-46> This is useful because you cannot just type x in the prompt and expect GHCi to return you its value. Perhaps you know for sure that - x is of type Int, which is an instance of - Show, but GHCi does not have this information. - :print however is fine, because it does not need to know the + x is of type Int, which is an instance of + Show, but GHCi does not have this information. + :print however is fine, because it does not need to know the type to do its work. - Let's go on with the debugging session of the qsort + Let's go on with the debugging session of the qsort example: A short debugging session @@ -1674,22 +1674,22 @@ x :: Int GHCi reminds us that this value is untyped, and instructs us to force its evaluation - This line forces the evaluation of x + This line forces the evaluation of x Even though x has been evaluated, we cannot simply use its name to see its value! This is a bit counterintuitive, but currently in GHCi the type of a binding - cannot be a type variable a. - Thus, the binding x gets assigned the concrete type Unknown. + cannot be a type variable a. + Thus, the binding x gets assigned the concrete type Unknown. - We can explore x using the :print - command, which does find out that x is of type Int and prints + We can explore x using the :print + command, which does find out that x is of type Int and prints its value accordingly. - :print also updates the type of x with - the most concrete type information available. + :print also updates the type of x with + the most concrete type information available. The example shows the standard way to proceeed with polymorphic values in a breakpoint. @@ -1784,7 +1784,7 @@ x :: Int - are only available + Implicit parameters (see ) are only available at the scope of a breakpoint if there is a explicit type signature. @@ -1804,13 +1804,13 @@ x :: Int {-# OPTIONS_GHC -fdebugging #-} - * Repeated use of seq and + * Repeated use of seq and :print may be necessary to observe unevaluated untyped bindings see - * GHC.Exts.unsafeCoerce can help if you are positive about the type of a binding + * GHC.Exts.unsafeCoerce can help if you are positive about the type of a binding type MyLongType a = [Maybe [Maybe a]] @@ -1828,8 +1828,8 @@ Main.hs:15> x' * The undocumented (and unsupported) :force command equivalent to :print with automatic - seq forcing, - may prove useful to replace sequences of seq and + seq forcing, + may prove useful to replace sequences of seq and :print in some situations. @@ -1975,7 +1975,7 @@ Main.hs:15> x' I can't use Control-C to interrupt computations in GHCi on Windows. - See . + See diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 8bca485..e680d6c 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -1226,7 +1226,7 @@ that collection of packages in a uniform manner. You can express quite a bit of object-oriented-like programming this way. - + Why existential? @@ -1249,9 +1249,9 @@ But Haskell programmers can safely think of the ordinary adding a new existential quantification construct. - + - + Type classes @@ -1311,9 +1311,9 @@ Notice the way that the syntax fits smoothly with that used for universal quantification earlier. - + - + Record Constructors @@ -1376,10 +1376,10 @@ setTag obj t = obj{ tag = t } - + - + Restrictions @@ -1530,7 +1530,7 @@ declarations. Define your own instances! - + @@ -3492,7 +3492,6 @@ including an operational type class context, is legal: On the left or right (see f4, for example) of a function arrow - On the right of a function arrow (see ) As the argument of a constructor, or type of a field, in a data type declaration. For example, any of the f1,f2,f3,g1,g2 above would be valid field type signatures. diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index f6afa3c..72f53b7 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -343,10 +343,11 @@ module X where - ghc --version ghc -V + ghc --version + ghc -V + - Print a one-line string including GHC's version number. @@ -356,9 +357,9 @@ module X where - ghc --numeric-version + ghc --numeric-version + - Print GHC's numeric version number only. @@ -368,9 +369,9 @@ module X where - ghc --print-libdir + ghc --print-libdir + - Print the path to GHC's library directory. This is @@ -630,8 +631,8 @@ ghc -c Foo.hs help options verbosity options - See also the , , , - and modes in . + See also the , , , + and modes in . -- 1.7.10.4