[commit: base] master: Minor: replace undefined uses with error as mentioned in ticket #5532 (29ae842)
Ian Lynagh
igloo at earth.li
Thu Oct 6 22:32:27 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/29ae84206a18c155183848932a32d771006f6335
>---------------------------------------------------------------
commit 29ae84206a18c155183848932a32d771006f6335
Author: Ryan Newton <rrnewton at gmail.com>
Date: Thu Oct 6 14:52:59 2011 -0400
Minor: replace undefined uses with error as mentioned in ticket #5532
>---------------------------------------------------------------
Text/Printf.hs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Text/Printf.hs b/Text/Printf.hs
index 021f670..0ef9364 100644
--- a/Text/Printf.hs
+++ b/Text/Printf.hs
@@ -111,12 +111,12 @@ instance (IsChar c) => PrintfType [c] where
instance PrintfType (IO a) where
spr fmts args = do
putStr (uprintf fmts (reverse args))
- return undefined
+ return (error "PrintfType (IO a): result should not be used.")
instance HPrintfType (IO a) where
hspr hdl fmts args = do
hPutStr hdl (uprintf fmts (reverse args))
- return undefined
+ return (error "HPrintfType (IO a): result should not be used.")
instance (PrintfArg a, PrintfType r) => PrintfType (a -> r) where
spr fmts args = \ a -> spr fmts (toUPrintf a : args)
More information about the Cvs-libraries
mailing list