Re: Overlapping, undecidable, incoherent -- or worse?

2004-05-21 Thread Alex Ferguson
On Thu, May 20, 2004 at 11:06:44PM +0100, MR K P SCHUPKE wrote: I agree, I have made it not terminate myself with undecidable-instances, Congratulations. ;-) I also think prolog style backtacking would be a good idea... I think I said that you either want full backtracking or you want to

Re: Overlapping, undecidable, incoherent -- or worse?

2004-05-21 Thread Alex Ferguson
On Fri, May 21, 2004 at 11:04:53AM +0100, Simon Peyton-Jones wrote: Nothing difficult in principle, but the constraint solver is one of the more delicate parts of GHC because GHC's constraint language has become so complex. Well, as my day job is working for a constraints lab, I feel it's my

Re: Overlapping, undecidable, incoherent -- or worse?

2004-05-20 Thread Alex Ferguson
On Thu, May 20, 2004 at 08:52:45AM +0100, Simon Peyton-Jones wrote: | You don't say what you are trying to achieve. However it looks as if | you mean If you want PO T, for some type T, first try (Bounded T, Enum | T, SemiRing T) and if that fails try CSemiRing T. Or maybe the other | way round.

Re: Overlapping, undecidable, incoherent -- or worse?

2004-05-20 Thread Alex Ferguson
On Thu, May 20, 2004 at 03:52:49PM +0100, MR K P SCHUPKE wrote: I don't know whether this was apparent, but only the instance pattern is used in determining which instance to use, so PO a is the same as PO a ... you need to make them different otherwise they don;t just overlap they are

Re: Overlapping, undecidable, incoherent -- or worse?

2004-05-20 Thread Alex Ferguson
On Thu, May 20, 2004 at 05:16:45PM +0100, MR K P SCHUPKE wrote: That's not the notion of priority I was referring to. Any type of priority would not help. As I said then the instance heads are identical (PO a) and (PO a) - no kind of priority will help differenciate the, I wasn't talking

Re: Overlapping, undecidable, incoherent -- or worse?

2004-05-20 Thread Alex Ferguson
On Thu, May 20, 2004 at 05:27:43PM +0100, MR K P SCHUPKE wrote: I wasn't talking about _any_ notion of ordering of instance heads; I said that prioritising instance _declarations_ themselves, explicitly, by 'name' would suffice. How does that help... if you name the instances differently

Re: Overlapping, undecidable, incoherent -- or worse?

2004-05-20 Thread Alex Ferguson
On Thu, May 20, 2004 at 05:58:53PM +0100, MR K P SCHUPKE wrote: The alternative to the current situation is to take into account the dependancies of instances when selecting. The problem here is that the compiler may select an instance, evaluate its dependencies, only to discover somewhere

Re: Overlapping, undecidable, incoherent -- or worse?

2004-05-20 Thread Alex Ferguson
On Thu, May 20, 2004 at 07:34:18PM +0100, MR K P SCHUPKE wrote: that is not the case with -fallow-undecidable-instances ... as far as I understand it , ghc never considers the dependancies when selecting an instance. If you don't think so you will need to show me an example where it clearly

Re: Overlapping, undecidable, incoherent -- or worse?

2004-05-20 Thread Alex Ferguson
On Thu, May 20, 2004 at 09:25:20PM +0100, MR K P SCHUPKE wrote: Thats it... Neither GHC nor Hugs pay any attention to the dependancies when choosing which instance to use. The dependancies are only considered after the decision has been irrevocably made. If the dependancies don't hold, the

Overlapping, undecidable, incoherent -- or worse?

2004-05-19 Thread Alex Ferguson
The following rings a faint bell from somewhere, but if there's a standard workaround I can't recall or lay my hand on it currently: class PO a where (|=) :: a - a - Bool class Num a = SemiRing a class SemiRing a = CSemiRing a instance (Bounded a, Enum a, SemiRing a) = PO a where

Re: Question about compiling CGIs with Ghc

2003-02-17 Thread Alex Ferguson
On Mon, Feb 17, 2003 at 11:00:13AM -, Simon Marlow wrote: I have some CGI programs running with Hugs and I want to use GHC instead. What changes must I do to the .hs file? Is it an easy job? Depends on lots of things really. The CGI library that comes with GHC is

Bracketless branch if, sugar to taste...

