changing configure --prefix later?

2003-03-26 Thread Malcolm Wallace
OK, I'm building ghc-5.04.3 freshly from source, but when running ./configure initially, I forgot to use the --prefix= option to set the final installation location. Now, after fourteen hours of building, I use `make install' and discover the mistake. :-( How can I recover the situation? I

ANNOUNCE: hat-2.02

2003-03-26 Thread Malcolm Wallace
discussion of Hat: http://www.haskell.org/mailman/listinfo/hat Regards, The Hat team at York [ The Hat team consists of Malcolm Wallace, Olaf Chitil, and Colin Runciman, with thanks to many other students, visitors, collaborators and reviewers. The development of Hat was funded

Re: building 5.04.3 on sparc-solaris-2.6

2003-03-19 Thread Malcolm Wallace
I'm trying to build ghc-5.04.3 from source on a sparc-solaris-2.6 machine, using 5.02.3. It throws up the following build error. Any ideas what might be going wrong? /tmp/ghc11170.hc: In function `SystemziTime_zdLrpHVeta_entry': /tmp/ghc11170.hc:10508: called object is not a function If it

Re: building 5.04.3 on sparc-solaris-2.6

2003-03-19 Thread Malcolm Wallace
_ccall_result = (timezone()); /* line 10508 */ What does mk/config.h say about HAVE_ALTZONE? On a Solaris 8 box I'm looking at it says HAVE_ALTZONE is defined. $ grep ZONE mk/config.h /* #undef HAVE_ALTZONE */ /* #undef HAVE_TIMEZONE */ #define TYPE_TIMEZONE

Re: building 5.04.3 on sparc-solaris-2.6

2003-03-18 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: I'm trying to build ghc-5.04.3 from source on a sparc-solaris-2.6 machine, using 5.02.3. It throws up the following build error. Any ideas what might be going wrong? I'm not sure, and I'm afraid our one and only Sparc box has just died, probably

building 5.04.3 on sparc-solaris-2.6

2003-03-13 Thread Malcolm Wallace
Hi GHC folks, I'm trying to build ghc-5.04.3 from source on a sparc-solaris-2.6 machine, using 5.02.3. It throws up the following build error. Any ideas what might be going wrong? Regards, Malcolm rm -f System/Time.o; if [ ! -d System/Time_split ]; then mkdir System/Time_split; else

Re: ANNOUNCE: GHC vesrion 5.04.3 released

2003-03-12 Thread Malcolm Wallace
[EMAIL PROTECTED] (Ketil Z. Malde) writes: I notice the release notes say a few architectures should be possible to port to, in particular AIX/POWER. How possible is that, exactly? Has anybody done it with any success? Alternatively, is there any alternative Haskell compiler (I guess that

ANNOUNCE: nhc98-1.16

2003-03-09 Thread Malcolm Wallace
nhc98-1.16 -- http://www.haskell.org/nhc98 We announce a new release, 1.16, of the Haskell compiler nhc98, with the following new features and bugfixes of note. * nhc98 once again builds on Windows

ANNOUNCE: hmake-3.07

2003-03-06 Thread Malcolm Wallace
hmake-3.07 -- http://www.haskell.org/hmake We announce a new release, 3.07, of hmake, the automatic compilation manager for Haskell programs. This fresh version has the following improved configuration features over previous

Re: Q. about XML support

2003-02-20 Thread Malcolm Wallace
Graham Klyne had some questions about XML parsing in Haskell. Here is the current state of play with HaXml. 1. Works with HUGS and GHC (I'm currently developing with HUGS, but anticipate using GHC for production code). HaXml certainly works with ghc (and ghci). It probably still works with

Re: effect of order of function arguments

2003-02-19 Thread Malcolm Wallace
Aaron Denney [EMAIL PROTECTED] writes: With a recursive function of more than one argument, does it make sense to keep the arguments that tend to remain constant closer to the front? i.e. Will any implementations notice interp y x:xs calls interp y, and keep some sort of interp y partial

Re: Yet another weakly defined bug report

2003-02-17 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: To fix these problems you have to think carefully about strictness and demand in your program. For memory we have heap profilers to help out, but we don't have I/O descriptor profilers for lazy I/O!

Re: Error in Haskell 98 Report 'lex' function

2003-02-10 Thread Malcolm Wallace
Simon Peyton-Jones [EMAIL PROTECTED] writes: Ah yes, this is a genuine bug. Haskell 98 changed at some point to allow identifiers and field labels with a leading '_', but the library didn't keep pace. I believe the fix for 'lex' is something like the following. Regards, Malcolm diff -u

Re: buffering woes

2003-02-05 Thread Malcolm Wallace
Hal Daume III [EMAIL PROTECTED] writes: Not for me, GHC 5.04.2 (Solaris). here it goes right the first time, but then i have to type two more letters (in this case 'b\n') to get it to respond to hello. Solaris has a slightly bizarre buffering scheme in raw terminal mode, whereby it buffers

Re: Looking for large Haskell programs

2003-02-05 Thread Malcolm Wallace
Tobias Gedell [EMAIL PROTECTED] writes: GHC is such a program, as are the other Haskell compilers. Perhaps too complicated for your purposes, though. GHC has too many mutually recursive modules to be useful, otherwise it would be great! But I will look more into the other compilers,

Re: ghc/cygwin filename resolution issue.

2003-02-03 Thread Malcolm Wallace
Alex Ferguson [EMAIL PROTECTED] writes: (This was all motivated, btw, by trying to build HaXml under ghc/cygwin, which fell for me at the first hurdle of first catch your hmake in the recipe. I've now gotten as far as a _build_ of hmake, but it then runs into similar issues with its own use

Re: funny bold ouput in GHCI

2003-01-23 Thread Malcolm Wallace
Dean Herington writes: | Using GHCI 5.04.2, ... the '' character of a '-' lexeme | appears in bold on my terminal. Is it possible that your terminal is set up for syntax-highlighting, or that you are using GHCi from within something like emacs where such a facility might be available? For

evaluation fault in ghci.

2003-01-23 Thread Malcolm Wallace
The interactive loop of ghci displays an interesting evaluation fault to do with derived equality. In the attached source file, there is a simple guard which tests some equalities, and basically the same value is given on the left and right of the (==). Yet, it evaluates to False in interactive

Re: Using --make with -odir and hierarchical modules

2003-01-20 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: It may be of interest to note that hmake currently uses solution 2 below. And this is also what the current CVS version of GHC does. Note that you need to create the directories if they don't exist (GHC won't do it for you). Whereas hmake does

Re: Using --make with -odir and hierarchical modules

2003-01-15 Thread Malcolm Wallace
Martin Norbäck [EMAIL PROTECTED] writes: The GHC manual needs to specify what happens when you use -odir and hierarchical modules with --make. It may be of interest to note that hmake currently uses solution 2 below. Solution 2: files put in -odir are put in directories (files will end up

Re: Profiling question

2003-01-06 Thread Malcolm Wallace
Kirsten Chevalier [EMAIL PROTECTED] writes: I'd like to be able to determine the percentage of allocated objects of a particular type at specific points in a program's execution. I know that I can use heap profiling to create a graph of memory usage broken down by type, but is there any way

Re: ffi

2002-12-11 Thread Malcolm Wallace
Martin Huschenbett [EMAIL PROTECTED] writes: main :: IO () main = do -- do something cfun -- I wan't to call the function written in C here -- do again something And now my question is: How do i realize this? Can you please tell me how write a binding and how tu run

Re: Completeness of pattern matching

2002-12-06 Thread Malcolm Wallace
Ingo Wechsung [EMAIL PROTECTED] writes: I wonder if the compiler could check, if all possible combinations have been checked in a pattern match. In ghc, use the compile-time option -fwarn-incomplete-patterns Regards, Malcolm ___ Haskell-Cafe

Oops, another H'98 report error.

2002-12-04 Thread Malcolm Wallace
I know it is no far too late to do anything about it, but I just discovered another error in the Haskell'98 Libraries Report. The Time module exports all but one of the fieldnames of the CalendarTime datatype, bizarrely omitting ctSec. Regards, Malcolm

ANNOUNCE: HaXml-1.08

2002-11-29 Thread Malcolm Wallace
HaXml-1.08 -- http://www.haskell.org/HaXml/ We announce a fresh release of HaXml, a collection of libraries and tools for using XML from Haskell. This is mainly a bug-fix release. What is new in

functional dependency syntax?

2002-11-11 Thread Malcolm Wallace
I'm trying out MPTC with functional dependencies for the first time in GHC. However, I'm not sure of the syntax. MPJ's ESOP 2000 paper gives the following example: class FiniteMap i e fm | fm - (i,e) where emptyFM:: fm lookupFM :: i - fm - Maybe e extendFM :: i - e - fm -

Re: interrupted system calls

2002-10-28 Thread Malcolm Wallace
Alastair Reid [EMAIL PROTECTED] writes: It sounds a little like a problem I had where trap 26 (I think this is a timer signal) was interrupting the subprocess. Nowadays I use this function: my_system :: String - IO ExitCode my_system xs = do -- putStrLn xs -- for debugging

interrupted system calls

2002-10-24 Thread Malcolm Wallace
Does anyone know what might be causing the following error from a program that uses System.system? Fail: interrupted Action: system Reason: Interrupted system call The shell command given to System.system runs and terminates with a non-zero exit code (actually 8). I expected to bind

Re: ghc --make -odir x -hidir x chooses strange location for x

2002-10-23 Thread Malcolm Wallace
Claus Reinke [EMAIL PROTECTED] writes: 3) shouldn't there be a way of telling ghc --make about ways to generate the .hs/.lhs files it is looking for (aka suffix rules)? The standard examples are happy, cpp, drift, .. If you are willing to switch from ghc --make to hmake, you get various

Re: Using functions from package haskell98 - GHC 5.04

2002-10-22 Thread Malcolm Wallace
Marco van Roshum [EMAIL PROTECTED] writes: In my program, I use the function isDigit, which is part of haskell98.Data.Char When compiling my program, I get the error: Variable not in scope: isDigit. The same error occurs when I explicitly use the package haskell98 as in the following

Re: Hierarchical modules and compilation output redirection

2002-10-15 Thread Malcolm Wallace
Martin Norbäck [EMAIL PROTECTED] writes: So I want to redirect the output with -odir OUTPUT_DIR However it won't work since ghc wll put the compilation output of both modules in OUTPUT_DIR/Module.o and subsequently fail to link. You could use a recent version of hmake, with the -d

Re: layout problem

2002-09-19 Thread Malcolm Wallace
ERROR c:\1.hs:69 - Syntax error in expression (unexpected `-') Line 69: sortName (wn:ws)=sortName [(w,wc) (w,wc) - ws,not (isGreater (w,wc) wc)] ++[wn]++sortName[(w,wc)|(w,wc)-ws, isGreater (w,wc) wn] The first list comprehension expression [ (w,wc) (w,wc) - ... ] is missing a

Re: Haskell 98: Behaviour of hClose

2002-09-18 Thread Malcolm Wallace
Simon Peyton-Jones [EMAIL PROTECTED] writes: (You can change echoing settings via the IO.hSetEcho etc.) Ahem, one of the deficiencies of Haskell'98 is that there is no function IO.hSetEcho. There used to be one in Haskell 1.3 I think, so I guess there was a good reason for removing it?

Re: Haskell 98: Behaviour of hClose

2002-09-18 Thread Malcolm Wallace
Simon Peyton-Jones [EMAIL PROTECTED] writes: What I intended was a simple interactive Haskell program should behave the same on any OS/environment What you and Ross seem to be saying is no, the behaviour of the program can, and should, depend on the

Re: Evaluation order, ghc versus hugs, lazy vs. strict

2002-08-21 Thread Malcolm Wallace
Alastair Reid [EMAIL PROTECTED] writes: http://www.cs.york.ac.uk/fp/profile.html [York don't seem to put links to their pages on the web. Citeseer may have some of them.] Thanks for pointing this out. I've now added lots of links for papers on that webpage. Regards,

Re: Newbie question, installing hugs on redhat 7.2

2002-08-19 Thread Malcolm Wallace
S H [EMAIL PROTECTED] writes: I downloaded the file hugs98-Dec2001-1.i386.rpm onto the freshly-installed red hat 7.1 (no other software has been installed). It complains that libreadline.so.4 is needed. The system has the package readline-4.1-9 installed which provides

ANNOUNCE: HaXml-1.07

2002-08-14 Thread Malcolm Wallace
HaXml-1.07 -- http://www.haskell.org/HaXml/ Yes, hot on the heels of HaXml-1.06, another new release, 1.07. Only two days between releases. Why? * We got the location in the hierarchical

Re: ANNOUNCE: hmake-3.06

2002-08-12 Thread Malcolm Wallace
hmake-3.06 -- We are pleased to announce a fresh, bugfix, release of hmake, the Haskell compilation manager. www.cs.york.ac.uk seems to be down. Does anyone know of a mirror that might have the new release, or when the

ANNOUNCE: HaXml-1.06

2002-08-12 Thread Malcolm Wallace
HaXml-1.06 -- http://www.haskell.org/HaXml/ We are pleased to announce a fresh release of HaXml, the collection of libraries and tools for using XML from Haskell. HaXml includes * a parser for

ANNOUNCE: hmake-3.06

2002-08-09 Thread Malcolm Wallace
isn't confused by the escaped character \\ in a literal string. More info, and downloads http://www.cs.york.ac.uk/fp/hmake/ Regards, Malcolm Wallace ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org

Re: AlphaBeta (chess) in Haskell

2002-08-09 Thread Malcolm Wallace
Mario Lang [EMAIL PROTECTED] writes: Also, I've found a reference to a working mate-problem solver which was used for HAT testing, but also, no code. The chess end-game solver we used with Hat is one written by Colin Runciman. The code is attached (the main program is in Mate.hs), in a tar

Re: [nhc-bugs] Problems building nhc98 with ghc-5.04

2002-07-23 Thread Malcolm Wallace
when building nhc98 with ghc-5.04 I got the following error: Fail: Can't find module PrelBase in . Or in standard libraries at /usr/local/lib/ghc-5.04/imports/base ... Asked for by: Decl.lhs [Check settings of -I or -P flags?] Anyway, this seems to be a ghc

Re: Bug in library report

2002-07-23 Thread Malcolm Wallace
Alastair Reid [EMAIL PROTECTED] writes: [...] (How do these bugs last so long?) None of the compilers actually use the report Prelude/libraries. Not entirely true. A large chunk of the nhc98 (and hat) libraries is copied directly from the Report. The real problem (maybe this is what you

Re: large binaries

2002-07-19 Thread Malcolm Wallace
Is there some reason haskell binaries have to be statically linked? It would not be entirely fair to lay all the blame for large Haskell binaries entirely at the door of static vs. dynamic linking. After all, the Haskell version is dynamically linked against exactly the same shared libraries

another minor fault in the Haskell Report

2002-07-17 Thread Malcolm Wallace
I have just discovered another minor fault in the revised Haskell'98 Report. In the definition of the Standard Prelude, (page 115) instance Read Float where readsPrec p = readFloat instance Read Double where readsPrec p = readFloat are incorrect because they do not deal

Re: replacing the Prelude (again)

2002-07-15 Thread Malcolm Wallace
| anymore. What I would like is that the defualting rules refer | to the classes in my version of the Prelude, | not the Standard Prelude. You can always get that (with the -fno-implicit-prelude thing) by adding default [Int, Double] or whatever to your source module, just after

Re: replacing the Prelude (again)

2002-07-15 Thread Malcolm Wallace
The defaulting mechanism *only* applies to types constrained by the original builtin Prelude.Num, not to the transformed class HatPrelude.Num. I did wonder how Hat tackled this. Out of curiosity what is the solution that Hat uses? Hat doesn't have a solution. When the lack of correct

Re: -1796254192 `div` 357566600 == 5 ??

2002-06-28 Thread Malcolm Wallace
Dylan Thurston [EMAIL PROTECTED] writes: Thanks for pointing this out; this seems to be another bug in ghc 5.02.2. According to the report, it seems unambiguous that, e.g., -5`div`2 should be -2, not -3. Yes,-5`div`2 == -(5`div`2) == -2 but (-5)`div`2 == -3 Ghc 5.02.2 has the

Re: GHCI Can't Find Module But GHC Can

2002-06-27 Thread Malcolm Wallace
Aha! GHCi (and ghc --make) has a pre-pass that looks through the file for import declarations so it can build the dependency tree, and it does this without using a proper Haskell parser. I'll bet it's ignoring the CPP directives. Probably it should flag an error, I'll look into it.

Re: ghc on debian/powermac

2002-06-27 Thread Malcolm Wallace
I am trying to compile ghc on my powermac (debian 3.0) I'm afraid we don't have a port for your system at the moment. Furthermore the road to porting GHC is long and tortuous :-( On the other hand, if you just want any Haskell compiler, nhc98 builds and installs very easily on ppc-linux.

Re: [Hat] using hmake with hat

2002-06-27 Thread Malcolm Wallace
Hal Daume III [EMAIL PROTECTED] writes: when I use hat, hmake seems to look in the wrong place for the generated files: hat-trans ../Util/STM.hs Wrote ../Util/TSTM.hs ghc [...] ../TUtil/STM.hs ghc-5.02.3: file `../TUtil/STM.hs' does not exist so it seems hat is creating

Re: GHCI Can't Find Module But GHC Can

2002-06-26 Thread Malcolm Wallace
I think the problem is that GHCi doesn't respect #ifdef conditional compilation. I wasn't aware of any bugs in that area, can anyone provide some sample code? (and I'm surprised, because GHCi just runs cpp in the same way as GHC). Ah, I think it is probably just a failure to use the

ANNOUNCE: nhc98-1.14, hmake-3.05

2002-06-14 Thread Malcolm Wallace
to Thomas Nordin). * Numerous other small tweaks and bugfixes. for information on nhc98: http://www.cs.york.ac.uk/fp/nhc98/ for information on hmake: http://www.cs.york.ac.uk/fp/hmake/ Regards, Malcolm Wallace ___ Haskell mailing list

ANNOUNCE: hat-2.00

2002-06-14 Thread Malcolm Wallace
hat-2.00 We are pleased to announce a new release of Hat, the Haskell tracing (an debugging) system for Haskell'98. This release of Hat is a major release. It

Re: Haskell 98 Report: May release

2002-06-07 Thread Malcolm Wallace
Simon Peyton-Jones [EMAIL PROTECTED] writes: http://research.microsoft.com/~simonpj/h98-revised 404 Not Found. Make that http://research.microsoft.com/~simonpj/haskell98-revised ___ Haskell mailing list [EMAIL PROTECTED]

Re: Beginner's question: Memo functions in Haskell

2002-06-05 Thread Malcolm Wallace
Arjan van IJzendoorn [EMAIL PROTECTED] writes: There is a Memo module in Hugs, which I just used for fib. It doesn't seem to speed it up, though: You need to call the memoised version in the recursive case. module Fib where import Memo slow 0 = 0 slow 1 = 1 slow n = slow (n-1) +

Re: GMP from haskell

2002-05-29 Thread Malcolm Wallace
Hal Daume III [EMAIL PROTECTED] writes: The gnu web page (www.gnu.org/manual/gmp-4.0.1/html_node/gmp_70.html) claims that Haskell (GHC) has bindings to GMP. Is this true? How can I access these routines? The type Integer? Regards, Malcolm

Re: Negative literals and the meaning of case -2 of -2 - True

2002-05-20 Thread Malcolm Wallace
Thomas Hallgren [EMAIL PROTECTED] writes: * hugs Dec 2001: main outputs: (FromInteger (-2),True) * ghc 5.02.2: main outputs: (FromInteger (-2),True) * hbc 0..5b: main outputs: (Negate (FromInteger 2),False) * nhc98 1.12: compiler outputs: Fail: What? matchAltIf at 7:13

Re: Giving profiled object files a different extension (was: RE: Profiling suggestion)

2002-05-16 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: Re the current and recurring conflicts between profiling and non-profiling code; how hard would it be to name GHC's output files differently when compiling with -prof? The proposal, therefore, is to extend the meaning of '-prof' to mean '-prof

Re: powerpc-linux port

2002-04-29 Thread Malcolm Wallace
Sven Moritz Hallberg [EMAIL PROTECTED] writes: if there has ever been a working LinuxPPC port (I don't know about any) No, there has not been a working port to LinuxPPC, as far as I can see. But the mailing list archives showed some mails from 2000 or 2001 from someone who was thinking of

Re: Announce+Question: jDrIFT

2002-04-29 Thread Malcolm Wallace
John Meacham [EMAIL PROTECTED] writes: In Any case i made a prerelease of my modified version available at: http://homer.netmar.com/~john/computer/haskell/jDrIFT/ but would like to somehow merge with the main development tree of this tool, if one exists, if it doesnt look like that will

Re: Questions concerning hierarchical module system

2002-04-18 Thread Malcolm Wallace
Wolfgang Jeltsch [EMAIL PROTECTED] writes: I have some questions regarding the hierarchical module system now implemented in Hugs as well as in GHC. ... and nhc98... Currently it is possible to have a module A1.A2. ... .Am and a module A1.A2. ... .Am. ... .An (n m) at the same time. The

Re: FFI problem in 5.02.2 on solaris 2.6?

2002-03-28 Thread Malcolm Wallace
$ ghc -fglasgow-exts -package lang -c -o Floats.o Floats.hs In file included from /export/home/malcolm/lib/ghc-5.02.2/include/Stg.h:206, from /tmp/ghc21103.hc:1: /export/home/malcolm/lib/ghc-5.02.2/include/PrimOps.h:976: parse error before

FFI problem in 5.02.2 on solaris 2.6?

2002-03-27 Thread Malcolm Wallace
The binary package of ghc-5.02.2 for sparc-sun-solaris2.7 seems to have a small problem on my Solaris 2.6 machine. The compiler works fine on most source modules, but it has trouble with one using the FFI. A previous version of the compiler (4.08.2) worked fine on the same module, and 5.02.2 on

Re: Mutable arrays in Haskell 98

2002-03-27 Thread Malcolm Wallace
José Romildo Malaquias [EMAIL PROTECTED] writes: I would like to use muttable arrays in Haskell 98, with the GHC _and_ NHC98 compilers. By muttable arrays I mean arrays with in-place updates, as with the MArray arrays (which are not Haskell 98 conformant) found in GHC. Is such array

ANNOUNCE: Hat 1.12

2002-03-15 Thread Malcolm Wallace
hat-1.12, nhc98-1.12, and hmake-3.02 We are pleased to announce a new release of Hat, the Haskell tracing (an debugging) system, together with supporting releases of the

Re: A Cygwin port of hmake?

2002-03-12 Thread Malcolm Wallace
Antony, But unfortunately the Makefile.inc used to build hmake does some tricky $(PWD) shenanigans that have nothing to do with configure, and then passes the resulting path to ghc. Unfortunately, $(PWD) returns Cygwin-style paths, and I failed to find a good workaround for this in the

Re: preprocessors

2002-02-15 Thread Malcolm Wallace
But what's the best way to manage this? Suppose you have several modules, some of which need no preprocessor, while others need to be preprocessed in different ways (ignoring multiple extensions -- too hard). I've been doing this by using different filename extensions to distinguish them,

Re: preprocessors

2002-02-15 Thread Malcolm Wallace
The latest version of hmake (3.01) has support for calling a preprocessor based on the filename extension, That's nice. Is it user-configurable? (i.e. without changing the compiler) At the moment, the list of preprocessors is coded into hmake (not the compiler). The main reason for not

Re: syntax across languages

2002-02-12 Thread Malcolm Wallace
Being able to specify the extensions required in a source file would be very useful in a range of cases. Very often helping other people with Haskell (in the case where they are trying to use someone else's module) is just a question of saying try '-98' or try '-fglasgow-exts' or whatever.

Re: layout rules for where

2002-02-07 Thread Malcolm Wallace
Can't we require that a local definition be more indented than the enclosing definition? It is required in Haskell'98. You have stumbled on a bug in Hugs, which you should report to the maintainers. Regards, Malcolm ___ Haskell mailing list

Re: Unsure about 'IO'

2002-02-06 Thread Malcolm Wallace
The problem here is that, within the `while' you are calling `isEOF' before printing the prompt. IsEOF cannot report False until you actually type the first character! If you type nothing, then it the EOF condition could indeed be true, so no more actions can happen until the condition is

Re: Passing values taking implicit parameters / smart constructors

2002-01-31 Thread Malcolm Wallace
I think that what you want here are 'smart constructors', i.e. functions that create a new value but also perform other initializations. .. If you define Tree and the smart constructors in a separate module and then only export the type Tree (*not* the real constructors!), But then I

Re: Another H'98 Report query

2002-01-31 Thread Malcolm Wallace
I see no reason to disallow duplicates at the subordinate level if they are permitted otherwise. Well, disallowing duplicates here may improve error detection, catching some unintentional typos and cut-and-paste errors. By the same argument, we should disallow *all* duplicates, for

Re: Another H'98 Report query

2002-01-31 Thread Malcolm Wallace
disallowing all duplicates seems tricky. is there a duplicate here: module A (f, module M) where import M(f) Yes, there is a duplicate here. Strangely enough, hbc does not report this as an error, even though it refuses to compile the following very similar case: module A (f, module A)

RE: n+k patterns

2002-01-30 Thread Malcolm Wallace
I argued that (Num a, Ord a) makes most sense to me. You argued that (Integral a) was a conscious choice (something I don't remember but I'm sure you're right), and is the right one anyway. I'd be interested to know what others think. If there's any doubt, we'll stay with Integral. My

Re: XML to haskell data

2002-01-30 Thread Malcolm Wallace
Has anyone done any XML parsing into haskell data structures? I'd like to do some of this and don't like reduplicating effort. The HaXml package has a tool `DtdToHaskell' that automatically converts an XML DTD into a set of Haskell datatypes, together with the necessary instances of an

Re: ANNOUNCE: hmake-3.00 RPM packages

2002-01-22 Thread Malcolm Wallace
I have built RPM packages for hmake-3.00, which are available at http://uber.com.br/romildo/ The packages were built in a RedHat Linux 7.2 system. Romildo's RPMs are now also available from hmake-HQ at http://www.cs.york.ac.uk/fp/hmake/ ftp://ftp.cs.york.ac.uk/haskell/hmake/

ANNOUNCE: hmake-3.00

2002-01-21 Thread Malcolm Wallace
hmake-3.00 -- We are pleased to announce the release of version 3.00 of 'hmake', the Haskell program compilation manager. http://www.cs.york.ac.uk/fp/hmake/ Features of hmake: * compiler independent * aware of .hi files in

incorrect parsing

2002-01-03 Thread Malcolm Wallace
This program: module Main where f = map (++a++b) g = map (a++b++) main = do print (f [x,y,z]) print (g [x,y,z]) gives the following error messages with ghc (versions 4.08.2 and 5.02): plusplus.hs:3: The operator `++' [infixr 5] of a section

RE: punning in GHC?

2002-01-02 Thread Malcolm Wallace
Punning was removed from Haskell some while ago, I believe when Haskell 98 was fixed in Feb 1999. Indeed. However, due to popular demand, the feature was retained as an extension in Hugs (turn on with the -98 option) and nhc98 (turn on/off with the -puns/-nopuns options). Regards,

Re: ICFP (Functional Programming) 2002: Call for Papers

2001-12-21 Thread Malcolm Wallace
ICFP 2002: International Conference on Functional Programming Pittsburgh, 3--5 October 2002 The email announcement says 3-5 Oct, the webpage says 4-6 Oct. Which are the true dates for ICFP? Regards, Malcolm ___ Haskell mailing list [EMAIL

Re: Another question about sharing

2001-12-10 Thread Malcolm Wallace
If I have.. data Path = L Path | R Path | T paths = T : branch paths branch (p:ps) = L p : R p : branch ps This will be a CAF which can never be garbage collected, but may grow indefinitely large as it gets reduced. Correct? Any decent compiler will garbage collect the

Re: Another question about sharing

2001-12-10 Thread Malcolm Wallace
data Path = L Path | R Path | T paths = T : branch paths branch (p:ps) = L p : R p : branch ps This code was originally written in Clean, and the Clean designers addressed this problem by allowing the programmer to distinguish between constants and functions with no

Re: Another question about sharing

2001-12-10 Thread Malcolm Wallace
You can't rely on adding dummy arguments to cause re-evaluation: full-laziness (enabled when optimisation is on in GHC) will do the opposite transformation. Well in this case, you may find it harder to claim that the full laziness transformation constitutes an `optimisation'. Maybe the GHC

Re: Possible bug/omission in Numeric library?

2001-11-29 Thread Malcolm Wallace
As you say, we can't change the type of showInt. I suppose we could add: showIntAtBase :: Integral a=20 =3D a-- base - (a - Char) -- digit to char - a-- number to show. - ShowS showOct, showHex :: Integral a =3D

Possible bug/omission in Numeric library?

2001-11-28 Thread Malcolm Wallace
There is something strange about the Haskell'98 Numeric library, which I think could be considered a bug of sorts. There are functions readDec, readOct, readHex :: (Integral a) = ReadS a which read an integer from a string in base 10, 8, or 16, but there are no corresponding show functions

Re: Binary library

2001-11-22 Thread Malcolm Wallace
| Since the Report states that the derived Show instances only insert | parentheses where needed and that the derived Read instances can | read the output produced by show, I would suggest to change all | occurences of {showsPrec 10,readsPrec 10} to {showsPrec 0,readsPrec 0} | in the

Re: Binary library

2001-11-21 Thread Malcolm Wallace
Since the Report states that the derived Show instances only insert parentheses where needed and that the derived Read instances can read the output produced by show, I would suggest to change all occurences of {showsPrec 10,readsPrec 10} to {showsPrec 0,readsPrec 0} in the above code. That

Re: Strictness of library implementations

2001-11-12 Thread Malcolm Wallace
Ratio defines data (Integral a) = Ratio a = !a :% !a which GHC seems to implement as specified, but nhc and hugs seem to use data (Integral a) = Ratio a = a :% a Does this not have different strictness properties? It does. In nhc98's case, this is simply an oversight - i.e. a

web page bug

2001-11-06 Thread Malcolm Wallace
Someone might want to take a look at the web page http://www.haskell.org/ghc/download_old.html and update it. Under 'Distributions', it claims that the latest binary version of ghc available for any platform is 4.08. Regards, Malcolm ___

Re: GHC Installation Location

2001-10-25 Thread Malcolm Wallace
Is there an easy way to get 'ghc' or one of the other binaries to tell me where the GHC installation directory is? I want to put the includes directory in a gcc -I flag in my makefile. For ghc = 5.00, but not on Windows: #!/bin/sh GHCDIR=`grep '^libdir' ${whichGHC} | head -1 | sed

RE: ghc misreports the error line

2001-10-24 Thread Malcolm Wallace
chars = foo bar You *are* violating the Haskell 98 spec, I'm afraid :) No he isn't. At least, I can't find anything in the Report which disallows literal newline characters in a string literal. Oh, hold on. The production string - { graphic_|` | space | escape | gap } does

RE: ghc misreports the error line

2001-10-24 Thread Malcolm Wallace
On the contrary I'm glad to see that the Haskell standard is so sensible. I edit Haskell using XEmacs, and I don't want to have to do an octal or hexadecimal dump of my source code to determine whether a string contains a tab, newline, return, line feed, Unicode en-space (there are several

Re: Enum class

2001-10-24 Thread Malcolm Wallace
I just thought I should add the results for hbc and nhc98 to this enumeration of woes, to further illustrate the difficulties. i :: Int i = 0x7fff i_plus_1 = i+1 -- ghc : -2147483648 -- hugs: -2147483648 -- nhc98: -2147483648 -- hbc: -2147483648 i_succ = succ i --

Re: Haskell 98: Enum class

2001-10-24 Thread Malcolm Wallace
| | (Actually, ghc is `wrong': hbc, hugs and nhc98 match the Report's | | specification here: succ = toEnum . (+1) . fromEnum | | This is confirmed by the description of the semantics in | | section 3.10.) | | Lies, all lies. The default methods do not constitute a specification; | in this

ANNOUNCE: Hat 1.10 and nhc98 1.10

2001-10-22 Thread Malcolm Wallace
Hat 1.10 and nhc98 1.10 --- http://www.cs.york.ac.uk/fp/nhc98/ We are pleased to announce a new release 1.10 of Hat (the Haskell Tracing system), and the nhc98 compiler. This is a bugfix release. Its main feature is that

Re: Working character by character in Haskell

2001-10-19 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: Well, in Haskell each character of the string takes 20 bytes: 12 bytes for the list cell, and 8 bytes for the character itself Ahem, _Haskell_ mandates no such thing. Perhaps you are talking about a specific implementation? ghc probably. Isn't it

RE: GHC 5.02, import Prelude hiding ...

2001-10-13 Thread Malcolm Wallace
In the current Report draft, the idea is that a hiding clause hides both qualified and unqualified names import Foo hiding( f ) hides Foo.f as well as unqualified f. I think we all agreed that is a good change. But we (ahem, I) forgot to propagate that change to the sections

RE: read-ing scientific notation

2001-10-13 Thread Malcolm Wallace
The lexical syntax says that 10e3 means 10 e3 (i.e. two lexemes). I don't like this choice, and it could be fixed in the Revised H98 report. What is the likelihood of anyone *intentionally* writing an integer abutted directly with a varid, followed directly by another

<    4   5   6   7   8   9   10   11   >