I've put a compiled version of ghc6.2.2 for Linux machines still using glibc2.2
on
http://www.informatik.uni-bremen.de/~ger/ghc
In fact it should work on glibc2.3 as well, thanks to a minor hack from
Christian Maeder.
Documentation is not complete, but does at least include HTML.
"Sigbjorn Finne (Intl Vendor)" wrote:
Is it worth adding something like `yield' to the Concurrent
API? I'm unconvinced, but don't feel strongly about it. If
there are others that also think that it should be supported,
let me know, and I'll change my mind :-)
Here are two reasons:
(1)
Simon Marlow wrote:
[snip]
Hmm, you're probably doing a large chunk of renaming too. I just added an
error call right after the parser in Main.lhs.
The MLj parser/lexer doesn't actually rename, but it does tokenise all
identifiers in the lexer. Symbols already known aren't even copied out of
Sven Panne wrote:
[snip]
I guess that even the computer on *your* desktop would be fast
enough for the current parser by the time a completely tuned
rewrite of Happy would be finished. Moore's Law comes to the
rescue here... :-)
Well we're going in circles here. So far we've established
the
alternative?
Rewrite Happy.
Best wishes
George Russell
ust as bad if not worse than GHC.
Err apologies for the tone, I only criticise GHC so much because it's so useful . . .
George Russell
Michael Weber [EMAIL PROTECTED] wrote
[snip]
forkChild :: IO () - IO (MVar ())
forkChild p = do
mvar - newEmptyMVar
forkIO (p putMVar mvar ())
return mvar
This does not of course synthesise a non-daemonic forkIO from a daemonic one, because
it requires the parent thread to wait
The recent version, 3.77, of gmake seems to be a bit too clever
(or maybe too stupid) for GHC's device of not updating a .hi file
which is identical to the last one generated. It appears to me
as if gmake is saving on a call to fstat by assuming that .hi
has been updated even if it hasn't, and
Unhappily, having managed to build hsc from scratch with gcc2.95 on Sparc/Solaris,
I can confirm that I still get a segmentation fault when I run it. So it looks like
we are stuck with gcc2.7.2. Is there anything that can be done about this?
OK wise guys, now you've changed (incompatibly) the format of .hi files,
how can I rewrite these pre-404 hi-boot files so that they work for 404?
Can you summarise the changes?
Sven Panne wrote:
[ cut ]
Doing a similar thing for GHC would complicate things for implementors
and users. How e.g. would you write your Makefile rules with .hi files
in an archive?
Yes, it would complicate things for implementors, as they'd have to implement
it. However I don't think adding
Glasgow Haskell is very slow. I know it needs a lot of CPU time anyway,
but when I do ps it is only using 50% of the CPU available, and frequently
less. So I think what is happening is that it is spending half of its time
waiting for the Network Filing System to open and fstat interface files.
We have had confusion here because GHC uses the "prefix" Makefile variable (which
gives the final location of the compiled code) at two different times.
It uses it in "gmake" to construct the "ghc-4.05" driver script
(which hardwires in the location of the installed code), and it uses it in
George Russell wrote:
[snip]
It won't be so hard to
speed up GHC later if that becomes important.
Since this has been disputed, here are three ways I believe you could speed up
GHC without rewriting the whole of it. I would be surprised if you didn't get
at least twice the speed, and you could
Simon Marlow wrote:
Our nightly build did a two-stage bootstrap last night on a Sparc/Solaris
system successfully
~/builds uname -a
SunOS gigha 5.7 Generic_106541-04 sun4u sparc SUNW,Ultra-5_10
uname -a
SunOS titania 5.7 Generic_106541-08 sun4u sparc SUNW,Ultra-1
~/builds gcc -v
Michael Weber wrote:
On Tue, Jan 18, 2000 at 11:21:06 +0100, George Russell wrote:
[...]
OK, after hacking ghc-inplace to stop it deleting all its files (is there
a --keep-everything option?) and running hsc inside gdb I get:
[...]
EXTRAHCFLAGS="-keep-hc-files-too"
Why doesn't the configure script have a
--with-happy
option? There are --with-gcc and --with-hc to tell configure where to find
gcc and GHC.
Simon Marlow wrote:
Why doesn't the configure script have a
--with-happy
option? There are --with-gcc and --with-hc to tell configure
where to find
gcc and GHC.
It's kind of a policy decision: build.mk is the appropriate place for
setting such things at the moment. There are
Simon Marlow wrote:
The binary dists all have pre-formatted HTML and PS docs, so you could just
download one of those (except it seems the link to the Linux binary dist is
currently broken; I'll fix that shortly, in the meantime there's the solaris
binary dist).
I think perhaps you are
floor(Inf) and floor(NaN) do not appear to be defined in Standard Haskell.
(They both come down to "properFraction" which is only defined for Ratio.)
This differs from (for example) the Standard ML Basis Library, where it
is specified that floor(Int) should raise Overflow and floor(NaN) should
George Russell wrote:
This scheme is not the cleverest that could be devised. For example it is
still necessary to recompile whole chains of modules if you add an import
declaration. (Not to a system library, imports from those are counted as
"stable" in GHCs and my system
Malcolm Wallace wrote:
Wrong. If B imports C and has no export list, nothing from C is
re-exported, only definitions from B itself, with the single exception
of C's instance decls.
OK, but this has no influence at all on my suggestions except to make
them work slightly better.
Jon Fairbairn wrote:
I'm afraid I've not gone through your detailed suggestions, but in the
short term, would a crude hack that I used to use with Algol68C help?
No, fraid not. GHC already does this hack anyway. Algol68C didn't have
interface declarations. Still, nice to find someone else
Sigbjorn Finne wrote:
Seems like you're not using -recomp.
No I'm not. What about documenting it somewhere?
George Russell wrote:
Sigbjorn Finne wrote:
Seems like you're not using -recomp.
No I'm not. What about documenting it somewhere?
I take that back. I AM using it in the big program I mentioned, but I still
get huge swathes of unnecessary compilations. Maybe it needs to be still
Sorry if you don't want to be bothered with my problems, but I think this
problem which I've just encountered is rather amusing. Is there a neat solution?
I confess to finding concurrency problems difficult so there might be.
I want to implement a type Flag. Each flag is either Up or Down.
Marcin 'Qrczak' Kowalczyk wrote:
If the IO monad can maintain a random number generator, it can as
well mainain unique Integer supply. The interface is clean.
It can, but according to the current specification, it doesn't. Maybe
it should. I think Integer is a little too specific - how about
Tom Pledger wrote:
For two threads to have access to the same MVar, they must have a
common ancestor, right? Could a common ancestor spawn a transaction
broker thread? That would be similar to what database management
systems do. It'd still be centralised, but wouldn't need to do unsafe
Marcin 'Qrczak' Kowalczyk wrote:
...relative time of IO events that occured in a single thread.
(=) imposes the sequencing.
Yes OK. I see no problem with required elements of the Unique type to
increase in a single thread. But I suspect anything stronger than this
could slow things down
George Russell wrote:
George Russell wrote:
Exactly the same happens at the same time to Processor 2.
Now somehow you have to distinguish between Processor 1 and Processor 2,
because only one is going to get to lower the flags. But I don't think
with the existing Concurrency
Part of the problem right now seems to be that GHC is wrongly rewriting (or
perhaps touching) the .hi file even though nothing in it is altered.
(This is clear because -hi-diffs is also on and not reporting anything).
Thus even though I'm using -Onot -recomp it's still recompiling everything.
The latest binary distribution puts the GHC include files in
"lib/ghc-4.06/includes", not "lib/includes" as older versions used to.
This is a nuisance, because it means that there isn't any way a
Makefile can refer to the includes without coding in the GHC version.
Or is there? One needs access
I must admit I'm surprised by the reaction to my suggestion. Here /usr is shared
between lots of machines and there is no question of my installing GHC in /usr/bin
or anything like it. (The few system adminstrators here are all honest, overworked,
and sadly incorruptible.) My original problem
"Manuel M. T. Chakravarty" wrote:
Malcolm Wallace [EMAIL PROTECTED] wrote,
Can I propose a change to the -i / -I flags? Currently, the -idir (or
-Idir) options add a directory to the search path for imports. This
directory is either relative to the current dir, or absolute. My
Simon Marlow wrote:
Sparc users in particular: I've identified some recent breakage in the
Sparc port of GHC. If you've been experiencing crashes in binaries
generated by a compiler built from recent (at least February) sources, then
I've checked in a fix which might help.
George,
Simon Marlow wrote:
Sparc users in particular: I've identified some recent breakage in the
Sparc port of GHC. If you've been experiencing crashes in binaries
generated by a compiler built from recent (at least February) sources, then
I've checked in a fix which might help.
George,
"Manuel M. T. Chakravarty" wrote:
This is exactly what the `...-config' script that I was
talking about is supposed to do. Now we can argue whether
that should be part of `ghc' proper or an extra script. An
extra script at least has the advantage that it is easier to
maintain manual in
Marc van Dongen wrote:
Hello there,
When doing cvs updates I get a lot of errors of the form
patch: Invalid options.
patch: Usage: patch [-blNR] [-c|-e|-n] [-d dir] [-D define] [-i patchfile]\
[-o outfile] [-p num] [-r rejectfile] [file]
cvs update: could not
Two further comments on RegexString:
(1) I actually have to use Ian Jackson's excellent
matchRegexAll
function to do what I want. If this were documented and supported
I would appreciate it.
(2) While I can live without the facility (I think) it would nevertheless
be nice to
Simon Peyton-Jones wrote:
| At the time of writing, I am waiting for yet another long
| Haskell re-make of
| lots of modules to complete. The frustrating thing is, that
| at least 90% of these
| remakes are actually completely unnecessary.
OK, I have heard your cries, and have fixed
When I asked on the mailing list about this a year ago, I think I was told
that it wasn't exactly supported any longer. So rather than trying to get
GHC to compile ReadLine in, I used green-card instead. The attached file gives
you the very simplest readline function.
If you want to try to get
(Sent to glasgow-haskell-users rather than haskell, as it is GHC-specific.)
If we were writing a C library rather than a Haskell library, we could make
"head" a macro which included an appropriate message referring to __FILE__
and __LINE__. The equivalent in Glasgow Haskell would be to make
Simon Peyton-Jones wrote:
Try it now with -fddump-minimal-imports
I don't promise it'll work, but it does in simple cases.
It produces a file M.imports
Brilliant, thanks. I'll try it out (indeed probably use it) when I next manage
to compile GHC from CVS.
Would it be possible to implement an operation to lock an MVar without
any extra expense? So that the thread owning the MVar can do things to
it, but no other thread can. If it is possible, I suggest that it be
added and it would solve Marcin's problem (isEmptyMVar would then suffice).
Simon Marlow wrote:
The only way I can see to do this is to add a lock field to the MVar. And
since this lock would look very much like another MVar, you may as well just
use another MVar to lock it (after all, that adds exactly zero extra
complication to the system :-).
Absolutely.
There's
Claus Reinke wrote:
Right. I am relieved to read that your application source is not
full of calls to putMVar, but rather uses safe abstractions built
on top of MVars (it might be interesting to isolate them out of
your current application and migrate them to a CH library?).
Not a bad idea.
Simon Marlow wrote:
Let me see if I've got the semantics right: takeMVarMulti makes a
non-deterministic choice between the full MVars to return the value, and if
there are no full MVars it waits for the first one to become full?
Yes that's precisely right. putMVarMulti is the converse. (So
Simon Peyton-Jones wrote:
Fair enough. But would you like to suggest an algorithm GHC could use
to decide what to put in the .hi file?
Well that's a big question. As I understand it, the errant value,
lvl20, is a string representing an error message (which I suppose is to
be thrown in the
Socket.accept function returns a PortNumber as its third argument. (This
is not what the interface comment says, but the comment is wrong.) However
I can't find any way of extracting the contents of the PortNumber to an
integer.
Marcin 'Qrczak' Kowalczyk wrote:
As for the language standard: I hope that Char will be allowed or
required to have =30 bits instead of current 16; but never more than
Int, to be able to use ord and chr safely.
Er does it have to? The Java Virtual Machine implements Unicode with
16 bits.
It would probably speed up my code somewhat if the GHC libraries provided
more support for PackedStrings. For example, some code I have
reads in stuff from a Posix fd (using Posix.fdRead) and then feeds it
to the GHC regular expression interface (using RegexString.matchRegex).
It is frustrating
Lennart Augustsson wrote:
By definition, if you follow the standard you can't be wrong. :)
But the standard can be wrong. Perhaps this is a typo in the report?
I think I looked at this a while back. The standard is kaput. It gets even
worse if you try to make sense of the definitions of succ
"Manuel M. T. Chakravarty" wrote:
Is it possible that you are using a Linux box on which the
gmp devel libraries are not (properly) installed?
Very likely. Our local sysadmins do not appear to consider
integers a sufficiently common concept in computer science to
justify a MB or so
On this subject, where am I to get the libgmp2.a required by 4.08.1
(on Linux anyway). I tried compiling the very latest version of GMP
but it only produced a libgmp.a file. Is that the same?
NB that RPMs aren't a lot of good to me unless they come with a hefty
bribe for the hard-nosed system
Keith Wansbrough wrote:
On this subject, where am I to get the libgmp2.a required by 4.08.1
(on Linux anyway). I tried compiling the very latest version of GMP
but it only produced a libgmp.a file. Is that the same?
Same happened to me. ln -s libgmp.a libgmp2.a worked for me. I
I don't really understand getContents. (Does anyone?) I have some code here
(far too large to submit). If I do (on Linux, ghc4.08.1, both with and without
optimisation)
--
contents - hGetContents handle
seq (last contents) (hClose handle)
--
Simon Marlow wrote:
[snip]
"Once a semi-closed handle becomes closed, the contents of
the associated stream becomes fixed, and is the list of those
items which were succesfully read from that handle".
[snip]
Ah, now I see. I had assumed that hClose'ing a semi-closed
The
readFile :: FilePath - IO String
action returns the contents of the associated file. This is almost what
I want, but not quite, because readFile is lazy. Hence if the string is
only partly read, the file is still open. What I want instead is a function
which
(a) opens the file;
A minor quibble I know, but every time I use sets I want to add/subtract single
elements
to/from them. There is no function provided for doing this, so instead you have to do
union/delete with a singleton set constructed from the element. I appreciate the zeal
of the designer of this module to
Why not steal a good idea from Standard ML/New Jersey now and again? This has
"Or-patterns" which allow you to match against a disjunction of patterns,
EG
fun sleepIn (Date.Sat | Date.Sun) = true
| sleepIn _ = false
Where you have variables in the patterns, you bind only the variables which
"Steinitz, Dominic J" wrote:
I was experimenting with using FiniteMap. The program compiled ok but the linker
gave me the following error. What do I need to include on the command line or have I
not installed ghc correctly?
[dom@lhrtba8fd85 FiniteMap]$ /usr/bin/ghc -o main test.o
Why isn't Int an instance of Bits?
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Sven Panne wrote:
[snip]
The current branch-o-mania is a little confusing, but the CVS branch
called "ghc-4-07-branch" (yes, "7", not "8") should contain what you
are looking for. At least I think so... :-} Any bootstrapping problems?
Yes, I get a segmentation fault when the compilation
I apologise if this has been raised before, but the code I am
writing now would look rather nicer if "partially applied
type constructors" were permitted in instances. For example:
class Event e where
sync :: e a - IO a
data Event extraData a = blah blah . . .
instance (context on
If Posix.runProcess really is supposed "our candidate for the high-level OS-independent
primitive" (see documentation), it would help if there was a documented way of using it
with pipes. The problem is that runProcess takes handles as arguments, while the
obvious
function, createPipe, returns
Marcin 'Qrczak' Kowalczyk wrote:
[snip]
Since the very purpose of killThread is to kill the damn thread,
I find it inconvenient to have to wrap any thread which is supposed
to be killable with Exception.catch to avoid the message. Worse:
it should use block and unblock, otherwise there is a
GHC 5.00 looks wonderful. Would it be possible to make a binary
distribution available for Sparc? As you may remember, I've had
difficulty compiling it myself for Sparc, for some reason I don't know,
and even if I find a way of hacking things to compile it, I'd rather
users (= students) didn't
ghc --make would be wonderful for UniForM, which at the moment consists of
a large selection of libraries, were it not for the restriction that
ghc --make insists on only having one module as an argument. Er why?
At this rate I shall be driven to writing an otherwise useless module
which imports
GHCi allows us to mix fixed compiled and dynamic interpreted code to
be run from what I presume is dynamic interpreted code - the command
prompt. Would it be possible to run dynamic interpreted code from
a compiled program? I'm hoping the answer is Yes, because this is what
GHCi does, the only
If you have a type error message at the very start of a do statement, the result
can be rather confusing, because the typechecker doesn't know that do's are
almost always have type (IO (something)) and so tries to shoehorn the monad
to fit the type. This has actually happened to me several
Is there a way in Glasgow Haskell to get a thread to wait on a child process
in the same way as the Posix function wait(), and get the termination status
of the child? If so, how?
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
Seems to me it would make more sense for the message
.hs:214: unterminated `{-'
message to tell me where the {- is, rather than where the EOF is.
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
Recently I've been experimenting with a sort of OOP with GHC, using existential types
and
(overlapping, undecidable) multi-parameter type classes, but it doesn't seem to work
as you
might expect because of the way GHC resolves overloaded functions at compile-time.
For example,
given class A
Leon Smith wrote:
[snip]
If GHC had true existential typing, as opposed to just existential datatypes,
you could reasonably code what I think you want like this:
class A a where
basicA :: Bool
nextA :: a - (EX a'. A a' = a')
basicA = True
nextA = id
data WrappedA =
Once again I find myself wanting something like the following function with
finite maps:
fmToListByRange :: Ord key = FiniteMap key elt - (key,key) - [(key,elt)]
fmToListByRange map (k1,k2)
is supposed to return all elements in the map with keys from k1 to k2 (inclusive).
Although this
Simon Marlow wrote:
What's wrong with just saying -Idir whenever you say -idir?
This seems to work but for more complicated combinations the two options have slightly
different formats. For example, if I have several directories separated by colons, and
end the list with a superfluous colon
This looks like a bug, but please don't change it!
If you have a file A.blah.hs containing a module A, ghc5.02 compiles it, producing
A.hi and A.blah.o.
I have an application for this, since I have just, for the first time, been
reluctantly
compelled to introduce recursive modules. Rather
There are various reasons why one might have a Haskell file which doesn't have the
expected Module.hs filename, in particular when putting ghc into some larger
system which does its own thing with files. I may well want this as part of UniForM
in the next few months. However ghc doesn't provide
It would occasionally be nice to have a function
cast :: (Typeable a,Typeable b) = a - Maybe b
which returns Just a if a and b have the same type, and Nothing otherwise.
This may seem rather a curious need, but it arises with existential
types; if you have
data A = forall a . (context) = A
Writing .hi-boot files is a pain, and the works (allegedly) containing a compiler
which
does mutually recursive modules properly seem permanently gummed up. Therefore may I
suggest
a new .hs-boot suffix which compiles Haskell to produce just a .hi-boot file? I
already have
two .hs-boot
Simon Peyton Jones wrote:
I am therefore deeply reluctant to provide both GHC-for-mingw32
and GHC-for-cygwin. One build on Win32 is enough! We ended
up with a mingw32 basis because it meant we could make GHC=20
completely self-contained -- no dependence on cygwin1.dll etc.
This was
Can you stop ghc-pkg complaining when it can't find the library for a package,
and insert the package into its configuration file? Some of my scripts rely
on being able to build the package.conf file ahead of time.
What with this, and because ghc-pkg doesn't seem able to cope with private
Formerly .hi and .hi-boot files had the same format; however ghc5.03 has a binary
format for
.hi files and a textual one for .hi-boot files. This is a nuisance for me, because I
have an
ingenious scheme by which .hi-boot files are themselves from Haskell files by ghc,
which thinks
it is
Ah, I've figured it out. The new .hi-boot file format is actually Haskell!! Well
almost.
You have to fully qualify type names (you can't use Int, you must use GHC.Base.Int)
and the input isn't run through -cpp.
___
Glasgow-haskell-users mailing list
Simon Marlow quoted Max Kirillov
[snip]
Building htk, I've got an error:
=20
TestGetPut.hs:6:
Module `GetPut' is located in package `Main'
but its interface file claims it is part of package
`uni-events-test'
=20
It happened (as far as I got) when ghc saw in current path
Simon Marlow wrote:
[snip]
Can't you just fix your build so that the situation doesn't occur?
[snip]
Grumble. Yes, I suppose so.
I hate being an implementor instead of a bug-reporter.
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
Would it be possible to bring the DeepSeq library into the libraries
distributed with GHC? (I think Dean Herington is responsible for it.)
Of course it's easy enough to drop it into one's own program (I am just
about to do this) but
(1) It is fairly common to want to force deeper evaluation.
of MVars as
required.
Good luck,
George Russell
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
I am using .hi-boot files quite a lot at the moment. I'm very grateful for the recent
change to a more Haskelly syntax, but I have a couple of suggestions for the GHC team
to implement in their no doubt ample free time. 8-)
(1) Importing a module {-# SOURCE #-} into itself currently produces a
This isn't a bug, just a suggestion. It's not even a very important
suggestion, but one that might be worth implementing if it's easy and you can
find the the time. Or perhaps I am just doing things the wrong way?
The point is that I sometimes have something like the following situation
class
Simon Peyton-Jones wrote:
[snip]
One other idea though. Suppose you say
class ComplicatedClass x where
_simpleTitleFn :: x - String
muchMoreComplicatedTitleFn :: extra arguments - x - IO ...
In general GHC doesn't report warning unused for variables whose name
begin
I've compiled HTk for ghc-5.04.2 on Solaris, Linux and Windows, and put binary bundles
at
http://www.informatik.uni-bremen.de/htk/
So you can write portable graphical user interfaces using the latest release of your
favorite Haskell compiler.
Sorry it's a bit late; it's not that it's
Alex wrote
[snip]
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
character down each pipe; unfortunately this doesn't seem
to help.
Any other suggestions?
By the way this is all GHC5.04.1, which seems to be the last FreeBSD version available,
at least with pkg_add.
Thanks.
George Russell
___
Glasgow-haskell-users mailing
Volker Stolz wrote: In local.glasgow-haskell-users, you wrote:
I'm trying to get HTk to work on FreeBSD (actually FreeBSD running inside a VMware
virtual machine, but I don't think that should make any difference). How HTk works
is it creates a couple of pipes
(readIn,writeIn) -
I have created binary bundles for HTk, our Haskell interface to Tcl/Tk,
for ghc5.04.3 on Linux/x86 and Windows, and put them on the download page:
http://www.informatik.uni-bremen.de/htk/download/INSTALL.BINARY.html
I will add FreeBSD and Solaris bundles when I can get hold of ghc5.04.3
on
Many thanks for Data.HashTable, which I am about to use. Unfortunately
I seem to need an unseemly hack because the key I want, namely ThreadId's,
don't have a hash function defined, and defining one requires me to muck
around with GHC internal functions. Could some more hash functions be
Binaries for HTk (a Haskell graphics package that uses HTk) for ghc6.01
on Linux, Solaris, Windows and FreeBSD are now available from the HTk page:
http://www.informatik.uni-bremen.de/htk/
Many thanks to Guy Coleman for the FreeBSD package.
___
Yes I know this is really Apple's fault, but according to
http://developer.apple.com/documentation/ReleaseNotes/DeveloperTools/GCC3.html
The GCC 3.3 preprocessor inserts a new pragma, #pragma GCC set_debug_pwd, as part
of the new Distributed Builds feature. (See below.) This may surprise
Template Haskell is frightfully good and we want to get rid of cpp and
use it instead, but there's one tiny problem, namely that for cpp it
is possible to define variables on the command line (-DSIMON=MARLOW and so
on) while with Template Haskell it doesn't seem to be. Could there be
some kind of
1 - 100 of 116 matches
Mail list logo