2003-02-13 Thread Alex Ferguson
Yes indeed, one can further sugar Keith's suggestion to eliminate the need for brackets around the branches. Though as this means using an infix operator then and else, with corresponding mangling of the lexical appearance of same, this becomes increasingly a matter of taste (or perhaps, in need

Re: ghc/cygwin filename resolution issue.

2003-01-30 Thread Alex Ferguson
Alex As Simon M says, if you (or anyone else) felt able to write up a standalone summary of what the problem is, and what the solution is, I'd love to add it to the GHC FAQ or documentation somewhere. In my experience, simply explaining the problem clearly is quite tricky. (E.g. the

Re: ghc/cygwin filename resolution issue.

2003-01-29 Thread Alex Ferguson
Thanks to all for the replies; Hal's resolution rings a bell, now that I think about it, from Ye Olde Days when cygwin was a ghc pre-req -- just didn't think of it when installing more recently on a new machine. (Install in haste, repent at leisure.) Claus' suggestion about relative paths does

ghc/cygwin filename resolution issue.

2003-01-28 Thread Alex Ferguson
Using ghc-5.04.2 under cygwin, and cygwin (v. 1.3.10-1), I'm having some horrible problems with inconistent treatment of filenames, especially when using (gnu, cygwin) make. In a nutshell, make seems to be passing paths such as /usr/local/hmake (etc) to ghc, which is, as I understand it,

RE: extra_ghc_opts syntax

2001-09-26 Thread Alex Ferguson
Just write the list twice, once with the quotes and commas and once without? Alternative I guess you could try to transform one into the other using sed, perl, python, etc. but I would just do it the easy way. Doesn't everyone on this list use Haskell for their string-processing, then? ;-)

Possibly ancient history non-compliance.

2001-08-23 Thread Alex Ferguson
ghc-4.04 and ghc-4.08 both complain about the following: No instance for `Show HandlePosn' But according to the report, they should be showable (if precious little else). Haven't a version of 5.00 to hand (but will be installing 5.02, promise!) so I haven't checked if this has changed

ghc-4.xx Alpha port?

2000-11-30 Thread Alex Ferguson
Hi guys. Has anyone been so rash as to try this? Any indications as to the likely "degree of difficulty"? I'd have a go myself, but I'm rather busy with teaching. (Which is ironic, since teaching is what I want it for...) Cheers, Alex. ___

TclHaskell probs.

2000-09-21 Thread Alex Ferguson
Hi all. I've had a problem with cascade menus with TclHaskell under Solaris, running tcl and tk vs 8.0. In short, they don't (cascade, that is). Anyone else found this, and better yet, do they have a fix? The same code runs fine on Cygwintel... Cheers, Alex.

TclHaskell query.

2000-03-15 Thread Alex Ferguson
Hi there. I fear this may end up being not so much a TclHaskell as a 'power Tcl/Tk' question, but I thought I'd try here first on the off-chance. I'm looking for a widget that acts essentially like a listbox (scrolls, selectable entries), but which isn't restricted to single lines of text in

RE: Collection types.

1999-12-09 Thread Alex Ferguson
SPJ: Yes, Jeff Lewis is well advanced with adding functional dependencies to GHC. Certainly, if you get GHC from the CVS tree you are getting wads of his F-D code. I don't think it's completed yet, though. Stay tuned Excellent stuff. I _think_ this solves a problem I may be about to have

Re: GHC Select and Time modules - struct timeval

1999-12-08 Thread Alex Ferguson
Keith Wansbrough: If the Integer is greater than 2^64-1 then simply pass NULL to select(): I think 595 000 years is near enough forever given current operating systems... Quincentomillennium bug, anyone? ;-) Cheers, Alex.

Re: deleteBy

1999-12-08 Thread Alex Ferguson
S. Alexander Jacobson: Can we stop polluting the namespace with list based function definitions? Most of these functions: delBy, filter, map, concat, length, take, takeWhile, etc. are well specified for data structures other than lists. Regardless of whether Haskell includes generic

A case in point.

1999-12-07 Thread Alex Ferguson
John Atwood: You have it right, except you need to 1) explicitly type test, test:: Reader [Char] Char José Romildo Malaquias: --- test = do env - ask if env == "choose a" then return 'a' else return 'b' do_test =

My head just exploded too.

1999-12-06 Thread Alex Ferguson
Although I'd read the restriction in advance, I nevertheless unwittingly contrived to try and write a binding-group style pattern-match against an existentially quantified data constructor. Oops. (Actually, I did it twice, what's worse...) I can imagine this is indeed an irksome thing to TC,

RE: My head just exploded too.

1999-12-06 Thread Alex Ferguson
Me: | Although I'd read the restriction in advance, I nevertheless | unwittingly | contrived to try and write a binding-group style pattern-match against | an existentially quantified data constructor. Oops. (Actually, I did | it twice, what's worse...) I can imagine this is indeed an

Type application: a modest proposal.

1999-12-06 Thread Alex Ferguson
Now that rank-2 polymorphism seems to be part of the 'received standard' (at least two implementations support 'em, and I assume they're a shoo-in for Haskell 2), couldn't we really also do with type application? It seems that ambiguity is here to stay in Haskell, and in principle R2L makes the

A case in point.

1999-12-06 Thread Alex Ferguson
John Atwood: You have it right, except you need to 1) explicitly type test, test:: Reader [Char] Char José Romildo Malaquias: --- test = do env - ask if env == "choose a" then return 'a' else return 'b' do_test =

RE: Type application: a modest proposal.

1999-12-06 Thread Alex Ferguson
Frank Christoph: I think he means the application term associated with second-order lambda calculus' "big lambda," usually written "M [T]" or just "M T" where M is a value term and T is a type term, e.g., "(/\X.\x.x) Int 3". Should be: "(/\X.\x:X.x) Int 3". (Doesn't make much sense if

Re: New debugging option `-xc'

