1
1
mirror of https://github.com/github/semantic.git synced 2025-01-01 19:55:34 +03:00

Derive Eq & Show instances for Handle.

This commit is contained in:
Rob Rix 2018-05-14 10:28:58 -04:00
parent b979e9757c
commit 436063142c

View File

@ -221,6 +221,9 @@ data Handle mode where
ReadHandle :: IO.Handle -> Handle 'IO.ReadMode
WriteHandle :: IO.Handle -> Handle 'IO.WriteMode
deriving instance Eq (Handle mode)
deriving instance Show (Handle mode)
getHandle :: Handle mode -> IO.Handle
getHandle (ReadHandle handle) = handle
getHandle (WriteHandle handle) = handle