From: Simon Marlow Date: Wed, 5 May 2010 13:56:37 +0000 (+0000) Subject: Fix for hGetBufSome X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=a2c9e6e2854a04c0959bb6879549bc7513f79de9;p=ghc-base.git Fix for hGetBufSome --- diff --git a/GHC/IO/Handle/Text.hs b/GHC/IO/Handle/Text.hs index 39482bc..b0f3a24 100644 --- a/GHC/IO/Handle/Text.hs +++ b/GHC/IO/Handle/Text.hs @@ -911,8 +911,8 @@ hGetBufSome h ptr count bufReadNBEmpty h_ buf (castPtr ptr) 0 count haFD :: Handle__ -> FD -haFD h_@Handle__{} = - case cast h_ of +haFD h_@Handle__{..} = + case cast haDevice of Nothing -> error "not an FD" Just fd -> fd