Skip to content

Commit b074d93

Browse files
committed
Revert "Fix the enum instance for IOSubSystem"
This reverts commit a07a951.
1 parent 2912ca3 commit b074d93

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/Streamly/Internal/Data/Unbox.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,13 +471,13 @@ instance Unbox () where
471471

472472
{-# INLINE fromEnumIoSubSystem #-}
473473
fromEnumIoSubSystem :: IoSubSystem -> Int
474-
fromEnumIoSubSystem IoPOSIX = 1
475-
fromEnumIoSubSystem IoNative = 0
474+
fromEnumIoSubSystem IoPOSIX = 0
475+
fromEnumIoSubSystem IoNative = 1
476476

477477
{-# INLINE toEnumIoSubSystem #-}
478478
toEnumIoSubSystem :: Int -> IoSubSystem
479-
toEnumIoSubSystem 0 = IoNative
480-
toEnumIoSubSystem 1 = IoPOSIX
479+
toEnumIoSubSystem 0 = IoPOSIX
480+
toEnumIoSubSystem 1 = IoNative
481481
toEnumIoSubSystem val = error $ show val ++ ": Invalid tag for IoSubSystem"
482482

483483
instance Unbox IoSubSystem where

0 commit comments

Comments
 (0)