[Git][ghc/ghc][wip/backports-9.4] 2 commits: Revert "base: Move CString, CStringLen to GHC.Foreign"

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Nov 3 20:50:06 UTC 2022



Ben Gamari pushed to branch wip/backports-9.4 at Glasgow Haskell Compiler / GHC


Commits:
8f8dba01 by Ben Gamari at 2022-11-02T21:38:59-04:00
Revert "base: Move CString, CStringLen to GHC.Foreign"

This reverts commit 5ec22f0135483ea8a8a543c53dcc7f9d7f6a8dea.

- - - - -
20712855 by Ben Gamari at 2022-11-03T16:49:43-04:00
Set RELEASE=NO

- - - - -


3 changed files:

- configure.ac
- libraries/base/Foreign/C/String.hs
- libraries/base/GHC/Foreign.hs


Changes:

=====================================
configure.ac
=====================================
@@ -13,7 +13,7 @@ dnl
 # see what flags are available. (Better yet, read the documentation!)
 #
 
-AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.4.3], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
+AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.4.4], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
     # Version on master must be X.Y (not X.Y.Z) for ProjectVersionMunged variable
     # to be useful (cf #19058). However, the version must have three components
     # (X.Y.Z) on stable branches (e.g. ghc-9.2) to ensure that pre-releases are
@@ -22,7 +22,7 @@ AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.4.3], [glasgow-has
 AC_CONFIG_MACRO_DIRS([m4])
 
 # Set this to YES for a released version, otherwise NO
-: ${RELEASE=YES}
+: ${RELEASE=NO}
 
 # The primary version (e.g. 7.5, 7.4.1) is set in the AC_INIT line
 # above.  If this is not a released version, then we will append the


=====================================
libraries/base/Foreign/C/String.hs
=====================================
@@ -110,11 +110,20 @@ import GHC.Base
 
 import {-# SOURCE #-} GHC.IO.Encoding
 import qualified GHC.Foreign as GHC
-import GHC.Foreign (CString, CStringLen)
 
 -----------------------------------------------------------------------------
 -- Strings
 
+-- representation of strings in C
+-- ------------------------------
+
+-- | A C string is a reference to an array of C characters terminated by NUL.
+type CString    = Ptr CChar
+
+-- | A string with explicit length information in bytes instead of a
+-- terminating NUL (allowing NUL characters in the middle of the string).
+type CStringLen = (Ptr CChar, Int)
+
 -- exported functions
 -- ------------------
 --


=====================================
libraries/base/GHC/Foreign.hs
=====================================
@@ -19,7 +19,6 @@
 
 module GHC.Foreign (
     -- * C strings with a configurable encoding
-    CString, CStringLen,
 
     -- conversion of C strings into Haskell strings
     --
@@ -75,11 +74,8 @@ putDebugMsg | c_DEBUG_DUMP = debugLn
             | otherwise    = const (return ())
 
 
--- | A C string is a reference to an array of C characters terminated by NUL.
+-- These definitions are identical to those in Foreign.C.String, but copied in here to avoid a cycle:
 type CString    = Ptr CChar
-
--- | A string with explicit length information in bytes instead of a
--- terminating NUL (allowing NUL characters in the middle of the string).
 type CStringLen = (Ptr CChar, Int)
 
 -- exported functions



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f4200e2219606e73d051f0e2de98cf75d72bd683...2071285563fc705917873704a52eb4f6dd337651

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f4200e2219606e73d051f0e2de98cf75d72bd683...2071285563fc705917873704a52eb4f6dd337651
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/20221103/c36bea2a/attachment-0001.html>


More information about the ghc-commits mailing list