Skip to content
Snippets Groups Projects
Commit 8f8dba01 authored by Ben Gamari's avatar Ben Gamari
Browse files

Revert "base: Move CString, CStringLen to GHC.Foreign"

This reverts commit 5ec22f01.
parent f4200e22
No related branches found
No related tags found
No related merge requests found
......@@ -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
-- ------------------
--
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment