Repository : ssh://darcs.haskell.org//srv/darcs/nofib On branch : master
http://hackage.haskell.org/trac/ghc/changeset/9f9d5dfc143803364f8a7853ec77d6677abc1b21 >--------------------------------------------------------------- commit 9f9d5dfc143803364f8a7853ec77d6677abc1b21 Author: Ian Lynagh <i...@well-typed.com> Date: Wed Dec 12 01:40:45 2012 +0000 Detabbing >--------------------------------------------------------------- spectral/mandel/Main.lhs | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/spectral/mandel/Main.lhs b/spectral/mandel/Main.lhs index 5783a81..b0e5496 100644 --- a/spectral/mandel/Main.lhs +++ b/spectral/mandel/Main.lhs @@ -5,25 +5,25 @@ import Mandel import PortablePixmap import System.IO -main = getContents >>= \ userInput -> - readNum "Enter min x = " (lines userInput) $ \ minx input -> - readNum "Enter min y = " input $ \ miny input -> - readNum "Enter max x = " input $ \ maxx input -> - readNum "Enter max y = " input $ \ maxy input -> - readNum "Screen width = " input $ \ screenX input -> - readNum "Screen height= " input $ \ screenY input -> - readNum "Screen depth = " input $ \ limit _ -> - putStr (show (mandelset minx miny maxx maxy screenX screenY limit)) +main = getContents >>= \ userInput -> + readNum "Enter min x = " (lines userInput) $ \ minx input -> + readNum "Enter min y = " input $ \ miny input -> + readNum "Enter max x = " input $ \ maxx input -> + readNum "Enter max y = " input $ \ maxy input -> + readNum "Screen width = " input $ \ screenX input -> + readNum "Screen height= " input $ \ screenY input -> + readNum "Screen depth = " input $ \ limit _ -> + putStr (show (mandelset minx miny maxx maxy screenX screenY limit)) readNum::(Num a, Read a) => String -> [String] -> (a->[String]->IO ()) -> IO () readNum prompt inputLines succ = hPutStr stderr prompt >> case inputLines of (x:xs) -> case (reads x) of - [(y,"")] -> succ y xs - _ -> hPutStr stderr "Error - retype the number\n" >> - readNum prompt xs succ - _ -> hPutStr stderr "Early EOF" + [(y,"")] -> succ y xs + _ -> hPutStr stderr "Error - retype the number\n" >> + readNum prompt xs succ + _ -> hPutStr stderr "Early EOF" {- Enter min x = -1.5 _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc