<commit_before>{-# OPTIONS -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module      :  System.Posix.Types
-- Copyright   :  (c) The University of Glasgow 2002
-- License     :  BSD-style (see the file libraries/base/LICENSE)
-- 
-- Maintainer  :  <EMAIL>
-- Stability   :  provisional
-- Portability :  non-portable (requires POSIX)
--
-- POSIX data types: Haskell equivalents of the types defined by the
-- @\<sys/types.h>@ C header on a POSIX system.
--
-----------------------------------------------------------------------------

#include "config.h"

module System.Posix.Types (

  -- * POSIX data types
  CDev(..), CIno(..), CMode(..), COff(..), CPid(..), CSsize(..),

#ifndef mingw32_TARGET_OS
  CGid(..), CNlink(..), CSsize(..), CUid(..), CCc(..), CSpeed(..),
  CTcflag(..),
#endif

  Fd(..),

#ifndef mingw32_TARGET_OS
  LinkCount,
  UserID,
  GroupID,
#endif

  ByteCount,
  ClockTick,
  EpochTime,
  FileOffset,
  ProcessID,
  ProcessGroupID,
  DeviceID,
  FileID,
  FileMode
 ) where

import Foreign
import Foreign.C
import Data.Dynamic
import Data.Bits

#ifdef __GLASGOW_HASKELL__
import GHC.Base
import GHC.Enum
import GHC.Num
import GHC.Real
import GHC.Prim
import GHC.Read
import GHC.Show
#endif

#include "Dynamic.h"
#include "CTypes.h"

NUMERIC_TYPE(CDev,tyConCDev,"CDev",HTYPE_DEV_T)
INTEGRAL_TYPE(CIno,tyConCIno,"CIno",HTYPE_INO_T)
INTEGRAL_TYPE(CMode,tyConCMode,"CMode",HTYPE_MODE_T)
INTEGRAL_TYPE(COff,tyConCOff,"COff",HTYPE_OFF_T)
INTEGRAL_TYPE(CPid,tyConCPid,"CPid",HTYPE_PID_T)

#ifdef mingw32_TARGET_OS
INTEGRAL_TYPE(CSsize,tyConCSsize,"CSsize",HTYPE_SIZE_T)
#else
INTEGRAL_TYPE(CSsize,tyConCSsize,"CSsize",HTYPE_SSIZE_T)
#endif

#ifndef mingw32_TARGET_OS
INTEGRAL_TYPE(CGid,tyConCGid,"CGid",HTYPE_GID_T)<commit_msg>[project @ 2002-09-10 11:36:04 by ross] non-GHC: import Control.Monad (needed by INSTANCE_STORABLE).<commit_after>{-# OPTIONS -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module      :  System.Posix.Types
-- Copyright   :  (c) The University of Glasgow 2002
-- License     :  BSD-style (see the file libraries/base/LICENSE)
-- 
-- Maintainer  :  <EMAIL>
-- Stability   :  provisional
-- Portability :  non-portable (requires POSIX)
--
-- POSIX data types: Haskell equivalents of the types defined by the
-- @\<sys/types.h>@ C header on a POSIX system.
--
-----------------------------------------------------------------------------

#include "config.h"

module System.Posix.Types (

  -- * POSIX data types
  CDev(..), CIno(..), CMode(..), COff(..), CPid(..), CSsize(..),

#ifndef mingw32_TARGET_OS
  CGid(..), CNlink(..), CSsize(..), CUid(..), CCc(..), CSpeed(..),
  CTcflag(..),
#endif

  Fd(..),

#ifndef mingw32_TARGET_OS
  LinkCount,
  UserID,
  GroupID,
#endif

  ByteCount,
  ClockTick,
  EpochTime,
  FileOffset,
  ProcessID,
  ProcessGroupID,
  DeviceID,
  FileID,
  FileMode
 ) where

import Foreign
import Foreign.C
import Data.Dynamic
import Data.Bits

#ifdef __GLASGOW_HASKELL__
import GHC.Base
import GHC.Enum
import GHC.Num
import GHC.Real
import GHC.Prim
import GHC.Read
import GHC.Show
#else
import Control.Monad
#endif

#include "Dynamic.h"
#include "CTypes.h"

NUMERIC_TYPE(CDev,tyConCDev,"CDev",HTYPE_DEV_T)
INTEGRAL_TYPE(CIno,tyConCIno,"CIno",HTYPE_INO_T)
INTEGRAL_TYPE(CMode,tyConCMode,"CMode",HTYPE_MODE_T)
INTEGRAL_TYPE(COff,tyConCOff,"COff",HTYPE_OFF_T)
INTEGRAL_TYPE(CPid,tyConCPid,"CPid",HTYPE_PID_T)

#ifdef mingw32_TARGET_OS
INTEGRAL_TYPE(CSsize,tyConCSsize,"CSsize",HTYPE_SIZE_T)
#else
INTEGRAL_TYPE(CSsize,tyConCSsize,"CSsize",HTYPE_SSIZE_T)
#endif

#ifndef mingw32_TARGET_OS
INTEGRAL_TYPE(CGid,tyConCGid,"CGid",HTYPE_GID_T)
{'fraction_non_alphanumeric': 0.2162379421221865, 'fraction_numerical': 0.010182207931404072, 'mean_word_length': 2.9755058572949946, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5307874', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1430, 'n_words': 266}