[Git][ghc/ghc][ghc-8.8] Note platform-specific Foreign.C.Types in context

Ben Gamari gitlab at gitlab.haskell.org
Mon Mar 23 20:52:09 UTC 2020



Ben Gamari pushed to branch ghc-8.8 at Glasgow Haskell Compiler / GHC


Commits:
4299f090 by Viktor Dukhovni at 2020-03-17T09:02:24-04:00
Note platform-specific Foreign.C.Types in context

Also fix the markup in the general note at the top of the module.  Haddock
(usability trade-off), does not support multi-line emphasised text.

- - - - -


1 changed file:

- libraries/base/Foreign/C/Types.hs


Changes:

=====================================
libraries/base/Foreign/C/Types.hs
=====================================
@@ -27,11 +27,11 @@ module Foreign.C.Types
         ( -- * Representations of C types
           -- $ctypes
 
-          -- ** Platform differences
+          -- ** #platform# Platform differences
           -- | This module contains platform specific information about types.
-          --   __/As such the types presented on this page reflect the platform
-          --   on which the documentation was generated and may not coincide with
-          --   the types on your platform./__
+          -- __/As such, the types presented on this page reflect the/__
+          -- __/platform on which the documentation was generated and may/__
+          -- __/not coincide with the types on your platform./__
 
           -- ** Integral types
           -- | These types are represented as @newtype at s of
@@ -105,33 +105,45 @@ import GHC.Num
 #include "CTypes.h"
 
 -- | Haskell type representing the C @char@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CChar,HTYPE_CHAR)
 -- | Haskell type representing the C @signed char@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CSChar,HTYPE_SIGNED_CHAR)
 -- | Haskell type representing the C @unsigned char@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CUChar,HTYPE_UNSIGNED_CHAR)
 
 -- | Haskell type representing the C @short@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CShort,HTYPE_SHORT)
 -- | Haskell type representing the C @unsigned short@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CUShort,HTYPE_UNSIGNED_SHORT)
 
 -- | Haskell type representing the C @int@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CInt,HTYPE_INT)
 -- | Haskell type representing the C @unsigned int@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CUInt,HTYPE_UNSIGNED_INT)
 
 -- | Haskell type representing the C @long@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CLong,HTYPE_LONG)
 -- | Haskell type representing the C @unsigned long@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CULong,HTYPE_UNSIGNED_LONG)
 
 -- | Haskell type representing the C @long long@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CLLong,HTYPE_LONG_LONG)
 -- | Haskell type representing the C @unsigned long long@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CULLong,HTYPE_UNSIGNED_LONG_LONG)
 
 -- | Haskell type representing the C @bool@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 --
 -- @since 4.10.0.0
 INTEGRAL_TYPE_WITH_CTYPE(CBool,bool,HTYPE_BOOL)
@@ -164,8 +176,10 @@ INTEGRAL_TYPE_WITH_CTYPE(CBool,bool,HTYPE_BOOL)
  #-}
 
 -- | Haskell type representing the C @float@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 FLOATING_TYPE(CFloat,HTYPE_FLOAT)
 -- | Haskell type representing the C @double@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 FLOATING_TYPE(CDouble,HTYPE_DOUBLE)
 -- XXX GHC doesn't support CLDouble yet
 
@@ -182,12 +196,16 @@ FLOATING_TYPE(CDouble,HTYPE_DOUBLE)
 -- "realToFrac/CLDouble->a"  realToFrac = \(CLDouble x) -> realToFrac x
 
 -- | Haskell type representing the C @ptrdiff_t@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CPtrdiff,HTYPE_PTRDIFF_T)
 -- | Haskell type representing the C @size_t@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CSize,HTYPE_SIZE_T)
 -- | Haskell type representing the C @wchar_t@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CWchar,HTYPE_WCHAR_T)
 -- | Haskell type representing the C @sig_atomic_t@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 INTEGRAL_TYPE(CSigAtomic,HTYPE_SIG_ATOMIC_T)
 
 {-# RULES
@@ -203,25 +221,32 @@ INTEGRAL_TYPE(CSigAtomic,HTYPE_SIG_ATOMIC_T)
  #-}
 
 -- | Haskell type representing the C @clock_t@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 ARITHMETIC_TYPE(CClock,HTYPE_CLOCK_T)
 -- | Haskell type representing the C @time_t@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 ARITHMETIC_TYPE(CTime,HTYPE_TIME_T)
 -- | Haskell type representing the C @useconds_t@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 --
 -- @since 4.4.0.0
 
 ARITHMETIC_TYPE(CUSeconds,HTYPE_USECONDS_T)
 -- | Haskell type representing the C @suseconds_t@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 --
 -- @since 4.4.0.0
 ARITHMETIC_TYPE(CSUSeconds,HTYPE_SUSECONDS_T)
 
 -- FIXME: Implement and provide instances for Eq and Storable
 -- | Haskell type representing the C @FILE@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 data CFile = CFile
 -- | Haskell type representing the C @fpos_t@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 data CFpos = CFpos
 -- | Haskell type representing the C @jmp_buf@ type.
+-- /(The concrete types of "Foreign.C.Types#platform" are platform-specific.)/
 data CJmpBuf = CJmpBuf
 
 INTEGRAL_TYPE(CIntPtr,HTYPE_INTPTR_T)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4299f090f6b376f44674224495838a9e2b7ce858

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4299f090f6b376f44674224495838a9e2b7ce858
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/20200323/35b33894/attachment-0001.html>


More information about the ghc-commits mailing list