1999-11-30 Thread Alex Ferguson
Keith Wansbrough: I've just added a new RTS option to GHC in the CVS repository. Running a program compiled with -prof with the -xc runtime option on will cause it to display the current cost-centre stack on stderr whenever an exception is raised. This will give you an idea of which

_ccall_

1999-11-30 Thread Alex Ferguson
Hi all. Just started playing around with ccall, and while I managed to get my toy program to Do The Right Thing, I got a mildly alarming looking warning message from gcc, re: athe lack of an explicit type for the generated C call. I don't see anything about this in the users guide, either

RE: _ccall_

1999-11-30 Thread Alex Ferguson
Hi there. it is mentioned in the user's guide, http://haskell.org/ghc/docs/latest/users_guide/users_guide-5.html#glasgow-fo reign-headers Ah, that: I managed to read that entire section at least once, and completely misunderstand. I thought that was talking about something else

What to wish for.

1999-11-25 Thread Alex Ferguson
Eduardo Costa on small Haskell compilers: Besides, it becomes easier to install, and uninstall. For instance, Dr. Alcimar (that you know quite well) is finishing his prosthetic arm for amputees. Clean was able to produce code that was small enough, uses heap sparingly, and was fast enough to

Re: Existential types, save me now?

1999-11-22 Thread Alex Ferguson
Hi Fergus. data OrdFuncExist = OE (Ord a = Char - a) That's not the syntax for a existential type, that's the syntax for a universally quantified type with rank-2 polymorphism. With that syntax, the argument of `OE' must be a polymorphic function with type `forall a . Ord a = Char -

RE: Existential types, save me now?

1999-11-22 Thread Alex Ferguson
Hi Mark, all: thanks for the swiftly muddle-dispelling response. | Here's some of the threatened examples: | | data OrdFuncExist = OE (Ord a = Char - a) | data OrdListExist = OLE (Ord a = [a]) Perhaps this is a GHC/Hugs difference, but the syntax that you've used here isn't

Existential types, save me now?

1999-11-22 Thread Alex Ferguson
Hi all. I'm wrestling with a typing problem, which I keep hoping that I ought to be able to solve with existentially quantified data types, but such a problem keeps eluding me, leading me to rend my hair at the prospect of instead having to use a some sort of dynamic type or universal type

Re: Existential types, save me now?

1999-11-22 Thread Alex Ferguson
Hi Fergus. data OrdFuncExist = OE (Ord a = Char - a) That's not the syntax for a existential type, that's the syntax for a universally quantified type with rank-2 polymorphism. With that syntax, the argument of `OE' must be a polymorphic function with type `forall a . Ord a = Char -

Oops. [RE: Existential types, save me now?]

