Fix for hGetBufSome
authorSimon Marlow <marlowsd@gmail.com>
Wed, 5 May 2010 13:56:37 +0000 (13:56 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 5 May 2010 13:56:37 +0000 (13:56 +0000)
GHC/IO/Handle/Text.hs

index 39482bc..b0f3a24 100644 (file)
@@ -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