[Git][ghc/ghc][master] 2 commits: users-guide: Fix a few markup issues
Marge Bot
gitlab at gitlab.haskell.org
Thu Jun 13 06:51:18 UTC 2019
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
70b5eefe by Ben Gamari at 2019-06-13T06:51:13Z
users-guide: Fix a few markup issues
Strangely these were only causing the build to fail in the aarch64-linux
job, despite Sphinx throwing errors in all jobs I checked.
Also changes some `#ifdef`s to `#if defined` to satisfy the linter.
- - - - -
9721b40d by Ben Gamari at 2019-06-13T06:51:13Z
gitlab-ci: Don't build PDF user's guide on AArch64
For reasons I don't understand sphinx seems to fail to produce a .idx
file for makeindex.
- - - - -
3 changed files:
- .gitlab-ci.yml
- docs/users_guide/ffi-chap.rst
- docs/users_guide/ghci.rst
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -376,6 +376,8 @@ validate-x86_64-darwin:
variables:
TEST_ENV: "aarch64-linux-deb9"
BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-aarch64-linux-deb9.tar.xz"
+ # Inexplicably makeindex fails
+ BUILD_SPHINX_PDF: "NO"
cache:
key: linux-aarch64-deb9
tags:
=====================================
docs/users_guide/ffi-chap.rst
=====================================
@@ -87,7 +87,7 @@ Newtype wrapping of the IO monad
The FFI spec requires the IO monad to appear in various places, but it
can sometimes be convenient to wrap the IO monad in a ``newtype``, thus: ::
- newtype MyIO a = MIO (IO a)
+ newtype MyIO a = MIO (IO a)
(A reason for doing so might be to prevent the programmer from calling
arbitrary IO procedures in some part of the program.)
@@ -112,15 +112,15 @@ The type variables in the type of a foreign declaration may be quantified with
an explicit ``forall`` by using the :extension:`ExplicitForAll` language
extension, as in the following example: ::
- {-# LANGUAGE ExplicitForAll #-}
- foreign import ccall "mmap" c_mmap :: forall a. CSize -> IO (Ptr a)
+ {-# LANGUAGE ExplicitForAll #-}
+ foreign import ccall "mmap" c_mmap :: forall a. CSize -> IO (Ptr a)
Note that an explicit ``forall`` must appear at the front of the type signature
and is not permitted to appear nested within the type, as in the following
(erroneous) examples: ::
- foreign import ccall "mmap" c_mmap' :: CSize -> forall a. IO (Ptr a)
- foreign import ccall quux :: (forall a. Ptr a) -> IO ()
+ foreign import ccall "mmap" c_mmap' :: CSize -> forall a. IO (Ptr a)
+ foreign import ccall quux :: (forall a. Ptr a) -> IO ()
.. _ffi-prim:
@@ -372,7 +372,7 @@ program. Here's the C code:
#include <stdio.h>
#include "HsFFI.h"
- #ifdef __GLASGOW_HASKELL__
+ #if defined(__GLASGOW_HASKELL__)
#include "Foo_stub.h"
#endif
@@ -391,7 +391,7 @@ program. Here's the C code:
}
We've surrounded the GHC-specific bits with
-``#ifdef __GLASGOW_HASKELL__``; the rest of the code should be portable
+``#if defined(__GLASGOW_HASKELL__)``; the rest of the code should be portable
across Haskell implementations that support the FFI standard.
The call to ``hs_init()`` initializes GHC's runtime system. Do NOT try
@@ -435,7 +435,7 @@ GHC-specific API instead of ``hs_init()``:
#include <stdio.h>
#include "HsFFI.h"
- #ifdef __GLASGOW_HASKELL__
+ #if defined(__GLASGOW_HASKELL__)
#include "Foo_stub.h"
#include "Rts.h"
#endif
=====================================
docs/users_guide/ghci.rst
=====================================
@@ -2582,21 +2582,22 @@ commonly used commands.
For example:
.. code-block:: none
- >:instances Maybe (Maybe Int)
- instance Eq (Maybe (Maybe Int)) -- Defined in ‘GHC.Maybe’
- instance Ord (Maybe (Maybe Int)) -- Defined in ‘GHC.Maybe’
- instance Show (Maybe (Maybe Int)) -- Defined in ‘GHC.Show’
- instance Read (Maybe (Maybe Int)) -- Defined in ‘GHC.Read’
-
- >:set -XPartialTypeSignatures -fno-warn-partial-type-signatures
-
- >:instances Maybe _
- instance Eq _ => Eq (Maybe _) -- Defined in ‘GHC.Maybe’
- instance Semigroup _ => Monoid (Maybe _) -- Defined in ‘GHC.Base’
- instance Ord _ => Ord (Maybe _) -- Defined in ‘GHC.Maybe’
- instance Semigroup _ => Semigroup (Maybe _) -- Defined in ‘GHC.Base’
- instance Show _ => Show (Maybe _) -- Defined in ‘GHC.Show’
- instance Read _ => Read (Maybe _) -- Defined in ‘GHC.Read’
+
+ > :instances Maybe (Maybe Int)
+ instance Eq (Maybe (Maybe Int)) -- Defined in ‘GHC.Maybe’
+ instance Ord (Maybe (Maybe Int)) -- Defined in ‘GHC.Maybe’
+ instance Show (Maybe (Maybe Int)) -- Defined in ‘GHC.Show’
+ instance Read (Maybe (Maybe Int)) -- Defined in ‘GHC.Read’
+
+ > :set -XPartialTypeSignatures -fno-warn-partial-type-signatures
+
+ > :instances Maybe _
+ instance Eq _ => Eq (Maybe _) -- Defined in ‘GHC.Maybe’
+ instance Semigroup _ => Monoid (Maybe _) -- Defined in ‘GHC.Base’
+ instance Ord _ => Ord (Maybe _) -- Defined in ‘GHC.Maybe’
+ instance Semigroup _ => Semigroup (Maybe _) -- Defined in ‘GHC.Base’
+ instance Show _ => Show (Maybe _) -- Defined in ‘GHC.Show’
+ instance Read _ => Read (Maybe _) -- Defined in ‘GHC.Read’
.. ghci-cmd:: :main; ⟨arg1⟩ ... ⟨argn⟩
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/35113117436c4936d97aae90693b93206d9ff213...9721b40db9b87c0135613649f9f1e129eb49795b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/35113117436c4936d97aae90693b93206d9ff213...9721b40db9b87c0135613649f9f1e129eb49795b
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190613/7dec7215/attachment-0001.html>
More information about the ghc-commits
mailing list