Skip to content

Commit 593496f

Browse files
committed
Fix the enum instance for IOSubSystem
1 parent 1addabb commit 593496f

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 = 0
475-
fromEnumIoSubSystem IoNative = 1
474+
fromEnumIoSubSystem IoPOSIX = 1
475+
fromEnumIoSubSystem IoNative = 0
476476

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

483483
instance Unbox IoSubSystem where

0 commit comments

Comments
 (0)