module System.Win32.Error.Mapping
  ( mapping
  ) where

import Language.Haskell.TH (mkName, Name)

import System.Win32.Types (DWORD)

mapping :: [(DWORD, Name)]
mapping :: [(DWORD, Name)]
mapping = ((DWORD, String) -> (DWORD, Name))
-> [(DWORD, String)] -> [(DWORD, Name)]
forall a b. (a -> b) -> [a] -> [b]
map ((String -> Name) -> (DWORD, String) -> (DWORD, Name)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap String -> Name
mkName) ([(DWORD, String)] -> [(DWORD, Name)])
-> [(DWORD, String)] -> [(DWORD, Name)]
forall a b. (a -> b) -> a -> b
$
    [ -- INVALID_HANDLE_VALUE is -1 for compatibility with 16-bit windows
      (Int -> DWORD
forall a b. (Integral a, Num b) => a -> b
fromIntegral (-Int
1 :: Int), String
"InvalidHandleValue")
    , (DWORD
0x00000000, String
"Success")
    , (DWORD
0x00000002, String
"FileNotFound")
    , (DWORD
0x00000003, String
"PathNotFound")
    , (DWORD
0x00000005, String
"AccessDenied")
    , (DWORD
0x00000006, String
"InvalidHandle")
    , (DWORD
0x0000000d, String
"InvalidData")
    , (DWORD
0x0000000f, String
"InvalidDrive")
    , (DWORD
0x00000010, String
"CurrentDirectory")
    , (DWORD
0x00000012, String
"NoMoreFiles")
    , (DWORD
0x00000078, String
"CallNotImplemented")
    , (DWORD
0x000000ea, String
"MoreData")
    , (DWORD
0x00000103, String
"NoMoreItems")
    , (DWORD
0x00000420, String
"ServiceAlreadyRunning")
    , (DWORD
0x00000422, String
"ServiceDisabled")
    , (DWORD
0x00000424, String
"ServiceDoesNotExist")
    , (DWORD
0x00000425, String
"ServiceCannotAcceptCtrl")
    , (DWORD
0x00000426, String
"ServiceNotActive")
    , (DWORD
0x00000427, String
"FailedServiceControllerConnect")
    , (DWORD
0x00000428, String
"ExceptionInService")
    , (DWORD
0x0000042a, String
"ServiceSpecificError")
    , (DWORD
0x0000043b, String
"ServiceNotInExe")
    , (DWORD
0x000006ba, String
"RPCSServerUnavailable")
    , (DWORD
0x000006bb, String
"RPCSServerTooBusy")
    , (DWORD
0x00001126, String
"NotAReparsePoint")
    , (DWORD
0x00004e25, String
"DhcpSubnetNotPresent")
    , (DWORD
0x00004e27, String
"DhcpElementCantRemove")
    , (DWORD
0x00004e2a, String
"DhcpOptionNotPresent")
    , (DWORD
0x00004e2d, String
"DhcpJetError")
    , (DWORD
0x00004e32, String
"DhcpNotReservedClient")
    , (DWORD
0x00004e33, String
"DhcpReservedClient")
    , (DWORD
0x00004e35, String
"DhcpIprangeExists")
    , (DWORD
0x00004e36, String
"DhcpReservedipExists")
    , (DWORD
0x00004e37, String
"DhcpInvalidRange")
    , (DWORD
0x00004e51, String
"DhcpIprangeConvIllegal")
    , (DWORD
0x00004e90, String
"ScopeRangePolicyRangeConflict")
    , (DWORD
0x00004ea1, String
"DhcpFoIprangeTypeConvIllegal")
    ]