packages feed

handle-like 0.0.0.3 → 0.0.0.4

raw patch · 2 files changed

+5/−5 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.HandleLike: class Monad (HandleMonad h) => HandleLike h where type family HandleMonad h hlGetByte h = do { [b] <- unpack `liftM` hlGet h 1; return b } hlGetLine h = do { b <- hlGetByte h; case b of { 10 -> return "" _ -> cons b `liftM` hlGetLine h } } hlGetContent = flip hlGet 1 hlError = hlPut
+ Data.HandleLike: class Monad (HandleMonad h) => HandleLike h where type family HandleMonad h hlGetByte h = do { [b] <- unpack `liftM` hlGet h 1; return b } hlGetLine h = do { b <- hlGetByte h; case b of { 10 -> return "" _ -> cons b `liftM` hlGetLine h } } hlGetContent = flip hlGet 1 hlError _ msg = error $ unpack msg
- Data.HandleLike: hlError :: HandleLike h => h -> ByteString -> HandleMonad h ()
+ Data.HandleLike: hlError :: HandleLike h => h -> ByteString -> HandleMonad h a

Files

handle-like.cabal view
@@ -2,7 +2,7 @@ build-type:	Simple  name:		handle-like-version:	0.0.0.3+version:	0.0.0.4 stability:	Experimental author:		Yoshikuni Jujo <PAF01143@nifty.ne.jp> maintainer:	Yoshikuni Jujo <PAF01143@nifty.ne.jp>@@ -23,7 +23,7 @@     >     hlGetLine :: h -> HandleMonad h ByteString     >     hlGetContent :: h -> HandleMonad h ByteString     >     hlClose :: h -> HandleMonad h ()-    >     hlError :: h -> ByteString -> HandleMonad h ()+    >     hlError :: h -> ByteString -> HandleMonad h a     .      Minimal complete difinition: hlPut, hlGet and hlClose.@@ -35,7 +35,7 @@ source-repository	this     type:	git     location:	git://github.com/YoshikuniJujo/forest-    tag:	handle-like-0.0.0.1+    tag:	handle-like-0.0.0.4  library     hs-source-dirs:	src
src/Data/HandleLike.hs view
@@ -16,7 +16,7 @@ 	hlGetLine :: h -> HandleMonad h BS.ByteString 	hlGetContent :: h -> HandleMonad h BS.ByteString 	hlClose :: h -> HandleMonad h ()-	hlError :: h -> BS.ByteString -> HandleMonad h ()+	hlError :: h -> BS.ByteString -> HandleMonad h a  	hlGetByte h = do [b] <- BS.unpack `liftM` hlGet h 1; return b 	hlGetLine h = do@@ -25,7 +25,7 @@ 			10 -> return "" 			_ -> BS.cons b `liftM` hlGetLine h 	hlGetContent = flip hlGet 1-	hlError = hlPut+	hlError _ msg = error $ BSC.unpack msg  instance HandleLike Handle where 	type HandleMonad Handle = IO