1999-11-22 Thread Alex Ferguson
Alex, malreported, haskell and ghc-users lists...: It does me ego no end of good to find out that I'm right, and the compiler is wrong (for a change, it must be said...). Unless either ghc or hbc catch up to the Hugs extension, though, avails me little in practice, sadly. (Hint, hint.) I

Re: Existential types, save me now?

1999-11-22 Thread Alex Ferguson
Here's some of the threatened examples: data OrdFuncExist = OE (Ord a = Char - a) data OrdListExist = OLE (Ord a = [a]) emap :: OrdFuncExist - [Char] - OrdListExist emap (OE f) l = OLE (map f l) Grand... (Apparently.) But now I try to define an actual OrdFuncExist: blah = OE

RE: Existential types, save me now?

1999-11-22 Thread Alex Ferguson
Hi Mark, all: thanks for the swiftly muddle-dispelling response. | Here's some of the threatened examples: | | data OrdFuncExist = OE (Ord a = Char - a) | data OrdListExist = OLE (Ord a = [a]) Perhaps this is a GHC/Hugs difference, but the syntax that you've used here isn't

Re: Partial Type Declarations

1999-11-17 Thread Alex Ferguson
Koen Claessen: I want to propose a modest extension to Haskell, which would solve a common irritating problem in programming in Haskell, and on-the-fly solves the practical programming problems occuring due to the monomorphism restriction. I've banged into this more than once, so I have

No Subject

1999-11-16 Thread Alex Ferguson
The Sender field should be ignored (as per RFC 822) by mail software if there's a From field. The first From field is not legal as it is not delimited by a ':' I'd say the Pine setup is wrong. --Sigbjorn

RE: ghc-4.03 on cynwin deriving oddity.

1999-10-13 Thread Alex Ferguson
It's a bug, which is fixed in 4.04 Ah-hah... (I could likely have tested this myself, had I had the gumption...) (a Win32 version of which is due out shortly.) Excellent. For one scary moment thoughts like 'Windoze build from source' were going through my head. Cheers, Alex.

Re: Building GHC on a PPC Mac

1999-10-12 Thread Alex Ferguson
From UNKNOWN Received: from joyce.ucc.ie by vanuata with SMTP (MMTA) with ESMTP; Tue, 12 Oct 1999 15:45:59 +0100 Received: (from abf@localhost) by joyce.ucc.ie (8.7.3/8.7.3) id PAA11955 for [EMAIL PROTECTED]; Tue, 12 Oct 1999 15:45:02 +0100 (BST) [This

Re: ghc-4.03 on cynwin deriving oddity.

1999-10-12 Thread Alex Ferguson
enumerate :: (Enum a, Bounded a) = [a] enumerate = [minBound .. maxBound] data Test = Foo | Bar | Blah | Nonsense deriving (Show, Enum, Bounded) main = print (enumerate :: [Test]) BASH.EXE-2.02$ ghc-4.03 -static Enum.o BASH.EXE-2.02$ ./a.exe [Foo,Foo,Foo,Foo] To be a tad

O, O'Haskell, where are you?

1999-10-12 Thread Alex Ferguson
Does anyone have a 'live' link to Johan Nordlander's O'Haskell? http://www.cs.chalmers.se/~nordland/ohaskell/ seems to be unwell. Cheers, Alex.

Re: OO in Haskell

1999-10-06 Thread Alex Ferguson
Kevin Atkinson and I argue about C++'s 'Cleaner more natural syntax': I would like to be able to do the things in Haskell that I can do in C++ but currently Haskell's type system is too simple to allow me to do them. There are also some things I can't do in C++ but really wish I could, I

Re: OO in Haskell

1999-10-06 Thread Alex Ferguson
Me: Your 'partial' list would appear, from a initial inspection, to leave little left of either type safety or referential transparency. KA: Could explain how they could. There is a very nice paper written up on True ad-hoc polymorphism. By a build in build in dynamic type system I

Re: OO in Haskell

1999-10-05 Thread Alex Ferguson
Kevin Atkinson: 2) More specific types, you can't _easilly_ call the more general type. For example in OO this is very commen: class Base virtual foo() do stuff class Derived, extends Base foo() call Base::foo() doo stuff You can certainly do this in Haskell;

Re: OO in Haskell

1999-10-05 Thread Alex Ferguson
Kevin Atkinson: 3) Encapsulation. You can't have private and protected members. Some of this can be done using modules. However it is more work. What exactly can't be done with classes, and how, substantively, is it more work? class Foo private: -- only members of the Foo

Re: Where is Server Side Scripting code?

1999-10-04 Thread Alex Ferguson
Jan Skibinski: What is available from haskell.org are two much outdated versions of CGI library: one by Erik himself and one modified (and adopted to Haskell 98) by Sven Panne. By outdated I mean that they both are based on Erik's earlier work and much predate the refined and simplified

ghc-4.04, Alpha.

1999-10-01 Thread Alex Ferguson
In order to install ghc-4.04, I need to install the binary v. of 2.10 (this should be OK for doing that, right?) Immediately I come a cropper, thus: wisdom.ucc.ie:~/ghc210/fptools: gnumake in-place gnumake config-pkgs bindir=`pwd`/bin/alpha-dec-osf1/ghc-2.10 libdir=`pwd`/lib/alpha-dec-osf1

Re: ghc-4.04, Sun Solaris 2.5.

1999-10-01 Thread Alex Ferguson
I wrote: syntax error at ../../ghc/driver/ghc line 1855, near "sub runLinker(" Execution of ../../ghc/driver/ghc aborted due to compilation errors. gnumake: *** [Adjustor.o] Error 255 Evidently Perl versionitis. 5.001 no like; 5.005 likum plenty fine. (This seems familiar, but I didn't

ghc-4.04, Sun Solaris 2.5.

1999-09-30 Thread Alex Ferguson
yeats.ucc.ie:~/ghc44/build/ghc/rts: gnumake all ../../ghc/driver/ghc -I../includes -I. -Igum -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wbad-function-cast -O2

RE: NON-ANNOUNCEMENT: The Glasgow Haskell Compiler, version 4.05?

1999-09-30 Thread Alex Ferguson
After a release, the version number in the repository is bumped up by one, that's all there's to these rumours. A release of 4.05 isn't due anytime soon (you have to report *all* the bugs in 4.04 first :-) I had better install it first, then... Unless you want to become a fptools CVS

Re: CPP is not part of Haskell

1999-09-30 Thread Alex Ferguson
Either, cpp (or some preprocessor standard), should be made part of the Haskell language definition or Haskell files that require a preprocessor should have a different extension. Since, I assume that the hugs team has a good reason not to build in cpp functionality, I am suggesting

ghc-4.03/cygwin catch-33.

1999-09-29 Thread Alex Ferguson
Program won't compile in default max heap; -H objects that I should instead use -M, to raise same; -M isn't a recognised option. Fixing any one of these would do. ;-) (If it's fixed in 4.04 or 4.05, extra credit for a binary build: I've just about maxed out on Windows tinkering for the

Re: CynWinTclHaskell...?

1999-09-28 Thread Alex Ferguson
Does anyone else have experiences of building TclHaskell under CygWin? I'm assured that it ought to be possible, but have had no luck; crib sheets greatly appreciated. (Partial credit for negative results like 'it's a bust, drop back and punt to Linux'.) Cheers, Alex.

Re: OO in Haskell (was Re: What *I* thinks Haskell Needs.)

1999-09-28 Thread Alex Ferguson
From [EMAIL PROTECTED] Mon Sep 27 18:50:33 1999 X-Authentication-Warning: sun00pg2.wam.umd.edu: kevina owned process doing -bs Date: Mon, 27 Sep 1999 13:50:59 -0400 (EDT) Kevin Atkinson: You have a collection of Shapes. Some of these shapes are circles, however, others are rectangle.

Re: To all those who don't like ad-hoc overloading

1999-09-28 Thread Alex Ferguson
Kevin Atkinson: I take it that you are happy with names such as: [long list] Yes. Certainly I'm more than happy that types with completely different signatures have different names.

Re: What *I* thinks Haskell Needs.

1999-09-28 Thread Alex Ferguson
Fergus Henderson: One example is the case where you already have existing code that creates a heterogenous collection, and you want to extract an element from that heterogenous collection, and then if it is a member of a particular type class perform action A otherwise perform action B,

Re: Mailing lists down for a while, should be back up now

1999-09-27 Thread Alex Ferguson
Maintainer's note: The Haskell mailing list, and all the other lists served by haskell.org, have recently moved to a new machine (the "real" haskell.org). None of the addresses have changed, and the address for admin requests is still [EMAIL PROTECTED] The mail headers certainly

