1 {-# LANGUAGE NoImplicitPrelude, ForeignFunctionInterface #-}
2 -----------------------------------------------------------------------------
4 -- Module : GHC.Windows
5 -- Copyright : (c) The University of Glasgow, 2009
6 -- License : see libraries/base/LICENSE
8 -- Maintainer : libraries@haskell.org
9 -- Stability : internal
10 -- Portability : non-portable
12 -- Windows functionality used by several modules.
14 -- ToDo: this just duplicates part of System.Win32.Types, which isn't
15 -- available yet. We should move some Win32 functionality down here,
16 -- maybe as part of the grand reorganisation of the base package...
18 -----------------------------------------------------------------------------
20 module GHC.Windows where
27 import Foreign.C.Error (throwErrno)
28 import Foreign.C.Types
34 type LPTSTR = Ptr CWchar
37 iNFINITE = 0xFFFFFFFF -- urgh
39 throwGetLastError :: String -> IO a
40 throwGetLastError where_from = c_maperrno >> throwErrno where_from
42 foreign import ccall unsafe "maperrno" -- in Win32Utils.c