X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FPosix%2FTypes.hs;h=676feadc0572fa18044acc8ea9327858e3de63ec;hb=41e8fba828acbae1751628af50849f5352b27873;hp=7ade7bf0ef4fe992ef5635e17465cd97d66b4737;hpb=ccd0725300e5529db1776c8221c250307f5ff53c;p=ghc-base.git diff --git a/System/Posix/Types.hs b/System/Posix/Types.hs index 7ade7bf..676fead 100644 --- a/System/Posix/Types.hs +++ b/System/Posix/Types.hs @@ -1,4 +1,10 @@ -{-# OPTIONS_GHC -fno-implicit-prelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , MagicHash + , GeneralizedNewtypeDeriving + #-} +{-# OPTIONS_GHC -fno-warn-unused-binds #-} + ----------------------------------------------------------------------------- -- | -- Module : System.Posix.Types @@ -13,8 +19,26 @@ -- @\@ C header on a POSIX system. -- ----------------------------------------------------------------------------- - +#ifdef __NHC__ +#define HTYPE_DEV_T +#define HTYPE_INO_T +#define HTYPE_MODE_T +#define HTYPE_OFF_T +#define HTYPE_PID_T +#define HTYPE_SSIZE_T +#define HTYPE_GID_T +#define HTYPE_NLINK_T +#define HTYPE_UID_T +#define HTYPE_CC_T +#define HTYPE_SPEED_T +#define HTYPE_TCFLAG_T +#define HTYPE_RLIM_T +#define HTYPE_NLINK_T +#define HTYPE_UID_T +#define HTYPE_GID_T +#else #include "HsBaseConfig.h" +#endif module System.Posix.Types ( @@ -84,17 +108,22 @@ module System.Posix.Types ( Limit ) where +#ifdef __NHC__ +import NHC.PosixTypes +import Foreign.C +#else + import Foreign import Foreign.C import Data.Typeable -import Data.Bits +-- import Data.Bits #ifdef __GLASGOW_HASKELL__ import GHC.Base import GHC.Enum import GHC.Num import GHC.Real -import GHC.Prim +-- import GHC.Prim import GHC.Read import GHC.Show #else @@ -163,6 +192,8 @@ type UserID = CUid type GroupID = CGid #endif +#endif /* !__NHC__ */ + type ByteCount = CSize type ClockTick = CClock type EpochTime = CTime @@ -172,5 +203,5 @@ type FileMode = CMode type ProcessID = CPid type FileOffset = COff type ProcessGroupID = CPid -type Limit = CLong +type Limit = CLong