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

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? ;-)

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 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.

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

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

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

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: 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.

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

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: 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
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

hslibs

1998-02-23 Thread Alex Ferguson
Well, so far I've gathered that syslibs ghc and posix have moved and been renamed, and that the "full story" is hidden someplace within the docs -- someplace I haven't yet been able to find. Any further clues as to where I might find the dire fate that's befallen hbc and contrib? Are these

ghc/NT

1998-02-22 Thread Alex Ferguson
Hi all. What's the current state of play with ghc (any version), on NT machines? Slainte, Alex.

overlapping instances.

1998-02-06 Thread Alex Ferguson
SPJ: Same issue. Show [a] exists already and overlaps with Show [Blah]. 3.0 is a bit more restrictive than 2.xx, but it is Righter I think. Dissenting opinions welcome. I think I semi-agree, though I think the change in ghc-3.00 ought to have been more loudly flagged. (And not denied, as

MPC dunce question.

1998-02-03 Thread Alex Ferguson
While hacking around with MPCs, trying to define a variant of the Collection class, mutated to suit my own fiendish ends, I ran into this: Intervals.hs:345: Class type variable `e' does not appear in method signature union2 :: s - s - s What's the significance of this restriction?

2.04 memory/code-bloat.

1997-07-15 Thread Alex Ferguson
Hi all. To my horror, I've just discovered that ghc-2.04 appears to reverse the recent trend of ghc releases by being significantly less efficient on one of our Problem Child programs. In particular, it both takes (even) more memory to compile; and the object code size is (even!) bigger. The