From a2c9e6e2854a04c0959bb6879549bc7513f79de9 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 5 May 2010 13:56:37 +0000 Subject: [PATCH] Fix for hGetBufSome --- GHC/IO/Handle/Text.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 1.7.10.4