summaryrefslogtreecommitdiff
path: root/libraries/base/System/Posix
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2013-09-15 23:49:32 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2013-09-17 10:41:44 +0200
commit8f9f1009b89a54bcab8354a255f1372803f780ce (patch)
tree3a70900a5917328421472111aae401d832a6c2ae /libraries/base/System/Posix
parent0f5eae0232a86ec57d841a83e6929361e2751270 (diff)
downloadhaskell-8f9f1009b89a54bcab8354a255f1372803f780ce.tar.gz
Make `<Typeable.h>` obsolete and refactor away its use
With GHC 7.8's PolyKinds the macros in `<Typeable.h>` are no longer of any use, and their use is clearly obsolete. The sites using those macros are replaced by auto-derivations of `Typeable` instances. This reduces reliance on the CPP extension and the compile dependency on `Typeable.h` in a couple of modules. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Diffstat (limited to 'libraries/base/System/Posix')
-rw-r--r--libraries/base/System/Posix/Types.hs28
1 files changed, 14 insertions, 14 deletions
diff --git a/libraries/base/System/Posix/Types.hs b/libraries/base/System/Posix/Types.hs
index dd5b98771b..aa159155c0 100644
--- a/libraries/base/System/Posix/Types.hs
+++ b/libraries/base/System/Posix/Types.hs
@@ -106,53 +106,53 @@ import GHC.Show
#include "CTypes.h"
#if defined(HTYPE_DEV_T)
-INTEGRAL_TYPE(CDev,tyConCDev,"CDev",HTYPE_DEV_T)
+INTEGRAL_TYPE(CDev,HTYPE_DEV_T)
#endif
#if defined(HTYPE_INO_T)
-INTEGRAL_TYPE(CIno,tyConCIno,"CIno",HTYPE_INO_T)
+INTEGRAL_TYPE(CIno,HTYPE_INO_T)
#endif
#if defined(HTYPE_MODE_T)
-INTEGRAL_TYPE_WITH_CTYPE(CMode,mode_t,tyConCMode,"CMode",HTYPE_MODE_T)
+INTEGRAL_TYPE_WITH_CTYPE(CMode,mode_t,HTYPE_MODE_T)
#endif
#if defined(HTYPE_OFF_T)
-INTEGRAL_TYPE(COff,tyConCOff,"COff",HTYPE_OFF_T)
+INTEGRAL_TYPE(COff,HTYPE_OFF_T)
#endif
#if defined(HTYPE_PID_T)
-INTEGRAL_TYPE(CPid,tyConCPid,"CPid",HTYPE_PID_T)
+INTEGRAL_TYPE(CPid,HTYPE_PID_T)
#endif
#if defined(HTYPE_SSIZE_T)
-INTEGRAL_TYPE(CSsize,tyConCSsize,"CSsize",HTYPE_SSIZE_T)
+INTEGRAL_TYPE(CSsize,HTYPE_SSIZE_T)
#endif
#if defined(HTYPE_GID_T)
-INTEGRAL_TYPE(CGid,tyConCGid,"CGid",HTYPE_GID_T)
+INTEGRAL_TYPE(CGid,HTYPE_GID_T)
#endif
#if defined(HTYPE_NLINK_T)
-INTEGRAL_TYPE(CNlink,tyConCNlink,"CNlink",HTYPE_NLINK_T)
+INTEGRAL_TYPE(CNlink,HTYPE_NLINK_T)
#endif
#if defined(HTYPE_UID_T)
-INTEGRAL_TYPE(CUid,tyConCUid,"CUid",HTYPE_UID_T)
+INTEGRAL_TYPE(CUid,HTYPE_UID_T)
#endif
#if defined(HTYPE_CC_T)
-ARITHMETIC_TYPE(CCc,tyConCCc,"CCc",HTYPE_CC_T)
+ARITHMETIC_TYPE(CCc,HTYPE_CC_T)
#endif
#if defined(HTYPE_SPEED_T)
-ARITHMETIC_TYPE(CSpeed,tyConCSpeed,"CSpeed",HTYPE_SPEED_T)
+ARITHMETIC_TYPE(CSpeed,HTYPE_SPEED_T)
#endif
#if defined(HTYPE_TCFLAG_T)
-INTEGRAL_TYPE(CTcflag,tyConCTcflag,"CTcflag",HTYPE_TCFLAG_T)
+INTEGRAL_TYPE(CTcflag,HTYPE_TCFLAG_T)
#endif
#if defined(HTYPE_RLIM_T)
-INTEGRAL_TYPE(CRLim,tyConCRlim,"CRLim",HTYPE_RLIM_T)
+INTEGRAL_TYPE(CRLim,HTYPE_RLIM_T)
#endif
-- ToDo: blksize_t, clockid_t, blkcnt_t, fsblkcnt_t, fsfilcnt_t, id_t, key_t
-- suseconds_t, timer_t, useconds_t
-- Make an Fd type rather than using CInt everywhere
-INTEGRAL_TYPE(Fd,tyConFd,"Fd",CInt)
+INTEGRAL_TYPE(Fd,CInt)
-- nicer names, and backwards compatibility with POSIX library:
#if defined(HTYPE_NLINK_T)