Re: What *I* thinks Haskell Needs.

1999-09-27 Thread Alex Ferguson
Kevin Atkinson, replying to me: If I understand you correctly, then the best way of doing this would be with existentially (boundedly) quantified data types, currently a non-standard extention present in hbc (and I think, ghc, these days, not sure if it's with the same generality.)

Re: What *I* thinks Haskell Needs.

1999-09-27 Thread Alex Ferguson
Kevin Atkinson: Yes but often putting things in type classes is tedious to do. I also want to be able to overload not only on the TYPE of parameters but also on the NUMBER of parameters. It IS possible to do these things and it DOES make sense in a curing system. That's far from clear.

Re: What *I* thinks Haskell Needs.

1999-09-27 Thread Alex Ferguson
Fergus Henderson, replying to me: That's far from clear. Certainly, I don't think it's likely to be reasonably possible a conversative extension. [...] Ad-hoc overloading and type inference don't mix so well, because you can easily get ambiguities which the compiler cannot resolve.

CynWinTclHaskell...?

1999-09-24 Thread Alex Ferguson
I've managed to entirely confuse myself trying to install TclHaskell on a Wintel machine, via Cynwin and ghc-4.03. Poking around it looks like the problem is with the Tcl/Tk libraries, which seem to have been complied up with Visual C++. Now, is there a magic incantation that will persuade

RE: Message repeats: Alleged WinTel v4.03 bugs?

1999-09-13 Thread Alex Ferguson
'getEnv "PATH"' returns, not the value of PATH, but the whole environment. Which is also handy, but not what I understood the report to specify, and not what ghc-4.02 does on this 'ere Sun. Can someone comment on (esp.) the second of these? Is this reproducible, is it the

Alleged WinTel v4.03 bugs?

1999-08-28 Thread Alex Ferguson
Two oddities I've noticed with ghc-4.03, win+cygnus binary build: The -ansi flag makes gcc go berserk on the generated code. I stopped. 'getEnv "PATH"' returns, not the value of PATH, but the whole environment. Which is also handy, but not what I understood the report to specify, and not

Re: Windows NT installer works.

1999-08-28 Thread Alex Ferguson
Mircea Draghicescu: The other question still remains: is this 4.03 or 4.04? Having recently dl'd the same thing, looks a lot like ghc-4.03 to me... I presume there's not a binary build for 4.04 (at least, not yet).

Re: Which GUI on X11R6 ?

1999-08-02 Thread Alex Ferguson
Wilhelm B. Kloke: has anybody there an idea which GUI is usable with Haskell 98 on a Unix/X11R6 system (FreeBSD to be complete)? It seems that all GUI stuff develepmont (Fudgets, Haggis ...) has been stalled since some years. I'd look at TclHaskell, if I were you. It's not strictly

Re: Associativity of $

1999-07-20 Thread Alex Ferguson
Manuel Chakravarty and Olaf Chitil debate the fixity of ($): I think the idea behind $ is exactly the change of associativity. Hmm, I thought, the idea behind it is a change of precedence... I use $ a lot to save a lot of brackets. I very much prefer f $ g $ h $ i $ j $ x

Will the real CGI library please stand up?

1999-06-15 Thread Alex Ferguson
Erik Meijer's nifty-looking CGI library, as described in his upcoming JFP paper, looks like just the very thing I'm looking for, but alas, I can't find a complete copy of the code anyplace. In particular, some of combinators in the paper have only type sigs, not complete definitions, and are

Error error.

1999-03-04 Thread Alex Ferguson
The following is a genuine type error, but the first message appears to be rather 'parasitic', not to mention not making any actual sense. It's caused by having a spurious type context around a type with no type vriables (as per the second error message, which is immaculate...) Case.hs:378:

Calling Haskell from...

1999-02-25 Thread Alex Ferguson
What's the state of the art as regards calling Haskell functions from 'the outside world'? I note that Haskell Direct has this in its manifesto, but says "currently unsupported". Does that mean a moderate size black hole at the centre of something still potentially usable, or nothing much at

Re: Modifying the monomorphism restriction

1999-02-25 Thread Alex Ferguson
Joe English: I was thinking of the example from the Haskell Report: let { len = genericLength xs } in (len, len) which, without the MR, computes 'len' twice. Operationally I expect that in "let x = f y in ... x ... x", 'f y' is only evaluated once, no matter what type it is. If

Re: Modifying the monomorphism restriction

1999-02-24 Thread Alex Ferguson
Joe English: (Am I the only one who's never been bitten by the MR restriction?) If one always uses type sigs, or never/rarely uses compositional/ combinator style function definitions, it's much less likely to crop up. How about leaving the 'a = b' binding form as it is, (monomorphism

Re: Modifying the monomorphism restriction

1999-02-24 Thread Alex Ferguson
Thomas Hallgren: The monomorphism restriction makes sure that certain values are computed at most once by restricting them to be used at only one type. Couldn't the same be achieved by * getting rid the monomorphism restriction, i.e., let all definitions to be overloaded by

Re: Haskell 2 -- MR, for Curry's sakes go.

1999-02-23 Thread Alex Ferguson
John Launchbury: I agree that the MR is a pain. [...] Now we find that some type declarations contain more class info than type!! And some type(+class) declarations are longer than the definition! This sounds a trite point, but it gets very annoying when one is "rapid-prototyping" (aka

RE: Strange ghc-4.02 TC bug?

1999-02-18 Thread Alex Ferguson
Not a typechecker bug; more a bizarre consequence of overlapping instance decls. OK, a typechecker misfeature, then, so I'll cross-reply to ghc-users. ;-) The instance decl instance Holidays a = Eq a overlaps with absolutely every other instance decl for Eq. In order to make

Strange ghc-4.02 TC bug?

1999-02-17 Thread Alex Ferguson
Discern that the following program is apparently well-typed: module M2 where class Eq a = Lattice a where bottom :: a data Inv a = INV a deriving Eq instance Lattice a = Lattice (Inv a) class Holidays a where holCode :: a - Int -- instance Holidays a = Eq a Now,

ghc-4.02 -- space.

1999-02-16 Thread Alex Ferguson
Quite impressed with 4.02 so far -- it walks the walks, see promohype elsewhere, why should I give you all too much free advertising? ;-) It does indeed seem to be more go-faster than 3.02, _but_: No profiling! Boo, hiss. Funny space behaviour -- a module I have that contains just one

RE: Uncompiling internal names...

1999-02-11 Thread Alex Ferguson
Hi Simon, thanks for the tips; We havn't checked out the profiler, remember. I'm using 3.02, I should have mentioned. (For this very reason.) Here's our convention for splitting up the interface file name space: d...dictionary identifiers (local

Uncompiling internal names...

1999-02-10 Thread Alex Ferguson
What do "$m" identifiers correspond to? I'm getting one of these lob up in a -prof -auto cost centre, and I don't know what/where/how it corresponds to. While I'm on the general topic, any hints'n'tips on decoding $d's? In a name like $dEqPriority0, I presume the first two elements are Class

Re: io monad binding, coding style

1999-01-17 Thread Alex Ferguson
Greg O'Keefe: main =readFile "input-file" = \ s - writeFile "output-file" (filter isAscii s) putStr "Filtering succesful\n" [vs.] main =readFile "input-file" = \ s - writeFile

Re: Partial Type Declarations

1999-01-16 Thread Alex Ferguson
Patrik Jansson: I like ? better than .., but maybe the Haskell "don't care"-symbol _ could be even more suggesting: q :: a - _ - c qa_ = c Syntactically this is closer to what is currently allowed as type variables and it would easily (in the sense that such a production

RE: RTS flags, at compile time?

1998-12-15 Thread Alex Ferguson
Ah-hah! So I should just be able to write, in rts.c: #include "Rts.h" void defaultsHook (void) { RTSflags.GcFlags.stksSize = 102 / sizeof(W_); RTSflags.GcFlags.heapSize = 802 / sizeof(W_); } Well, sort of. I forgot to mention that we

RE: RTS flags, at compile time?

1998-12-14 Thread Alex Ferguson
Thanks Simon, though I'm still a tad at sea... Of course you can! Take a look at the User Guide, section 2.12: http://www.dcs.gla.ac.uk/fp/software/ghc/4.01/users_guide/users_guide-2.html #ss2.12 (under "RTS options for hackers...") That says it all, I have a nasty feeling... For a

RE: RTS flags, at compile time?

1998-12-14 Thread Alex Ferguson
Looks like the docs are a tad out of date, sorry about that. Patch follows (you want ghc/rts/RtsFlags.h and ghc/includes/Rts.h respectively). Ah-hah! So I should just be able to write, in rts.c: #include "Rts.h" void defaultsHook (void) { RTSflags.GcFlags.stksSize = 102

RTS flags, at compile time?

1998-12-13 Thread Alex Ferguson
Is there as yet any way to "compile in" particular RTS flags (or particular defaults), when invoking ghc? Most obviously, heap size... Slan, Alex.

RE: GHC 4.01 gmake all problem

1998-12-02 Thread Alex Ferguson
Very strange - either/both of you fans of autoheader? Dunno about Jan or Keith, but I certainly amn't! And yet, I get the same error, and what's worse, on my first (attempted) build of the compiler. However, I did re-run configure at one point; is that the root of this particular evil?

i386-unknown-solaris2?

1998-12-02 Thread Alex Ferguson
Has anyone out there tried to install ghc (any version whatsoever) on a PC running Solaris 2.n? Results of keen interest. Slan, Alex.

Linker problem with ghc-4.01 (s-s-s binary).

1998-12-02 Thread Alex Ferguson
An unsuspecting little program of mine crunches out the binary distrib of 4.01, with "library -lgmp: not found" (full output appended). Any clues as to what's up here? (Apologies if this is blitheringly obvious, or just a shoddy report, about to fall into bed...) Slan, Alex. _

RE: What's happening here?

1998-12-02 Thread Alex Ferguson
Picking up the wrong "ghc", perhaps? Hard to tell - what does 'ghc --version' report? 4.01 (which wasn't what I had intended, btw, and Simon has already avised is a Bad Idea -- more inter-machine configuration confusion on my part, sorry). What puzzled me was that it was just invoking

ghc-4.00, s-s-s binary.

1998-11-19 Thread Alex Ferguson
Note the Strange behaviour below... Module in question compiles without -O, but not with... Slainte, Alex. _ oconnor.ucc.ie:~/filt4: make OPT=-O ghc-4.00 -c GalileoModules.lhs -H30m -K2M -recomp -fglasgow-exts -cpp -syslib misc -Rgc-stats -dshow-passes

Non-variable instance contexts.

1998-11-17 Thread Alex Ferguson
I hate this error. Whilst arguably this is an "untested" extension to Standard Haskell, it seemed pretty sound in practice. Can't we at least have it back as a GlaExt? (MSExt?) I'm starting to feel more than a little Quaint having to use ghc-3.01, just to get my programs to compile... (If

Re: reply to `I hate this error'

1998-11-17 Thread Alex Ferguson
Sergey writes: Is not this due to omitting -optC-fallow-undecidable-instances -optC-fallow-overlapping-instances ? Sorry, if i am missing the point. No, I was! ;-) And thanks to Simon(s) for pointing this out, too. Mind you, I somewhat object to the "undecidable" bit: I

4.00, s-s-s bug.

1998-11-17 Thread Alex Ferguson
Here's a very cut down version of the bug-exhibiting program mentioned earlier. Sorry, if I cut it down any more, it compiles! Slan, Alex. _ swift.ucc.ie:~/filt4: ghc M.lhs MachRegs.lhs:563: Non-exhaustive patterns in function baseRegOffset swift.ucc.ie:~/filt4: cat M.lhs module M

RE: 4.00, s-s-s, linker errors.

1998-11-17 Thread Alex Ferguson
Or you may have picked up a dodgy binary dist. That was the one... One last (?) problem... This program: module Main where import IOExts main = trace "Boogger" print 1 ain't playin', as follows (maxi-spam version). Slainte, Alex. _ oconnor.ucc.ie:~/filt4: ghc -v -syslib misc

ghc-4.00

1998-11-16 Thread Alex Ferguson
Still can't build 4.00 from source (see bug report, elselist), and it's also not yet on the ftp site in binary form. *whinge!* Slainte, Alex.

Re: ghc-4.00 build problems.

1998-11-11 Thread Alex Ferguson
I whinged about: [stuff] Other people seem to have got further than I did in sun-sparc builds -- is there a workaround that I could be using, pending an actual fix? [ Or enough ftp space for the binary version. ;-) ] Slan, Alex.

  1   2   3   >