Re: [Haskell-cafe] Infinite loop?

2006-02-19 Thread Barbier de Reuille Pierre
On Fri, 17 Feb 2006 17:26:08 + Jon Fairbairn [EMAIL PROTECTED] wrote: On 2006-02-17 at 09:22PST Jared Updike wrote: Yep. change one line to: entry - if isdir name /= . name /= .. and it does in fact work. Only if no-one has been tricky with symbolic links. And how can

[Haskell-cafe] Re: libreadline dependency

2006-02-19 Thread Jim Apple
J. Scott Thayer, M.D. wrote: Haskell wants libreadline 4 while I have libreadline 5. I'm not sure about SUSE, but Fedora has libreadline_compat packages. HTH, Jim ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] classes inheritance seems not to work.

2006-02-19 Thread Sebastian Sylvan
On 2/18/06, asker [EMAIL PROTECTED] wrote: Hi, I'm trying to make three haskell classes and an instance this way: -- class (Eq a) = Graph a where vert :: [a] ady :: a - [a] class (Graph a) = Paths a where gps

Re: [Haskell-cafe] Infinite loop?

2006-02-19 Thread Donn Cave
Quoth Barbier de Reuille Pierre [EMAIL PROTECTED]: | On Fri, 17 Feb 2006 17:26:08 + | Jon Fairbairn [EMAIL PROTECTED] wrote: | | On 2006-02-17 at 09:22PST Jared Updike wrote: | Yep. change one line to: | | entry - if isdir name /= . name /= .. | | and it does in fact work. |

Re: [Haskell-cafe] Infinite loop?

2006-02-19 Thread Dmitry V'yal
Barbier de Reuille Pierre wrote: And how can you, in Haskell, detect symbolic links ? One can use System.Posix.Files.isSymbolicLink function for that purpose. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Infinite loop?

2006-02-19 Thread Mark T.B. Carroll
Barbier de Reuille Pierre [EMAIL PROTECTED] writes: (snip) And how can you, in Haskell, detect symbolic links ? I use System.Posix.Files. getSymbolicLinkStatus is like lstat(2) under Unix. It returns a value to which you can apply the isSymbolicLink predicate. Of course, you can't be sure the

Re: [Haskell-cafe] GADTs and bar :: Foo t1 - Foo t2

2006-02-19 Thread Daniel McAllansmith
My thanks for the responses received off-list. Dimitrios pointed out that a 'successor' class solution would require the typechecking to depend somehow on whether the lists were empty or not. Probably a clue that I was on the wrong track. Both Cale and Dimitrios suggested better solutions

[Haskell-cafe] Shapes Compiling Error

2006-02-19 Thread Chatzianastassiou Achilleas
Hi everybody, I have written some code for several shapes, and i get a compiling error: parse error on input `:' though I can't find where the error is... data Shape = Ellipse Radius Radius | Polygon [Vertex] deriving Show type Radius = Float type Vertex =

Re: [Haskell-cafe] Shapes Compiling Error

2006-02-19 Thread Daniel Fischer
Hi, Am Sonntag, 19. Februar 2006 22:57 schrieb Chatzianastassiou Achilleas: Hi everybody, I have written some code for several shapes, and i get a compiling error: parse error on input `:' though I can't find where the error is... [snip code] ever heard of the layout-rule? You must

Re: [Haskell-cafe] Shapes Compiling Error

2006-02-19 Thread Cale Gibbard
Watch how deeply things are indented. The definitions for polyArea should be indented to the same level as its type signature. Currently, they're indented a little more, so the first line of polyArea's definition is being treated as part of the type signature, which is why you're getting the

Re: [Haskell-cafe] Shapes Compiling Error

2006-02-19 Thread Chatzianastassiou Achilleas
Thanks everybody, I think it was the layout thing that I misstyped plus the area (RtTriangle s1 s1) = s1 *s2 /2 (silly me!) Skag55 _ Don’t just search. Find. Check out the new MSN Search!

Re: [Haskell-cafe] Re: Unexpected results with simple IO

2006-02-19 Thread Emil Axelsson
What version of GHC are you using? Your code works for me in rxvt in Cygwin, with GHC 6.4.1. But I remember having that same problem earlier (in some earlier GHC version, so it may be fixed by now). The solution was to run hFlush after each putStr, like so: import System.IO (hFlush, stdout)