Re: [GHC] #930: ghc-6.6: panic! (the 'impossible' happened) mkWWcpr: not a product GHC-Brian-6.5.1:IdInfo.IdInfo{tc rfD}

2006-10-11 Thread GHC
#930: ghc-6.6: panic! (the 'impossible' happened) mkWWcpr: not a product GHC- Brian-6.5.1:IdInfo.IdInfo{tc rfD} -+-- Reporter: briansmith | Owner: Type: bug | Status: new

Re: [GHC] #933: Separate compilation fails with existential records

2006-10-11 Thread GHC
#933: Separate compilation fails with existential records ---+ Reporter: guest | Owner: Type: bug | Status: new Priority: normal| Milestone: Component:

Re: [GHC] #933: Separate compilation fails with existential records

2006-10-11 Thread GHC
#933: Separate compilation fails with existential records ---+ Reporter: guest | Owner: Type: bug | Status: new Priority: normal| Milestone: Component:

Re: [GHC] #930: ghc-6.6: panic! (the 'impossible' happened) mkWWcpr: not a product GHC-Brian-6.5.1:IdInfo.IdInfo{tc rfD}

2006-10-11 Thread GHC
#930: ghc-6.6: panic! (the 'impossible' happened) mkWWcpr: not a product GHC- Brian-6.5.1:IdInfo.IdInfo{tc rfD} -+-- Reporter: briansmith | Owner: Type: bug | Status: new

[GHC] #934: Allow load to work correctly when executed multiple times the same session for BatchCompile

2006-10-11 Thread GHC
#934: Allow load to work correctly when executed multiple times the same session for BatchCompile +--- Reporter: briansmith |Owner: Type: feature request | Status: new

Re: [GHC] #631: GHCi doesn't work unregisterised

2006-10-11 Thread GHC
#631: GHCi doesn't work unregisterised --+- Reporter: [EMAIL PROTECTED] | Owner: igloo Type: bug | Status: new Priority: low | Milestone:

[GHC] #935: Minor documentation bug, odd defn of fibn.

2006-10-11 Thread GHC
#935: Minor documentation bug, odd defn of fibn. -+-- Reporter: tmcooper |Owner: Type: bug | Status: new Priority: normal|Milestone:

Re: [GHC] #935: Minor documentation bug, odd defn of fibn.

2006-10-11 Thread GHC
#935: Minor documentation bug, odd defn of fibn. +--- Reporter: tmcooper | Owner: Type: bug| Status: new Priority: normal | Milestone:

RE: [Haskell-cafe] GHC Core still supported?

