[Haskell-cafe] Re: [newbie] How to test this function?

2006-09-21 Thread Bruno Martínez
On Thu, 21 Sep 2006 01:52:38 -0300, Donald Bruce Stewart [EMAIL PROTECTED] wrote: First, how do I fix the identation of the if then else? getList = find 5 where find 0 = return [] find n = do ch - getChar if ch `elem` ['a'..'e'] then do

[Haskell-cafe] Re: Re: [newbie] How to test this function?

2006-09-21 Thread Bruno Martínez
On Thu, 21 Sep 2006 11:20:33 -0300, Henning Thielemann [EMAIL PROTECTED] wrote: On Thu, 21 Sep 2006, Bruno Martínez wrote: getList :: IO [Char] getList = take5 `fmap` getContents -- a thin IO skin take5 :: [Char] - [Char] take5 = take 5 . filter (`elem` ['a'..'e

Re: [Haskell-cafe] [newbie] How to test this function?

2006-09-21 Thread Bruno Martínez
On Thu, 21 Sep 2006 05:30:34 -0300, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Bruno, Thursday, September 21, 2006, 8:28:23 AM, you wrote: First, how do I fix the identation of the if then else? http://haskell.org/haskellwiki/IO_inside contains a lot of information about using IO monad

[Haskell-cafe] Re: [newbie] How to test this function?

2006-09-21 Thread Bruno Martínez
On Thu, 21 Sep 2006 15:12:07 -0300, Benjamin Franksen [EMAIL PROTECTED] wrote: OK. Thanks. I didn't find that one because it's not offered as an identation option in emacs haskell mode. Emacs is evil! I'm open to alternatives. I use Windows, so went out of the way to have emacs.

[Haskell-cafe] [newbie] How to test this function?

2006-09-20 Thread Bruno Martínez
I've written a function that looks similar to this one getList = find 5 where find 0 = return [] find n = do ch - getChar if ch `elem` ['a'..'e'] then do tl - find (n-1) return (ch : tl) else find n First, how do I fix the identation of the

[Haskell-cafe] Re: Nice cygwin application to be used with ghci

2006-09-10 Thread Bruno Martínez
On Tue, 15 Aug 2006 17:43:29 -0300, Maurício [EMAIL PROTECTED] wrote: Hi, I've just uploaded a package ('rlwrap') to cygwin that I like to use with ghci. You can use it like this: rlwrap ghcii.sh That's awesome. Thank you very much for bringing this to the list's attention.