From aldirithms at gmx.net Thu Aug 3 12:41:15 2006 From: aldirithms at gmx.net (Peter Heinig) Date: Thu Aug 3 12:30:28 2006 Subject: [Hugs-users] The keyword let Message-ID: <20060803164115.21630@gmx.net> Hello, a simple question from a Hugs-Novice: Is it normal that WinHugs does not know the keyword "let"? Thanke you very much in advance, Christian -- Echte DSL-Flatrate dauerhaft f?r 0,- Euro*. Nur noch kurze Zeit! "Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl From ndmitchell at gmail.com Thu Aug 3 13:03:56 2006 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu Aug 3 12:53:17 2006 Subject: [Hugs-users] The keyword let In-Reply-To: <20060803164115.21630@gmx.net> References: <20060803164115.21630@gmx.net> Message-ID: <404396ef0608031003j294abfd5hea7469b2d32dcc18@mail.gmail.com> Hi, > a simple question from a Hugs-Novice: Is it normal that WinHugs does not know the keyword "let"? let x = 1 in x + x This works fine, and is a standard Haskell let. If however you mean GHCi's let: let x = 1 Then next, use x, that doesn't work. It would be lovely if this did work in Hugs, but it doesn't currently. Thanks Neil On 8/3/06, Peter Heinig wrote: > Hello, > > > Thanke you very much in advance, > > Christian > -- > > > Echte DSL-Flatrate dauerhaft f?r 0,- Euro*. Nur noch kurze Zeit! > "Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl > _______________________________________________ > Hugs-Users mailing list > Hugs-Users@haskell.org > http://www.haskell.org/mailman/listinfo/hugs-users > From aldirithms at gmx.net Thu Aug 3 15:20:11 2006 From: aldirithms at gmx.net (aldirithms@gmx.net) Date: Thu Aug 3 15:09:24 2006 Subject: [Hugs-users] Char.toUpper In-Reply-To: <20060803165313.37431324572@www.haskell.org> References: <20060803165313.37431324572@www.haskell.org> Message-ID: <20060803192011.25410@gmx.net> Hello, could you answer the following trivial question: WinHugs does neither understand map Char.toUpper "cCcC" nor map toUpper "cCcC" although I read that the latter is the hugs-version for the former, which works fine under GHCi. Thank you very much in advance, Christian -- Echte DSL-Flatrate dauerhaft f?r 0,- Euro*. Nur noch kurze Zeit! "Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl From ndmitchell at gmail.com Thu Aug 3 15:26:10 2006 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu Aug 3 15:15:25 2006 Subject: [Hugs-users] Char.toUpper In-Reply-To: <20060803192011.25410@gmx.net> References: <20060803165313.37431324572@www.haskell.org> <20060803192011.25410@gmx.net> Message-ID: <404396ef0608031226k16680c0t761d16982b4dda91@mail.gmail.com> Hi Christian, > map toUpper "cCcC" First you need to load the Char module, so do: :load Char Then execute the command above and it works just fine. Thanks Neil From aldirithms at gmx.net Thu Aug 3 16:14:02 2006 From: aldirithms at gmx.net (aldirithms@gmx.net) Date: Thu Aug 3 16:03:15 2006 Subject: [Hugs-users] natural numbers In-Reply-To: <20060803165313.37431324572@www.haskell.org> References: <20060803165313.37431324572@www.haskell.org> Message-ID: <20060803201402.25410@gmx.net> Hello, thanks a lot for the expeditious replies to my trifling question. Here is another one: Can you tell me why the following does not function? I mean the last part for converting number into the new data type. If this is not a quick fix, please ignore it. As an utter beginner, I cannot estimate the significance of my questions. data Nat = Zero | Succ Nat natToInt Zero = 0 natToInt (Succ n) = (natToInt n) + 1 number n = case n of 0 -> Zero _ -> Succ(number(n-1)) Thank you very much. -- "Feel free" ? 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From ndmitchell at gmail.com Thu Aug 3 16:24:03 2006 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu Aug 3 16:13:19 2006 Subject: [Hugs-users] natural numbers In-Reply-To: <20060803201402.25410@gmx.net> References: <20060803165313.37431324572@www.haskell.org> <20060803201402.25410@gmx.net> Message-ID: <404396ef0608031324g3e382296xcf8c873dfe801931@mail.gmail.com> Hi > number n = case n of > 0 -> Zero > _ -> Succ(number(n-1)) Looks fine to me, what exactly doesn't work? Type error, parse error? Gives the wrong result? For what values? You might also get more success if you email haskell-cafe -AT- haskell.org, which is for general Haskell stuff and gets a lot more traffic and readers than hugs-users. Either than or the Haskell IRC channel for instant answers. Thanks Neil From ham at cs.utexas.edu Thu Aug 3 16:39:40 2006 From: ham at cs.utexas.edu (Hamilton Richards) Date: Thu Aug 3 16:46:20 2006 Subject: [Hugs-users] natural numbers In-Reply-To: <20060803201402.25410@gmx.net> References: <20060803165313.37431324572@www.haskell.org> <20060803201402.25410@gmx.net> Message-ID: At 10:14 PM +0200 2006/8/3, aldirithms@gmx.net wrote: >Hello, > >thanks a lot for the expeditious replies to my trifling question. >Here is another one: > >Can you tell me why the following does not function? I mean the last >part for converting number into the new data type. If this is not a >quick fix, please ignore it. As an utter beginner, I cannot estimate >the significance of my questions. > > > >data Nat = Zero | Succ Nat > >natToInt Zero = 0 >natToInt (Succ n) = (natToInt n) + 1 > >number n = case n of > 0 -> Zero > _ -> Succ(number(n-1)) > > Most likely the problem you encountered looked something like Main> number 0 ERROR - Cannot find "show" function for: *** Expression : number 0 *** Of type : Nat The easy solution is to add deriving (Show) to the definition of Nat. Or, if you want to do it yourself, instance Show Nat where show Zero = "Zero" show (Succ n) = "(Succ " ++ show n ++ ")" Either way, you're providing a conversion from Nat to String, which is necessary if Nat values are ever to be displayed. Cheers, --Ham -- ------------------------------------------------------------------ Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer (retired) The University of Texas at Austin ham@cs.utexas.edu hrichrds@swbell.net http://www.cs.utexas.edu/users/ham/richards ------------------------------------------------------------------ From aldirithms at gmx.net Sat Aug 5 09:03:25 2006 From: aldirithms at gmx.net (aldirithms@gmx.net) Date: Sat Aug 5 08:52:31 2006 Subject: [Hugs-users] Excerpt from"Yet another Haskell Tutorial" In-Reply-To: <20060803165313.37431324572@www.haskell.org> References: <20060803165313.37431324572@www.haskell.org> Message-ID: <20060805130325.288030@gmx.net> -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal f?r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer From aldirithms at gmx.net Sat Aug 5 09:11:19 2006 From: aldirithms at gmx.net (aldirithms@gmx.net) Date: Sat Aug 5 09:00:25 2006 Subject: [Hugs-users] Excerpt from "Yet another Haskell Tutorial" In-Reply-To: <20060803165313.37431324572@www.haskell.org> References: <20060803165313.37431324572@www.haskell.org> Message-ID: <20060805131119.288070@gmx.net> Hello, (and sorry for the preceding accidental empty message), I'd like to ask a question concerning a following passage in "Yet another Haskell Tutorial" that ushers in the topic of monads: <> How do I have to interpret this? I cannot make sense of it for I do not see where the definition of a function that I know is violated. I view it that way: The string is just a kind of argument to the string-reading function and that different strings (i.e. different arguments) yield different return values is a commonplace phenomenon with functions, isn't it? How do I have to alter this (over?)simple interpretation to see the point the author wants to make? Thank you very much in advance. Christian -- Echte DSL-Flatrate dauerhaft f?r 0,- Euro*. Nur noch kurze Zeit! "Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl From johan.gronqvist at gmail.com Sat Aug 5 11:05:09 2006 From: johan.gronqvist at gmail.com (=?ISO-8859-1?Q?Johan_Gr=F6nqvist?=) Date: Sat Aug 5 11:19:10 2006 Subject: [Hugs-users] Re: Excerpt from "Yet another Haskell Tutorial" In-Reply-To: <20060805131119.288070@gmx.net> References: <20060803165313.37431324572@www.haskell.org> <20060805131119.288070@gmx.net> Message-ID: > > I'd like to ask a question concerning a following passage in > "Yet another Haskell Tutorial" that ushers in the topic of monads: I, as a beginner here, believe the haskell cafe list is the correct place for beginner questions. > > <> > > How do I have to interpret this? I cannot make sense of it for I do not see where the definition of a function that I know is violated. > I view it that way: The string is just a kind of argument to the string-reading function and that different strings (i.e. different arguments) yield different return values is a commonplace phenomenon with functions, isn't it? How do I have to alter this (over?)simple interpretation to see the point the author wants to make? > In this case I think you mean that the string typed on the keyboard is a "kind of" argument to the function. I think this is the problem. A function call f x to a function f should always return the same value if x is the same, and reading from keyboard and stating that the string read is a "kind of extra argument" to the function is not allowed. I think what is called functions here would be called "pure functions" ina different language. This would mean a function that only depends on its arguments. Using this definition a zero-parameter function (like the readLine function mentioned above) must always return the same value. This property is violated. This requirement makes Haskell a purely functional language. / johan From bulat.ziganshin at gmail.com Sat Aug 5 11:40:27 2006 From: bulat.ziganshin at gmail.com (Bulat Ziganshin) Date: Sat Aug 5 12:06:50 2006 Subject: [Hugs-users] Excerpt from "Yet another Haskell Tutorial" In-Reply-To: <20060805131119.288070@gmx.net> References: <20060803165313.37431324572@www.haskell.org> <20060805131119.288070@gmx.net> Message-ID: <108566692.20060805194027@gmail.com> Hello aldirithms, Saturday, August 5, 2006, 5:11:19 PM, you wrote: > < the keyboard. Ifyou call this function twice, and the user types > something the first time and something else the second time, then > you no longer have a function, since it would return two different values.>> you can see it in that way: something which has no parameters and return different values on different calls is not a function in _mathematical_ meaning of this word. Haskell functions is a mathematical (it also named "pure") functions. In order to deal with such real-world issues I/O functions just have additional hidden argument which is considered as containing "state of the world" at the moment of function call. this allow us to think that we "getstr" is really a pure (mathematical) function, just called with different parameters each time (because state of the world is definitely changed between calls :D ) you can read further explanations at the http://haskell.org/haskellwiki/IO_inside > How do I have to interpret this? I cannot make sense of it for I do > not see where the definition of a function that I know is violated. > I view it that way: The string is just a kind of argument to the > string-reading function and that different strings (i.e. different > arguments) yield different return values is a commonplace phenomenon > with functions, isn't it? How do I have to alter this (over?)simple > interpretation to see the point the author wants to make? in C, function reading string form keyboard can be defined as char *getstr(); as you can see, it don't have string arguments in Haskell, such function will be defined as getstr :: IO String which is internally translated to something like getstr :: WorldState -> String and compiler silently adds different "world state" values to each call, making them different in mathematical sense -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com From aldirithms at gmx.net Sat Aug 5 13:58:36 2006 From: aldirithms at gmx.net (aldirithms@gmx.net) Date: Sat Aug 5 13:47:52 2006 Subject: [Hugs-users] Typing the plus operator In-Reply-To: <20060803165313.37431324572@www.haskell.org> References: <20060803165313.37431324572@www.haskell.org> Message-ID: <20060805175836.21510@gmx.net> Hello Hugs Users, do you know why Hugs> :t 1 1 :: Num a => a and therefore Hugs> 1 :: Num a => a 1 is possible under Hugs, whereas Hugs> :t (+) (+) :: Num a => a -> a -> a and (not?) therefore Hugs> (+) :: Num a => a -> a -> a ERROR - Cannot find "show" function for: *** Expression : (+) *** Of type : Integer -> Integer -> Integer yields the error message shown? Thank you very much, Christian, Haskell beginner -- "Feel free" ? 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From daniel.is.fischer at web.de Sat Aug 5 20:04:43 2006 From: daniel.is.fischer at web.de (Daniel Fischer) Date: Sat Aug 5 19:54:01 2006 Subject: [Hugs-users] Typing the plus operator In-Reply-To: <20060805175836.21510@gmx.net> References: <20060803165313.37431324572@www.haskell.org> <20060805175836.21510@gmx.net> Message-ID: <200608060204.44145.daniel.is.fischer@web.de> Am Samstag, 5. August 2006 19:58 schrieb aldirithms@gmx.net: > Hello Hugs Users, > > do you know why > > Hugs> :t 1 > 1 :: Num a => a > > > and therefore > > > Hugs> 1 :: Num a => a > 1 > > > is possible under Hugs, whereas > > Hugs> :t (+) > (+) :: Num a => a -> a -> a > > and (not?) therefore > > Hugs> (+) :: Num a => a -> a -> a > ERROR - Cannot find "show" function for: > *** Expression : (+) > *** Of type : Integer -> Integer -> Integer > > > yields the error message shown? > > Thank you very much, > > Christian, > > Haskell beginner Ugh, what do you know about type classes yet? If you know a little Java, the statement that type classes are much like a Java interface should give you an approximate idea. If you let hugs evaluate an expression, it prints out a String representation of (the result of evaluating) the expression _if it can construct one_. How canit construct one? That's what the Show class is for, types that are instances of Show provide a method to construct String representations of values of such a type (this method is, surprise, surprise, called show -- there's more to the Show class, but you needn't care about that yet). Now if you type :i Num to the hugs prompt, it will print out ... class (Eq a, Show a) => Num a where ... , meaning that all types which instantiate Num must necessarily also instantiate Show, so that such values can be displayed and that's what happens if you type Hugs> 1 :: Num a => a to the prompt, the expression is evaluated and the appropriate "show" method is invoked to get the String representation that is printed out -- however, here's also something else going on: defaulting. Since 1 is polymorphic, if hugs is to print a representation of 1, it must select a show function to convert it to a String and, unless something else is specified by a default-declaration, it selects the Integer instance of Show to print out the value (cf. section 4.3.4 of the Haskell report, as a deviant example: BoolNum> 1 True BoolNum> 1.0 1 % 1 BoolNum> :t 1 1 :: Num a => a BoolNum> :t 1.0 1.0 :: Fractional a => a where I used module BoolNum where default (Bool, Rational) instance Num Bool where (+) = (/=) (-) = (/=) (*) = (&&) negate x = x abs x = x signum x = x fromInteger = odd ) but (+) is a function, of type Num a => a -> a -> a, and function types aren't instances of Show (well, there's a module Text.Show.Functions that makes them instances of Show, but: Text.Show.Functions> (+) Text.Show.Functions> sin , so that's not really helpful) and that's what hugs complains about: BoolNum> (+) ERROR - Cannot find "show" function for: *** Expression : (+) *** Of type : Bool -> Bool -> Bool it can't find an appropriate "show" function -- note that here, with my default declaration, it looks for a show-function of type (Bool -> Bool -> Bool) -> String, whereas with the default default, it looked for a show-function of type (Integer -> Integer -> Integer) -> String, that's defaulting in action. However, if I also provide instance Show a => Show (Bool -> a) where showsPrec p f = showParen (p > 0) (showString ('\n':replicate (4*p) ' ') . showString "True -> " . showsPrec (p+1) (f True) . showString ('\n':replicate (4*p) ' ') . showString "False -> " . showsPrec (p+1) (f False)) (that requires the -98 flag for hugs), I get BoolNum> (+) True -> ( True -> False False -> True) False -> ( True -> True False -> False) BoolNum> (+) :: Integer -> Integer -> Integer ERROR - Cannot find "show" function for: *** Expression : (+) *** Of type : Integer -> Integer -> Integer Now you might ask "why aren't functions showable?" a) well, how could you show them? The above method could be generalised to functions with other small domains (in principle also with large domains, as long as they are finite) and showable results, but imagine thus showing a function of type Bool -> Bool -> ... -> Bool where the ellipsis stands for, say, 1000 further occurences of Bool. Printing that out would take a while (had you started at Big Bang with a really fast computer, by now you wouldn't have printed a significant portion of the function) and the output would be completely unhelpful. And if you consider theoretically infinite types like Integer and Rational (in practice these too are finite because your computer is), showing a function table is obviously not an option. b) there's a deeper reason, too. I don't remember the details, but a few months ago there was a discussion on haskell cafe where it was mentioned that showing functions (in a non-constant way, what Text.Show.Functions provides is harmless) breaks referential transparency (deep waters for a beginner, keep out for a while). HTH, Daniel -- "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." -- Blair P. Houghton From luc.duponcheel at accenture.com Mon Aug 7 03:52:39 2006 From: luc.duponcheel at accenture.com (luc.duponcheel@accenture.com) Date: Mon Aug 7 03:42:11 2006 Subject: [Hugs-users] Excerpt from "Yet another Haskell Tutorial" References: <20060803165313.37431324572@www.haskell.org> <20060805131119.288070@gmx.net> Message-ID: <4E54313620716D41B1DCC159E8CEF77D602A56@EMEXM0202.dir.svc.accenture.com> Hi, The very idea of 'pure functional programming' is that it is 'declarative' (i.e. works with constants (nothing ever changes)). As a consequence, given a function 'f' and an input 'x', evaluating the expression 'f x' should always behave in the same way. Input/Output is an example of a programming aspect that is not pure in the sense above. The idea of I/O is (for example) to change information on your file system. So, a function that appends the string "Foo" to a file 'Foo' and then shows the contents of 'Foo', will NOT always behave in the same way. If the contents of the file was originally "someString", then, the first time the function is invoked, it will show "someStringFoo", and the second time the function is invoked, it will show "someStringFooFoo". One of the goals of monads is to encapsulate non-pure aspects (side effects) behind a convenient interface. Luc -----Original Message----- From: hugs-users-bounces@haskell.org on behalf of aldirithms@gmx.net Sent: Sat 8/5/2006 3:11 PM To: Hugs-Users@haskell.org Subject: [Hugs-users] Excerpt from "Yet another Haskell Tutorial" Hello, (and sorry for the preceding accidental empty message), I'd like to ask a question concerning a following passage in "Yet another Haskell Tutorial" that ushers in the topic of monads: <> How do I have to interpret this? I cannot make sense of it for I do not see where the definition of a function that I know is violated. I view it that way: The string is just a kind of argument to the string-reading function and that different strings (i.e. different arguments) yield different return values is a commonplace phenomenon with functions, isn't it? How do I have to alter this (over?)simple interpretation to see the point the author wants to make? Thank you very much in advance. Christian -- Echte DSL-Flatrate dauerhaft f?r 0,- Euro*. Nur noch kurze Zeit! "Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl _______________________________________________ Hugs-Users mailing list Hugs-Users@haskell.org http://www.haskell.org/mailman/listinfo/hugs-users This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. From simonmar at microsoft.com Wed Aug 23 04:11:29 2006 From: simonmar at microsoft.com (Simon Marlow) Date: Wed Aug 23 03:59:41 2006 Subject: [Hugs-users] FW: [hugs-users-owner@haskell.org: Hugs & SOEGraphics] Message-ID: <2E9B33CE230409489A7ED37E5E34090F052A44E9@EUR-MSG-20.europe.corp.microsoft.com> Dear Hugs Folk, Could someone reply to Bjorn's message below? Cheers, Simon -----Original Message----- From: mailman-bounces@haskell.org [mailto:mailman-bounces@haskell.org] On Behalf Of Bjorn Lisper Sent: 22 August 2006 12:44 To: hugs-users-owner@haskell.org Subject: [hugs-users-owner@haskell.org: Hugs & SOEGraphics] Hi, I sent a mail to hugs-users@haskell.org and I got the following automated reply. If this mailing list is indeed closed, then please remove the text at http://cvs.haskell.org/Hugs/pages/downloading.htm which says "To ask a question about using Hugs, please send a message to hugs-users@haskell.org". I simply followed the advice there. Please then also advise me how to obtain an answer to my simple question below. Best regards, Bj?rn ------- Start of forwarded message ------- X-Sieve: CMU Sieve 2.2 Subject: Hugs & SOEGraphics From: hugs-users-owner@haskell.org To: lisper@it.kth.se Content-Type: multipart/mixed; boundary="===============1537646779==" Date: Tue, 22 Aug 2006 02:57:13 -0400 Precedence: bulk X-BeenThere: hugs-users@haskell.org X-Mailman-Version: 2.1.5 List-Id: The Hugs Users Mailing List X-List-Administrivia: yes Sender: hugs-users-bounces@haskell.org X-Virus-Scanned: by amavisd-new at kth.se X-Spam-Status: No, hits=-5.2 tagged_above=-200.0 required=5.0 tests=BAYES_00, KTH_MAILMAN_HEADER_1, KTH_MAILMAN_HEADER_2, NO_REAL_NAME X-Spam-Level: You are not allowed to post to this mailing list, and your message has been automatically rejected. If you think that your messages are being rejected in error, contact the mailing list owner at hugs-users-owner@haskell.org. X-Original-To: hugs-users@haskell.org Date: Tue, 22 Aug 2006 09:08:59 +0200 (MEST) From: Bjorn Lisper To: hugs-users@haskell.org Subject: Hugs & SOEGraphics X-Virus-Scanned: by amavisd-new at kth.se Hi, My course in functional programming is just about to start. I use Paul Hudak's textbook "The Haskell School of Expression", and the SOE software. Does this software work with the latest version of Hugs (May 2006), or do we have to use the version that is provided via the SOE download page? (That version has some problems: for instance, winhugs does not work properly, so it would be nice if we could use the fresh Hugs version in the course.) Best regards, Bj?rn Lisper Dept. of Computer Science and Electronics M?lardalen University P.O. Box 883 SE-721 23 V?ster?s Sweden Phone: +46-21-151709, Mobile: +46-70-6729577, Fax: +46-21-101460 (Phone KTH: +46-8-7904126) Email: bjorn.lisper@mdh.se WWW: http://www.idt.mdh.se/~blr/  -=- MIME -=-  --===============1537646779== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit You are not allowed to post to this mailing list, and your message has been automatically rejected. If you think that your messages are being rejected in error, contact the mailing list owner at hugs-users-owner@haskell.org. --===============1537646779== Content-Type: message/rfc822 MIME-Version: 1.0 Return-Path: X-Original-To: hugs-users@haskell.org Delivered-To: hugs-users@haskell.org Received: from mx2.kth.se (mx2.kth.se [130.237.48.98]) by www.haskell.org (Postfix) with ESMTP id 739A0324141 for ; Tue, 22 Aug 2006 02:57:12 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mx2.kth.se (Postfix) with ESMTP id 6FBD7141F51 for ; Tue, 22 Aug 2006 09:09:00 +0200 (CEST) Received: from mx2.kth.se ([127.0.0.1]) by localhost (mx2.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30910-01-9 for ; Tue, 22 Aug 2006 09:08:59 +0200 (CEST) Received: from ripper.it.kth.se (ripper.it.kth.se [130.237.212.25]) by mx2.kth.se (Postfix) with ESMTP id 60B54142065 for ; Tue, 22 Aug 2006 09:08:59 +0200 (CEST) Received: (from lisper@localhost) by ripper.it.kth.se (8.12.10+Sun/8.12.11/Submit) id k7M78xh6020953; Tue, 22 Aug 2006 09:08:59 +0200 (MEST) Date: Tue, 22 Aug 2006 09:08:59 +0200 (MEST) Message-Id: <200608220708.k7M78xh6020953@ripper.it.kth.se> From: Bjorn Lisper To: hugs-users@haskell.org Subject: Hugs & SOEGraphics X-Virus-Scanned: by amavisd-new at kth.se Hi, My course in functional programming is just about to start. I use Paul Hudak's textbook "The Haskell School of Expression", and the SOE software. Does this software work with the latest version of Hugs (May 2006), or do we have to use the version that is provided via the SOE download page? (That version has some problems: for instance, winhugs does not work properly, so it would be nice if we could use the fresh Hugs version in the course.) Best regards, Bj?rn Lisper Dept. of Computer Science and Electronics M?lardalen University P.O. Box 883 SE-721 23 V?ster?s Sweden Phone: +46-21-151709, Mobile: +46-70-6729577, Fax: +46-21-101460 (Phone KTH: +46-8-7904126) Email: bjorn.lisper@mdh.se WWW: http://www.idt.mdh.se/~blr/ --===============1537646779==-- ------- End of forwarded message ------- From paul.hudak at yale.edu Fri Aug 25 23:54:34 2006 From: paul.hudak at yale.edu (Paul Hudak) Date: Fri Aug 25 23:42:40 2006 Subject: [Fwd: Re: [Hugs-users] FW: [hugs-users-owner@haskell.org: Hugs & SOEGraphics]] Message-ID: <44EFC5FA.50808@yale.edu> An HTML attachment was scrubbed... URL: http://www.haskell.org//pipermail/hugs-users/attachments/20060825/55c87e47/attachment.htm From ndmitchell at gmail.com Thu Aug 31 23:40:09 2006 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu Aug 31 23:27:51 2006 Subject: [Hugs-users] Pattern match failure leads to lots of output Message-ID: <404396ef0608312040t1d0b2204m57f747ed55fa6020@mail.gmail.com> Hi, Sometimes I get a pattern match error, with output such as: pattern match failure: uniqueHite_v9935 (instEq_v280 (instEq_v20 instEq_v11) (instEq_v20 instEq_v11)) (map head [[]] ++ (map_v810 (map (uniqueHite_v9931 (instOrd_v21 instOrd_v12))) (mapMaybe (uncurry equalGiven) (map_v810 (IFunc_Func "map~1" [0] (IExpr_Case (IExpr_Var 0) [("[]",IExpr_Make "[]" []),(":",IExpr_Make ":" [IExpr_Apply (IExpr_Lambda [1] IExpr_Unknown) [IExpr_Sel (IExpr_Var 0) "hd"],IExpr_Call "map~2" [IExpr_Sel (IExpr_Var 0) "tl"]])]) [],) (_SEL (,) (select_v1958 (foldr (select (groupSetExtract_v7750 (Make.Eq (instEq_v20_v1493 instEq_v11) (Eq_v481 (Make.Eq (instEq_v20_v1493 instEq_v11) (Eq_v481 (Make.Eq (instEq_v20_v1493 instEq_v11) (Eq_v481 (Make.Eq (instEq_v20_v1493 instEq_v11) (Eq_v481 (Make.Eq (instEq_v20_v1493 instEq_v11) (Eq_v481 (Make.Eq (instEq_v20_v1493 instEq_v11) (Eq_v481 (Make.Eq (instEq_v20_v1493 instEq_v11) (Eq ... Where the output goes on forever. This is unfortunate, because having sped up the screen printing of WinHugs quite considerably, now its a race to hit the stop button before this stuff has taken up the whole screen buffer (100Kb) and pushed the name of the function causing the error off the top. I guess the cause of this error is dictionary transformations resulting in a nested dictionary? Is there any way to stop this happening? Is it a known bug - it happens reasonably regularly to me. Thanks Neil