2006-10-11 Thread Simon Peyton-Jones
Jim, and others (I'm ccing GHC users) External Core is a feature of GHC that is lonely and unloved. External Core longs to have someone to look after it, tell it that it is a Truly Useful Feature, and keep it working. Seriously, External Core has a strong tendency to bit-rot because (so far as

RE: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread Simon Peyton-Jones
| So, my hypothesis is that the inliner doesn't recognise that | ``if (x = 0) then ...'' is effectively a case analysis on x, and thus the | argument discount is not fired. So we need to figure out how to extend | this criterion for when to apply the argument discount. Correct. GHC generates

RE: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread roconnor
On Wed, 11 Oct 2006, Simon Peyton-Jones wrote: Correct. GHC generates case (x# =# 0#) of { True - ...; False - ... } But the argument discount only applies when we have case y of { ... } So you really want a discount for the args of a primop. Do you think it should be that

RE: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread Simon Peyton-Jones
| Do you think it should be that general? I was thinking the discount | should only apply in the situtation where a case expression contains an | expression with one free varaible that is a function argument, and all | operations are primitive. Well, if you see x =# 0 then it'd be good

RE: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread roconnor
On Wed, 11 Oct 2006, Simon Peyton-Jones wrote: The constant-folding rules for the primops are all in prelude/PrelRules.lhs in function primOpRules. Please add more rules. For example, I see that x +# 0 = x is not in there! It is in libraries/base/GHC/Base.lhs x# +# 0#

Re[2]: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread Bulat Ziganshin
Hello Simon, Wednesday, October 11, 2006, 2:23:59 PM, you wrote: The constant-folding rules for the primops are all in prelude/PrelRules.lhs in function primOpRules. Please add more rules. For example, I see that x +# 0 = x is not in there! but GHC.Base contains {-#

ANNOUNCE: GHC version 6.6

2006-10-11 Thread Ian Lynagh
=== The (Interactive) Glasgow Haskell Compiler -- version 6.6 === The GHC Team is pleased to announce a new release of GHC. There have been many changes since the 6.4.2

Re: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread Samuel Bronson
Simon Peyton-Jones simonpj at microsoft.com writes: | So, my hypothesis is that the inliner doesn't recognise that | ``if (x = 0) then ...'' is effectively a case analysis on x, and thus the | argument discount is not fired. So we need to figure out how to extend | this criterion for

Re: [Haskell-cafe] GHC Core still supported?

2006-10-11 Thread Aaron Tomb
Hi, I was just talking yesterday with a group of other students about using the ExternalCore data type as the starting point for a project we're starting to work on with the goal of having more practice implementing various compiler components. We were also talking about the possibility

Re: [Haskell] Expecting more inlining for bit shifting

2006-10-11 Thread roconnor
On Wed, 11 Oct 2006, Samuel Bronson wrote: branch. I've got a patch that seems like it ought to do a bettter job, but it doesn't seem to give the $wrotate functions any discount (the $wshift functions having been tagged by the {-# INLINE shift #-} pragmas I added all over). Unfortunately I

Link errors when using the GHC API

2006-10-11 Thread Bas van Dijk
Dear GHC hackers, I would like to experiment with the GHC API. However I get link errors when using it. For example: - $ ghci -package ghc ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive,

Re: Link errors when using the GHC API

2006-10-11 Thread Mathew Mills
Interesting. I was unable to reproduce your problem. What platform are you running on? Are you using a binary distribution or one you built from source? Seems like something didn't build right... You might use 'nm' to examine your libHSCabal.a to see if a similarly named symbol is

ghc-6.6 candidate Win32 installer

2006-10-11 Thread Sigbjorn Finne
Hi, for Win32 users wanting the latest GHC goodness, a candidate 6.6 installer is now available, http://haskell.org/ghc/dist/6.6/ghc-6-6.msi If anyone's willing to download it and kick the tires a bit, that'd be great. If nothing too egregious shows up, I'm planning to publish sometime

[Haskell] Re: GADT: call for proper terminology

2006-10-11 Thread Niklas Broberg
On 10/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Niklas Broberg wrote: Annotate the data type using a GADT: data MyData a where MyCon :: MyData a The range of the data constructor MyCon is the entire type MyData a -- so the above data type is the regular algebraic data type, and can

Re: [Haskell] GADT: call for proper terminology

2006-10-11 Thread Lennart Augustsson
On Oct 11, 2006, at 03:58 , Bulat Ziganshin wrote: Hello oleg, Wednesday, October 11, 2006, 6:12:23 AM, you wrote: Annotate the data type using a GADT: data MyData a where MyCon :: MyData a It helps to reduce confusion about the merits of various features and additions to Haskell if we

[Haskell] ANNOUNCE: GHC version 6.6

2006-10-11 Thread Ian Lynagh
=== The (Interactive) Glasgow Haskell Compiler -- version 6.6 === The GHC Team is pleased to announce a new release of GHC. There have been many changes since the 6.4.2

Re: [Haskell] GADT: call for proper terminology

2006-10-11 Thread Paul Hudak
Lennart Augustsson wrote: Well, I think the GADT type definition syntax is the syntax data type definitions should have had from the start. Too bad we didn't realize it 15 years ago. -- Lennart I agree! In my experience teaching Haskell, the current syntax is a bit confusing for

[Haskell] ANNOUNCE: Cabal version 1.1.6

2006-10-11 Thread Duncan Coutts
The Haskell Cabal The Common Architecture for Building Applications and Libraries. http://haskell.org/cabal/ Cabal version 1.1.6 is now available. It is included in GHC version 6.6. For other Haskell implementations or older versions of GHC you can install it separately:

Re: [Haskell] GADT: call for proper terminology

2006-10-11 Thread Lennart Augustsson
Well, Kent Petersson and I proposed them as an addition to Haskell in 1994, so they are not that new. :) -- Lennart http://web.cecs.pdx.edu/~sheard/papers/silly.pdf On Oct 11, 2006, at 09:47 , Paul Hudak wrote: Lennart Augustsson wrote: Well, I think the GADT type definition

[Haskell] Getting a function dependency graph from source

2006-10-11 Thread Durward McDonell
Hello. This seems like a basic question, but I haven't been able to find an answer. I have a pile of Haskell code that is compiled into a library, and a Haskell program that uses this library. What I would like is something that will look at my program and follow the function calls until it

Re: [Haskell] GADT: call for proper terminology

2006-10-11 Thread Doaitse Swierstra
I would prefer notation like: data Parser a | Alt (Parser a) (Parser a) | Map ( b - a) (Parser b) | Succ a Parser (a,b) | Seq (Parser a) (Parser b) Parser String | Lit (String - Bool) Parser [a]| Many (Parser a) This takes

[Haskell] Fun in the Afternoon: Thurs 16th Nov in Oxford

2006-10-11 Thread Jeremy . Gibbons
Dear colleagues, Graham Hutton and Conor McBride at Nottingham and I are organizing a termly seminar Fun in the Afternoon on functional programming and related topics. The idea is to have a small number of talks as an antidote to mid-term blues, three afternoons a year. The hope is that talks

[Haskell] ANNOUNCE: Generic Haskell 1.60 (Diamond)

2006-10-11 Thread Alexey Rodriguez Yakushev
Generic Haskell version 1.60 (Diamond) We are happy to announce the fourth release of Generic Haskell, an extension of Haskell that facilitates generic programming. Generic Haskell includes the following features: * type-indexed

Re: [Haskell] GADT: call for proper terminology

2006-10-11 Thread Brian Hulley
Doaitse Swierstra wrote: I would prefer notation like: data Parser a | Alt (Parser a) (Parser a) | Map ( b - a) (Parser b) | Succ a Parser (a,b) | Seq (Parser a) (Parser b) Parser String | Lit (String - Bool) Parser [a]| Many

[Haskell] Re: Getting a function dependency graph from source

2006-10-11 Thread Thomas Hallgren
Hi, The pfe command line tool from the Programatica Project has functionality that seems to fit fairly well with what you are asking for: pfe deps -- lists function level dependencies pfe needed -- lists everything needed by a definition pfe dead -- lists unused

Re: [Haskell-cafe] Re: Trying to understand HList / hSequence now [why it works]

2006-10-11 Thread Bulat Ziganshin
Hello oleg, Wednesday, October 11, 2006, 6:45:28 AM, you wrote: instance (Monad m, HSequence m HNil HNil) = HSequence m HNil HNil where hSequence _ = return HNil how can i use the goal of the declaration as one of the conditions without causing some sort of black hole in the type

Re[2]: [Haskell-cafe] a monad for secret information

2006-10-11 Thread Bulat Ziganshin
Hello Felipe, Wednesday, October 11, 2006, 4:47:59 AM, you wrote: Why does this works? Yet Another Haskell Tutorial teaches that pattern matching occurs at one stage and guard processing at other, and that there's no back (page 94). something is definitely wrong - either book or your

Re: [Haskell-cafe] Multiple stages in Template Haskell

2006-10-11 Thread Ch. A. Herrmann
Hi, because Template Haskell is a compile-time metaprogramming language, there is no metaprogram left after the first stage. Thus, it does not make sense, conceptually, to have more than one stage. In contrast, in MetaOCaml, you can generate code at run time that generates code at run time

Re: [Haskell-cafe] GHC Core still supported?

2006-10-11 Thread Neil Mitchell
Hi, External Core is a feature of GHC that is lonely and unloved. External Core longs to have someone to look after it, tell it that it is a Truly Useful Feature, and keep it working. Just for reference, Yhc.Core is deeply loved and very close to my heart. There are disadvantages to Yhc Core

Re: [Haskell-cafe] [off-topic / administrative] List Reply-to

2006-10-11 Thread Mikael Johansson
On Tue, 10 Oct 2006, Misha Aizatulin wrote: Matthias Fischmann wrote: Some lists have the Reply-To: set to the list address. I think you can even configure the From: to be haskell-cafe instead of the poster, making the poster merely identifiable by the Sender: field. Do you have strong

[Haskell-cafe] Re: Haskell-Cafe Digest, Vol 38, Issue 22

2006-10-11 Thread Kirsten Chevalier
On 10/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Meanwhile, if you want to use External Core, but can't because it doesn't work properly for you, don't be afraid to yell. (E.g. File a Trac bug report.) I don't want to promise an immediate fix, but the more people that use it the

[Haskell-cafe] windows file locking

2006-10-11 Thread Stefan Aeschbacher
HiI need to open a file and keep it open for writing (a log file). Another process hasto read from this file. On windows the second process (e.g. tail -f) can not open the file.How can I open a file without this locking? regardsStefan ___ Haskell-Cafe

RE: [Haskell-cafe] GHC Core still supported?

2006-10-11 Thread Simon Peyton-Jones
Jim, and others (I'm ccing GHC users) External Core is a feature of GHC that is lonely and unloved. External Core longs to have someone to look after it, tell it that it is a Truly Useful Feature, and keep it working. Seriously, External Core has a strong tendency to bit-rot because (so far as

Re: [Haskell-cafe] windows file locking

2006-10-11 Thread Krasimir Angelov
Hi Stefan, Haskell I/O systems implements single writer-multiple readers file locking. See http://www.haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#8 Cheers, Krasimir On 10/11/06, Stefan Aeschbacher [EMAIL PROTECTED] wrote: Hi I need to open a file and keep it open for

Re: [Haskell-cafe] windows file locking

2006-10-11 Thread Esa Ilari Vuokko
On 10/11/06, Stefan Aeschbacher [EMAIL PROTECTED] wrote: Hi I need to open a file and keep it open for writing (a log file). Another process has to read from this file. On windows the second process (e.g. tail -f) can not open the file. How can I open a file without this locking? Using

Re: [Haskell-cafe] [off-topic / administrative] List Reply-to

2006-10-11 Thread Ketil Malde
Mikael Johansson [EMAIL PROTECTED] writes: * It violates the principle of least damage, and it encourages a failure mode that can be extremely embarrassing -- or worse. I'd be surprised if private mail leakage happens that much to Haskell-cafe, or for that matter if it'd be embarrassing to

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Malcolm Wallace
ihope [EMAIL PROTECTED] wrote: It's possible to make both infinite list and finite list datatypes: data Inf a = InfCons a (Inf a) data Fin a = FinCons a !(Fin a) | FinNil At least, I think the Fin type there has to be finite... No, your Fin type can also hold infinite values. The

Re[2]: [Haskell-cafe] windows file locking

2006-10-11 Thread Bulat Ziganshin
Hello Esa, Wednesday, October 11, 2006, 2:13:49 PM, you wrote: Using base-package's IO-system, that is not possible as far as I know. The flag you need to pass CreateFile (api call which is used to open practically all files) is FILE_SHARE_READ. You can find these in Win32-package, but

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Duncan Coutts
On Wed, 2006-10-11 at 11:40 +0100, Malcolm Wallace wrote: ihope [EMAIL PROTECTED] wrote: It's possible to make both infinite list and finite list datatypes: data Inf a = InfCons a (Inf a) data Fin a = FinCons a !(Fin a) | FinNil At least, I think the Fin type there has to be

Re: [Haskell-cafe] Vertical tabs in source code and other obscure chars

2006-10-11 Thread Brian Hulley
Brian Hulley wrote: Hi, In the Haskell98 report at http://haskell.org/onlinereport/lexemes.html section 2.2 has the rule: whitechar - newline | vertab | space | tab | uniWhite Does anyone know what a vertical tab is supposed to do? Is there any reason to allow them as whitespace? (Does

Re: Re[2]: [Haskell-cafe] windows file locking

2006-10-11 Thread Stefan Aeschbacher
HiSo far the windows API seems to work for me. Currently I'm still struggling to notwrite garbage to the file but the shared access works now. Does anyone have anexample how to use it (e.g. the implementation of hPutStr on windows or something, i did not find it in the ghc source code)?I tried to

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Matthias Fischmann
On Wed, Oct 11, 2006 at 11:40:59AM +0100, Malcolm Wallace wrote: To: haskell-cafe@haskell.org From: Malcolm Wallace [EMAIL PROTECTED] Date: Wed, 11 Oct 2006 11:40:59 +0100 Subject: Re: [Haskell-cafe] beginner's problem about lists ihope [EMAIL PROTECTED] wrote: It's possible to make

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Malcolm Wallace
Matthias Fischmann [EMAIL PROTECTED] wrote: No, your Fin type can also hold infinite values. let q = FinCons 3 q in case q of FinCons i _ - i == _|_ does that contradict, or did i just not understand what you are saying? That may be the result in ghc, but nhc98 gives the answer 3. It

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread David Sabel
Malcolm Wallace wrote: Matthias Fischmann [EMAIL PROTECTED] wrote: No, your Fin type can also hold infinite values. let q = FinCons 3 q in case q of FinCons i _ - i == _|_ does that contradict, or did i just not understand what you are saying? That may be the result in

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Robert Dockins
On Oct 11, 2006, at 10:14 AM, Malcolm Wallace wrote: Matthias Fischmann [EMAIL PROTECTED] wrote: No, your Fin type can also hold infinite values. let q = FinCons 3 q in case q of FinCons i _ - i == _|_ does that contradict, or did i just not understand what you are saying? That may be

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Matthias Fischmann
[start this post by reading the last paragraph, i just needed to go through the rest to figure it out for myself.] On Wed, Oct 11, 2006 at 03:14:23PM +0100, Malcolm Wallace wrote: To: haskell-cafe@haskell.org From: Malcolm Wallace [EMAIL PROTECTED] Date: Wed, 11 Oct 2006 15:14:23 +0100

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Ross Paterson
On Wed, Oct 11, 2006 at 11:04:49AM -0400, Robert Dockins wrote: let q = seq q (FinCons 3 q) in q(beta) We have (from section 6.2): seq _|_ y = _|_ seq x y = yiff x /= _|_ Now, here we have an interesting dilemma. The meaning of a recursive definition is the

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Robert Dockins
On Oct 11, 2006, at 11:14 AM, Ross Paterson wrote: On Wed, Oct 11, 2006 at 11:04:49AM -0400, Robert Dockins wrote: let q = seq q (FinCons 3 q) in q(beta) We have (from section 6.2): seq _|_ y = _|_ seq x y = yiff x /= _|_ Now, here we have an interesting

[Haskell-cafe] Re: Trying to understand HList / hSequence now [why it works]

2006-10-11 Thread Matthias Fischmann
On Tue, Oct 10, 2006 at 07:45:28PM -0700, [EMAIL PROTECTED] wrote: To: [EMAIL PROTECTED] Cc: haskell-cafe@haskell.org From: [EMAIL PROTECTED] Date: Tue, 10 Oct 2006 19:45:28 -0700 (PDT) Subject: Re: Trying to understand HList / hSequence now [why it works] Matthias Fischmann wrote:

Re: [Haskell-cafe] [off-topic / administrative] List Reply-to

2006-10-11 Thread Udo Stenzel
Mikael Johansson wrote: On Tue, 10 Oct 2006, Misha Aizatulin wrote: Here is an argument against Reply-To munging. I'd say I agree with it: http://www.unicom.com/pw/reply-to-harmful.html * It provides no benefit to the user of a reasonable mailer. [...] 1) get multiple copies of mails

Re: [Haskell-cafe] [off-topic / administrative] List Reply-to

2006-10-11 Thread Mikael Johansson
On Wed, 11 Oct 2006, Udo Stenzel wrote: Mikael Johansson wrote: * It removes important information, which can make it impossible to get back to the message sender. This is the most important bit, actually. Anyone who wants to post a single question to haskell or haskell-cafe has to be

Re: [Haskell-cafe] [off-topic / administrative] List Reply-to

2006-10-11 Thread Antti-Juhani Kaijanaho
Robert Dockins wrote: I think (pure speculation) the haskell.org mail server is set up to omit people from mail it sends if they appear in the To: or Cc: of the original mail. Yes, this is a feature of recent Mailmans. Finally, I agree that reply-to munging is a bad idea, but I don't think

Re: Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Nicolas Frisby
For my own edification (experts: please remark if I stray from any conventional notions--be as picky as possible) and perhaps for anyone who didn't quite grok Ross Paterson's punchline, I'm going to try to answer the question How does seq affect the definedness CPO? At the heart of these two

[Haskell-cafe] ghc 6.2.2 seems to ignore -package when there's a -prof option

2006-10-11 Thread Seth Gordon
I have a program using HSQL that I'm trying to profile. When I do ghc program.hs -package hsql -o program it compiles fine, but when I do ghc -prof -auto-all program.hs -package hsql -o program I get error messages saying failed to load interface for `Database.HSQL' and so forth, the same way

[Haskell-cafe] Quantifying Partial Type Annotations

2006-10-11 Thread Philippa Cowderoy
I've done a bit more thinking about partial type annotations (as proposed on the Haskell' list), and I have a somewhat more concrete proposals for some of the extensions to them that perhaps also makes more sense of the original basic idea as well. I'm sending it to the Cafe this time as it's

Re: [Haskell-cafe] [off-topic / administrative] List Reply-to

2006-10-11 Thread Udo Stenzel
Robert Dockins wrote: FWIW, I'm using Apple's Mail.app, and it doesn't have a reply-to- list. In fact, I don't know of a mail client off the top of my head that does Mutt does. But that's to be expected, considering that it was written because the author was fed up with the poor handling of

Re: [Haskell-cafe] Quantifying Partial Type Annotations

2006-10-11 Thread Brandon Moore
Philippa Cowderoy wrote: I've done a bit more thinking about partial type annotations (as proposed on the Haskell' list), and I have a somewhat more concrete proposals for some of the extensions to them that perhaps also makes more sense of the original basic idea as well. I'm sending it to

Re: [Haskell-cafe] ghc 6.2.2 seems to ignore -package when there's a -prof option

2006-10-11 Thread Duncan Coutts
On Wed, 2006-10-11 at 16:01 -0400, Seth Gordon wrote: I have a program using HSQL that I'm trying to profile. When I do ghc program.hs -package hsql -o program it compiles fine, but when I do ghc -prof -auto-all program.hs -package hsql -o program I get error messages saying failed

Re: Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Cale Gibbard
On 11/10/06, Nicolas Frisby [EMAIL PROTECTED] wrote: Intuitively q = lfp f = f(f(f(f(f(f (f(f(f _|_)))...)(*) r = lfg g = g(g(g(g(g(g (g(g(g _|_)))...) (**) This way of writing it would imply (at least to me) that the number of f's and g's involved is

[Haskell-cafe] Yet Another Haskell Tutorial Question

2006-10-11 Thread Bill Mill
I've been working through the Yet Anther Haskell Tutorial at http://www.cs.utah.edu/~hal/docs/daume02yaht.pdf , and I've gotten up to Excercise 4.6. It says: === YAHT === Write a datatype Tuple which can hold one, two, three or four elements, depending on the constructor (that is, there should

Re: [Haskell-cafe] Yet Another Haskell Tutorial Question

2006-10-11 Thread Tamas K Papp
On Wed, Oct 11, 2006 at 09:16:57PM -0400, Bill Mill wrote: I've been working through the Yet Anther Haskell Tutorial at http://www.cs.utah.edu/~hal/docs/daume02yaht.pdf , and I've gotten up to Excercise 4.6. It says: Have you checked the solution? Page 167. Tamas

Re: [Haskell-cafe] Yet Another Haskell Tutorial Question

2006-10-11 Thread Cale Gibbard
That's about right, though you could shorten a few of the definitions by matching with the wildcard pattern _ like this: tuple4 :: Tuple a b c d - Maybe d tuple4 (QuadrupleTuple a b c d) = Just d tuple4 _ = Nothing It's also possible to use case: tuple3 :: Tuple a b c d - Maybe d tuple3 x =

Re: [Haskell-cafe] Yet Another Haskell Tutorial Question

2006-10-11 Thread Bill Mill
On 10/11/06, Tamas K Papp [EMAIL PROTECTED] wrote: On Wed, Oct 11, 2006 at 09:16:57PM -0400, Bill Mill wrote: I've been working through the Yet Anther Haskell Tutorial at http://www.cs.utah.edu/~hal/docs/daume02yaht.pdf , and I've gotten up to Excercise 4.6. It says: Have you checked the

[Haskell-cafe] Re: Quantifying Partial Type Annotations

2006-10-11 Thread Ashley Yakeley
Philippa Cowderoy wrote: I'd like to propose a new quantifier for type variables, which for now I'll call unknown[1] - correspondingly I'll talk about unknown-quantified variables and probably unknown variables where it's not ambiguous. Unqualified type variables are of course implicitly