Re: [Haskell] Debugging in Haskell?

2004-12-25 Thread Malcolm Wallace
Peter Rosenbeck [EMAIL PROTECTED] writes: I'm quite disappointed about the development environment that comes with GHCI and Hugs (the only systems which I had a closer look at). Compared to PLT Scheme (not to mention Smalltalk) this feels very antiquated. No trace, no symbolic debugging, no

Re: [Haskell-cafe] Parse text difficulty

2004-12-09 Thread Malcolm Wallace
Robert Dockins [EMAIL PROTECTED] writes: Prelude [1..5] `zipWith (+)` [7..] interactive:1: parse error on input `(' is there a technical reason for this or did it just happen? If you are asking why general expressions are prohibited between backticks, yes, there is a reason. The

Re: [Haskell-cafe] problem building hmake on Mac OS X

2004-12-02 Thread Malcolm Wallace
Steven Elkins [EMAIL PROTECTED] writes: I'm trying to build hmake on version 10.3.6 of Mac OS, GHCSYM=#pragma GCC set_debug_pwd /Users/sge/haskell/hmake-3.09 602 Thanks for the bug report - another MacOS user has already reported it and supplied a patch (attached). Apparently Apple's

Re: [Haskell] Unnamed fields

2004-11-16 Thread Malcolm Wallace
On Tue, 16 Nov 2004 15:04:02 +, Ian Lynagh [EMAIL PROTECTED] wrote: Is there a good reason why I can't say data Bar = Bar { _ :: Int, _ :: Char, x :: Bool } Since you only want one field out of many, what is the difficulty in simply defining the projection/updating functions

Re: [Haskell-cafe] Predicates in HaXml

2004-11-10 Thread Malcolm Wallace
Tom Spencer [EMAIL PROTECTED] writes: In XSLT there is an XPath function that will let you select a particular node in the current context, for example; xsl:value-of select=team[1] / This selects the first team element in the current context. Is there a work around to get similar

Re: Looing for advice on profiling

2004-11-09 Thread Malcolm Wallace
Duncan Coutts [EMAIL PROTECTED] writes: I'm looking for some advice on profiling and any suggestion on what might be going on with this program. One suggestion might be to serialise (key,value) pairs to file as they are first encountered, rather than waiting until they are all inside

Re: [Haskell-cafe] Global Variables and IO initializers

2004-11-09 Thread Malcolm Wallace
Benjamin Franksen [EMAIL PROTECTED] writes: We could reduce the pain of applying the C wrapper solution a bit by adding some support in the FFI. I imagine a feature to allow writing small C wrappers around imported foreign routines directly inside the Haskell module. Such a facility is

Re: Terminal does not reset correctly with System.Console.SimpleLineEditor

2004-11-07 Thread Malcolm Wallace
Einar Karttunen [EMAIL PROTECTED] writes: It appears that the console is not reset correctly with System.Console.SimpleLineEditor. The terminal does not echo characters until it is reset. The issue here is the order in which the library makes calls to hSetBuffering and system(stty icanon

Re: [Haskell-cafe] Re: Calling Haskell from .Net Environment

2004-11-01 Thread Malcolm Wallace
John Goerzen [EMAIL PROTECTED] writes: I'm interested in this too. I see a webpage at http://galois.com/~sof/hugs98.net/. I was going to try building it with Mono, but all it says is that Sources are available via CVS. I don't know which CVS repo, where, or anything. Does anybody have

Re: [Haskell] HaXML incorrect interpretation of XML spec!

2004-10-28 Thread Malcolm Wallace
S. Alexander Jacobson [EMAIL PROTECTED] writes: I modified the Prolog type to be data Prolog = Prolog (Maybe XMLDecl) [Misc] (Maybe DocTypeDecl) [Misc] and then modified the Prolog parser Thanks for spotting this bug and providing a fix. I also note that the XML spec allows misc* to

[Haskell] Re: understanding HaXml and escaping

2004-10-28 Thread Malcolm Wallace
S. Alexander Jacobson [EMAIL PROTECTED] writes: Is there a good entry point into HaXml? I've now spent some time trying to understand it and feel like I've gotten nowhere. It is a large package with many diverse facilities, so I'm not surprised. I take it you have read the ICFP'99 paper

Re: [Haskell-cafe] Re: Are handles garbage-collected?

2004-10-26 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: C finalisers are run during garbage collection, Haskell finalisers are run immediately afterwards. In fact, you cannot run a Haskell finaliser during GC, because you don't have a valid heap to run it in. But don't you run into problems in the

Re: [Haskell] is $ a no-op?

2004-10-13 Thread Malcolm Wallace
Jacques Carette [EMAIL PROTECTED] writes: -- |Apply list of functions to some value, returning list of results. -- It's kind of like an converse map. flist :: [a-b] - a - [b] flist fs a = map ($ a) fs I have attempted, unsuccessfully, to write flist above in a point-free manner. Is

Re: [Haskell-cafe] Re: OCaml list sees abysmal Language Shootout results

2004-10-11 Thread Malcolm Wallace
karczma [EMAIL PROTECTED] writes: I think the Haskell community has just been a bit slower in understanding the importance of strictness :) OK, I admit that I will never understand these complaints about the inefficiency of non-strict computations, since what I *require* in most of my

Re: [Haskell-cafe] Being Compatible

2004-10-08 Thread Malcolm Wallace
John Goerzen [EMAIL PROTECTED] writes: My initial thought was to use the cpp-style ifdefs I've seen elsewhere to mask those unsupported features on those particular systems. But Hugs at least doesn't support that, and I've found it extremely difficult to find a list of predefined macros for

Re: [Haskell-cafe] Re: OCaml list sees abysmal Language Shootout results

2004-10-07 Thread Malcolm Wallace
MR K P SCHUPKE [EMAIL PROTECTED] writes: Well, the sootout itself is using GHC, as it lists both language and implementation. There is no entry for NHC or Hugs... Both nhc98 and Hugs have been added in the last few days. Regards, Malcolm ___

Re: [Haskell-cafe] How do I get a long iteration to run in constant space

2004-10-04 Thread Malcolm Wallace
W M [EMAIL PROTECTED] writes: I suppose in my ODE example it's building up expressions somewhere for lazy evaluation, Exactly right. The trick is spotting which expressions. Until you have some experience of likely causes, rather than guessing I can recommend

Re: [Haskell-cafe] OCaml list sees abysmal Language Shootout results

2004-09-30 Thread Malcolm Wallace
with ghc-5.04.2 -O2. original space-leaky2.257 Greg Buchholz 1.619 * Sam Mason 0.594 Malcolm Wallace 0.457 Georg Martius 0.322 * Tomasz Zielonka 0.047 linux 'wc' 0.085 Those

Re: -fvia-c doesn't work

2004-09-29 Thread Malcolm Wallace
Yesterday, I wrote: It seems that I am unable to use -fvia-c with ghc, because it gives some C header file conflicts. Here is the observable problem: $ ghc-6.2.1 -c -fvia-c /tmp/ghcbug.hs In file included from /usr/include/stdlib.h:414, from

Re: -fvia-c doesn't work

2004-09-29 Thread Malcolm Wallace
$ ghc-6.2.1 -c -fvia-c /tmp/ghcbug.hs In file included from /usr/include/stdlib.h:414, from /usr/malcolm/local/lib/ghc-6.2.1/include/Stg.h:200, from /tmp/ghc1723.hc:3: /usr/include/sys/types.h:190: conflicting

Re: [Haskell-cafe] OCaml list sees abysmal Language Shootout results

2004-09-29 Thread Malcolm Wallace
Graham Klyne [EMAIL PROTECTED] writes: main = do file - getContents putStrLn $ show (length $ lines file) ++ ++ show (length $ words file) ++ ++ show (length file) Space-leak or what? I can see that this

-fvia-c doesn't work

2004-09-28 Thread Malcolm Wallace
It seems that I am unable to use -fvia-c with ghc, because it gives some C header file conflicts. Here is the observable problem: $ ghc-6.2.1 -c -fvia-c /tmp/ghcbug.hs In file included from /usr/include/stdlib.h:414, from

Re: Haddock: how to disable the JavaScript menus?

2004-09-28 Thread Malcolm Wallace
On the theme of improving Haddock, do you think it could be fixed to generate valid HTML? Here are some examples of the errors I get when running Haddock output through validate (the Web Design Group's HTML and XML validator). *** Errors validating Text.XML.HaXml.Combinators.html: ***

Re: [Haskell] hscpp

2004-09-28 Thread Malcolm Wallace
Wolfgang Jeltsch [EMAIL PROTECTED] writes: there was some discussion about a Haskell-friendly CPP a while ago. What happend to this project? I desperately need such a preprocessor. It is called cpphs, and is currently at version 0.7. I think it is feature-complete now, and has behaviour

Re: [Haskell-cafe] OCaml list sees abysmal Language Shootout results

2004-09-28 Thread Malcolm Wallace
Keith Wansbrough [EMAIL PROTECTED] writes: I can't believe that a simple wc implementation should be 570 times slower in Haskell than OCaml - could someone investigate and fix the test? With code like this, I'm not surprised! main = do file - getContents

Re: [Haskell-cafe] mutually recursive modules

2004-09-24 Thread Malcolm Wallace
Henning Thielemann [EMAIL PROTECTED] writes: As far as can see neither Hugs or GHC really support them. Is this still on the to-do list or is it almost dropped due to implementation difficulties? Hugs doesn't support mutually-recursive modules at all. Ghc and nhc98 support them only if you

Re: [Haskell-cafe] mutually recursive modules

2004-09-24 Thread Malcolm Wallace
Henning Thielemann [EMAIL PROTECTED] writes: a situation which occurs only very rarely, and for which there is a relatively easy workaround. Namely? ... See below. It's interesting how other languages solve this problem. In Modula-3 it is solved by explicit module

Re: [Haskell-cafe] Writing binary files?

2004-09-15 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: Here's a tarball that works with GHC 6.2.1 on a Unix platform, just --make to build it: http://www.haskell.org/~simonmar/new-io.tar.gz Found a bug already... In System/IO/Stream.hs, line 183: streamReadBufrer s 0 buf = return 0

Re: Text.ParserCombinators.Parsec requires -package text.

2004-09-08 Thread Malcolm Wallace
But if I have two layers over gtk 1.2 and 2.0 and both use the hierarchical module system and are therefore marked as auto you would have the same problem of linking in two versions of gtk which doesn't work. Did I miss something? The auto flag does *not* mean uses hierarchical module

Re: overzealous defaulting?

2004-08-24 Thread Malcolm Wallace
John Meacham [EMAIL PROTECTED] writes: module A where import B a = 32 + b default (Integer) module B where import A b = 32 + a default (Int) so, what types do 'a' and 'b' get? ghc sort of sidesteps the issues with the hi-boot files, so they will get whatever is declared in those,

[Haskell] Re: overzealous defaulting?

2004-08-24 Thread Malcolm Wallace
John Meacham [EMAIL PROTECTED] writes: module A where import B a = 32 + b default (Integer) module B where import A b = 32 + a default (Int) so, what types do 'a' and 'b' get? ghc sort of sidesteps the issues with the hi-boot files, so they will get whatever is declared in those,

Re: [Haskell-cafe] Installing HaXML,(using Hugs and WindowsXP)

2004-08-24 Thread Malcolm Wallace
Tom Spencer [EMAIL PROTECTED] writes: Has anyone successfully installed HaXML to be used with winhugs in XP. Using the build.bat included with HaXML it seems that it can only be installed for GHC. Have you tried using the hugs-package command in a shell window? hugs-package HaXml-1.12/src

Re: Space usage

2004-08-17 Thread Malcolm Wallace
Simon Peyton-Jones [EMAIL PROTECTED] writes: I had a look at this. It's an old chestnut: lazy pattern matching. You have let ((commands, s), x) = run (read iters) 5 in do ...do something with commands... print x Trouble is, the 'x' hangs onto both components

Re: [Haskell-cafe] exceptions vs. Either

2004-08-04 Thread Malcolm Wallace
Ketil Malde [EMAIL PROTECTED] writes: Hmm...if I run it through CPP and #define HEAD (\x - if null x then error (__FILE__:__LINE__) else head x) is the __LINE__ resolved at the place of declaration or at the place of usage? According to the C standard, at the position of /usage/ of the

Re: [Haskell] hmake question

2004-08-02 Thread Malcolm Wallace
Tom Hofte [EMAIL PROTECTED] writes: Fail: Can't find module IOExts in user directories . Or in installed libraries/packages at /home/hofte/local/lib/ghc-6.2.1/imports /home/hofte/local//lib/ghc-6.2.1/uust /home/hofte/local//lib/ghc-6.2.1/imports/HaXml

Re: [Haskell] confusing language in report and a bug in (ghc|hugs)

2004-07-30 Thread Malcolm Wallace
John Meacham [EMAIL PROTECTED] writes: Also, another small bug in the report: in chapter 4, the fixity table is refered to as table 4.1 in the text, but is labeled 'table 2'. It is also missing the (=) operator which is defined in the prelude. Thanks, noted in the errata. (However, the

Re: [Haskell] confusing language in report and a bug in (ghc|hugs)

2004-07-29 Thread Malcolm Wallace
John Peterson [EMAIL PROTECTED] writes: The intention in the report was to match in the order listed in the pattern - you need not consult the data declaration to understand the ordering. I think the report is clear enough - it's just a bug in ghc. Just to be sure, I've added a

Re: [Haskell-cafe] Beginner problems with 'triple' code

2004-07-27 Thread Malcolm Wallace
Stu White [EMAIL PROTECTED] writes: type Triple = Triple { data Triple = Triple {-- 'type' is for synonyms, 'data' for user-defined entry 1 :: a; entry 2 :: a; entry 3 :: a; entry_1 :: a; -- field names must be a single identifier entry_2 :: a;

bug in System.system on ghc-6.2.1

2004-07-20 Thread Malcolm Wallace
Using the glibc-2.2 (RedHat 7) Linux binary package of ghc-6.2.1, the following program: import System.Cmd main = do v - system(ghc --version 21) print v incorrectly gives ExitFailure 127 whereas with the glibc-2.3 Linux binary package of ghc-6.2.1, the same program

Re: bug in System.system on ghc-6.2.1

2004-07-20 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: import System.Cmd main = do v - system(ghc --version 21) print v Are you sure your shell understands the '' syntax? Not all do. Yes, on RH7.2, /bin/sh is bash. Assuming you're using the same shell in both cases, this could

ghc-6 messing with terminal settings?

2004-07-02 Thread Malcolm Wallace
OK, here's a strange bug. I have a program (hat-trail) that uses System.system(stty -icanon -echo) together with resetting the buffering of I/O, in order to get so-called character-break mode on the terminal. Once the program is finished, it calls System.system(stty icanon echo) to restore the

Re: ghc-6 messing with terminal settings?

2004-07-02 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: It would appear that ghc-6 is being careful to save the current state of the terminal at the point of hSetBuffering, and to restore it on exit, something ghc-5 did not do. But paradoxically, this safer choice caused things to mess up, instead of

Re: ghc-6 messing with terminal settings?

2004-07-02 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: I tend to think that changing the terminal settings for NonBlocking Handles attached to TTYs is the right thing, because it leads to fewer confused users. And I tend to agree. GHC has always changed the

Re: [Haskell] modern language design, stone age tools

2004-06-23 Thread Malcolm Wallace
Seeing as Haskell is apparently such a popular language these days, I don't suppose a working debugger would be too much to ask for, would it? I agree. In case you're wondering, yes I have already tried using Hat and Buddha. But I'm trying to debug a real application, not a toy one, and

Re: Understanding strictness of ghc output

2004-06-22 Thread Malcolm Wallace
Adrian Hey [EMAIL PROTECTED] writes: height :: AVL e - Int height = addHeight 0 where addHeight h E= h addHeight h (N l _ _) = addHeight h+2 l addHeight h (Z l _ _) = addHeight h+1 l addHeight h (P _ _ r) = addHeight h+2 r It seems pretty obvious to me that addHeight is

Re: Understanding strictness of ghc output

2004-06-22 Thread Malcolm Wallace
Simon Peyton-Jones [EMAIL PROTECTED] writes: | That contradicts my intution for seq. I would read it as h is forced | before h is forced, and I would think that (h `seq` h) is equivalent | to h. | | Were I am wrong? You're not wrong -- Malcolm is. The function is certainly strict in h,

Re: Understanding strictness of ghc output

2004-06-22 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: Nope. You can't return something without evaluating it to head normal form in Haskell. Every value that is returned is a value, never a thunk. If you want to return something unevaluated, you have to wrap it in a constructor. Actually, there are two

Re: Understanding strictness of ghc output

2004-06-22 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: If a function is called, then the result has been demanded. There are no situations in which a function has been called but the caller will accept a thunk as the result without further evaluating it. The caller would definitely have to evaluate it, so

bug in instance Read Int

2004-05-31 Thread Malcolm Wallace
The Haskell'98 Report specifies that 'read'ing an Int should accept only decimal notation instance Read Int where readsPrec p = readSigned readDec (or near equivalent), yet ghc seems to read hexadecimal Ints. Prelude show (Char.chr (read 0x2B :: Int)) '+' Prelude Ghc's

Re: Namespace trouble

2004-05-20 Thread Malcolm Wallace
Jorge Adriano Aires [EMAIL PROTECTED] writes: I have the following structure: MyProgram/A.hs MyProgram/Aux/B.hs MyProgram/Aux/C.hs You have already received replies to your question, so let me make a different point. If you ever intend your program to work on Windows,

[Haskell] ANNOUNCE: cpphs-0.2

2004-05-15 Thread Malcolm Wallace
cpphs-0.2 - Cpphs is a re-implementation (in Haskell) of the C pre-processor. Version 0.1 dealt only with conditional compilation (#if and friends) and file inclusion (#include). Version 0.2 now also implements the rest of cpp's

Re: [ ghc-Bugs-952398 ] Windows compiler assumes (wrongly) TH when using ($)

2004-05-14 Thread Malcolm Wallace
Comment By: Simon Peyton Jones (simonpj) Turns out not to be a bug. -- Comment By: Esa Ilari Vuokko (eivuokko) It appears that I had an autopackage installed that had -fglasgow-exts enabled. Sorry for the noise.

Re: Prelude/main magicks?

2004-05-14 Thread Malcolm Wallace
Niklas Broberg [EMAIL PROTECTED] writes: Taking Lava, a hardware description language, as my example, I would argue that many users of Lava don't really care if it's embedded in Haskell or whereever it comes from, they would just use it. lavac Main.hs where lavac is could

Re: [Haskell] generic currying (type classes and functional dependencies)

2004-05-11 Thread Malcolm Wallace
Duncan Coutts [EMAIL PROTECTED] writes: So I thought that functional dependencies might help because the curried type should uniquely determine the uncurried type (and vice versa). However if I change the class declaration to: class Curry tupled curried | tupled - curried, curried - tupled

Re: GHC CVS refusing connections...

2004-04-27 Thread Malcolm Wallace
Sigbjorn Finne [EMAIL PROTECTED] writes: Thanks to the hard work of Jeff Lewis, the CVS pserver at cvs.haskell.org is now back up again, Good, and well done. Unfortunately, ssh-based connections to the writable repository have now started to fail for me. The ssh server does not respond to

Re: [Haskell] sizeFM type

2004-04-26 Thread Malcolm Wallace
Wolfgang Jeltsch [EMAIL PROTECTED] writes: To ask a silly question, is Int defined as 32 bits or is it defined in a similar vein to C's int? I think it is defined to cover at least the numbers from -(2 ^ 27) + 1 to 2 ^ 27 - 1. Actually, according to section 6.4 of the Report:

Re: [Haskell] hirarchical module system qualifiers

2004-04-08 Thread Malcolm Wallace
Iavor S. Diatchki [EMAIL PROTECTED] writes: i would like to propose that by default, the qualified names introduced by an import are just the last part of the module name, and not the entire module name. When originally proposing the hierarchical module namespace, I recognised this potential

Re: [Haskell] main::[String]-IO() ?

2004-03-23 Thread Malcolm Wallace
David Sankel [EMAIL PROTECTED] writes: Since type signature declarations for functions are generally considered good practice, those who use - getArgs would actually need to type two extra characters. And those who do not use getArgs typically (which may or may not be the case in general),

Re: Haskell performance

2004-03-18 Thread Malcolm Wallace
Simon Peyton-Jones [EMAIL PROTECTED] writes: | I am currently evaluating different languages for implementing an | application which will have to manipulate large graphs representing | the structure of programs and their evolution. | | Speed is in fact a crucial criterium for the

Re: Haskell performance

2004-03-18 Thread Malcolm Wallace
Josef Svenningsson [EMAIL PROTECTED] writes: [Doug Bagley's Language Shootout] You should look at the individual examples and see how relevant their results are for you. Well, I think this shows that one should be very careful when reading these kinds of benchmarks. And don't forget

Re: ghc 6.2 possible bug with gcc 3.3.x, strange parse error

2004-03-15 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: Incedentally, GCC 3.4 will make this situation even worse. They have now taken the approach that a backslash followed by whitespace at the end of the line should be interpreted as a line continuation (and a warning is emitted). So the hack from the

Re: [Haskell-cafe] citeseer

2004-03-12 Thread Malcolm Wallace
MR K P SCHUPKE [EMAIL PROTECTED] writes: Is it just me or is citeseer.nj.nec.com down? Citeseer appears to have moved to http://citeseer.ist.psu.edu/ ___ Haskell-Cafe mailing list [EMAIL PROTECTED]

Re: [Haskell] performance tuning Data.FiniteMap

2004-03-02 Thread Malcolm Wallace
MR K P SCHUPKE [EMAIL PROTECTED] writes: I was thinking about improving array performance, and was wondering if a transactional model would work well. I would be interested in any comments... I suspect somebody has done this before, but I havent looked for any papers yet. O'Neill and

Re: [Haskell] Re: Data.Set whishes

2004-02-20 Thread Malcolm Wallace
Wolfgang Jeltsch [EMAIL PROTECTED] writes: Am Freitag, 20. Februar 2004 10:23 schrieb Koen Claessen: http://www.haskell.org/hierarchical-modules/libraries/library-design.html What I mean is, instead of: newIORef, writeIORef, readIORef We could have: IORef.new, IORef.write,

Re: [Haskell] hmake -- on Windows?

2004-02-20 Thread Malcolm Wallace
Graham Klyne [EMAIL PROTECTED] writes: I just took a quick look at hmake, and it appears to be very Unix/Linux-centred in its applicability. Yes, in general it is. hmake's origins are lost in the mists of time, but certainly date from the very earliest days of Haskell (1991-1992?), when the

ghc-6.2 bug in type inference

2004-02-06 Thread Malcolm Wallace
The following program gives a weird type inference error for me in ghc-6.2, but compiles perfectly fine in ghc-5.04.2, ghc-6.0, nhc98, Hugs, etc. module Bug ( mkRational ) where import Ratio data Lex = L_RATIONAL Rational mkRational :: Integer - Integer - Integer - Integer -

Re: ghc-6.2 bug in type inference

2004-02-06 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: * package extra-ghc-opts are propagated to all compilations, whether those compilations use that package or not. Indeed - I don't recommend the use of extra_ghc_opts at all. OK, noted. I realised later that the extra options

Re: Problem with ghc on Windows ME

2004-01-29 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: The implementation of rawSystem will attempt to compensate for the internal translation that Windows does on the command-line; on Unix no translation is necessary. So clients of rawSystem should be more

Re: GHC source bitten by the ghost of DOS

2004-01-15 Thread Malcolm Wallace
Graham Klyne [EMAIL PROTECTED] writes: I've just been bitten by the ghost of DOS when trying to unpack the source kit for GHC on a Windows (XP) system. It appears that the filename AUX is reserved (still crazy after all these years?). Unfortunately, the GHC source kit contains a file

Re: getting the path to the executing program

2004-01-10 Thread Malcolm Wallace
Hal Daume III [EMAIL PROTECTED] writes: If I may suggest, a Haskell implementation may want to give a programmer a way to obtain the unmangled argv0. If I may second that, ... You mean like nhc98 and hbc have always done...? Regards, Malcolm

Re: -xc giving very little information

2004-01-05 Thread Malcolm Wallace
Stefan Reich [EMAIL PROTECTED] writes: A complex program of mine fails with this message: Fail: Maybe.fromJust: Nothing I tried to extract more information about the error by compiling with -prof -auto-all and running the program with +RTS -xc, as advised on

Re: incompatible signatur syntax within instance definition

2003-12-08 Thread Malcolm Wallace
Christian Maeder [EMAIL PROTECTED] writes: Fergus Henderson wrote: I think the issue here is that in ghc (with -fglasgow-exts), the a here refers to the same type variable a in the top of the instance declaration, which has already been constained, and cannot be constrained again. Is

Re: How to best add logging/debugging code?

2003-11-27 Thread Malcolm Wallace
Is there a list of problems anywhere with using trace? For example does it affect evaluation order? Apart from changing the evaluation order of expressions, trace has other drawbacks, noted I think by Lennart(?) but I can't remember exactly where. One issue is this: Consider an expression

Re: AW: Heap profiling in GHC broken?

2003-11-04 Thread Malcolm Wallace
A tutorial on this by one of the experts would be very welcome. The people at York University have written some great papers on this topic. The canonical tutorial paper is in the Advanced Functional Programming Summer Schools series: C. Runciman and N. Rojemo. Heap profiling for space

Re: unknown symbol `__stginit_List_'

2003-10-29 Thread Malcolm Wallace
Josef Svenningsson [EMAIL PROTECTED] writes: (This is when invoking ghci -package yahu) Loading package base ... linking ... done. Loading package yahu ... linking ... /.../chalmers.se/fs/cab/cs/work/proj/multi/pub/lib/yahu/Yahu/YahuHaskell.o: unknown symbol `__stginit_List_' ghc-6.0.1:

Re: Non-blocking keyboard peek

2003-10-02 Thread Malcolm Wallace
Adrian May [EMAIL PROTECTED] writes: Therefore I need a non-blocking keyboard peek function. So far, my searching only lead to some stuff about using threads in GHC but that seems far too complicated and messy. Look in the standard IO library for 'hReady', which is a non-blocking check for

Re: interact behaves oddly if used interactively

2003-10-01 Thread Malcolm Wallace
Christian Maeder [EMAIL PROTECTED] writes: I guess interact does what it should, but I think it should be changed to avoid interleaved in- and output. Surely the name suggests that interactive behaviour is required, i.e. exactly some interleaving of input and output. The chunk-size of the

Re: interact behaves oddly if used interactively

2003-10-01 Thread Malcolm Wallace
Christian Maeder [EMAIL PROTECTED] writes: I'm not happy that interleaving depends on the strictness. Lazy or strict evaluation should only change the behaviour of overall termination (lazy evaluation should terminate more often). But the whole purpose of 'interact' is to use its argument

Re: lexer puzzle

2003-09-26 Thread Malcolm Wallace
Keith Wansbrough [EMAIL PROTECTED] writes: And I don't think - is part of the language - it only appears in the type syntax, not term syntax. If you allow it, you have to allow * as well. Errm, you just gave an example of - in the term syntax... (\x - x*x) 3 Regards, Malcolm

Re: pretty newby

2003-09-24 Thread Malcolm Wallace
John Hughes [EMAIL PROTECTED] writes: The problem is that parsers in compilers don't keep track of comments. Instead they discard them at the first opportunity (during lexing). ... What's needed is a parser that can parse comments, and tie them to the *right place* in

Re: pretty newby

2003-09-23 Thread Malcolm Wallace
Luc Taesch [EMAIL PROTECTED] writes: are there any facility to pretty print an haskell program ? im aware of HPJ combinators library, but i was looking for a command line utility, rather.. am i missing an entry in HPJ ? To some extent, you can use an ordinary Haskell compiler to pretty-print

Re: Generating setMember functions for record structures

2003-09-23 Thread Malcolm Wallace
Peter Simons [EMAIL PROTECTED] writes: setFoo:: State - [Int] - State setFoo st x= State { foo = x , bar = bar st } There is an easier way to do this, using the record update syntax rather than record construction syntax. e.g.

Re: Placement of OPTION pragmas

2003-09-19 Thread Malcolm Wallace
[EMAIL PROTECTED] writes: Moreover, there is only one first line, and assuming some kind of language pragma is introduced, and assuming Simon Marlow goes ahead and introduces GHC_OPTIONS, and the other implementors goes ahead and introduces HUGS_OPTIONS,

Re: Fw: cannot find -lreadline

2003-09-16 Thread Malcolm Wallace
Luc Taesch [EMAIL PROTECTED] writes: when compiling HaXML with 6.01 on mandrake, I got /usr/bin/ld: cannot find -lreadline, as detailled hereafter. The HaXml package does not require or use readline. So I think this problem is a ghc-6.0.1 problem, not specific to HaXml. Regards,

Re: lexer puzzle

2003-09-15 Thread Malcolm Wallace
Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes: A... A (constructor), then ... (operator). This is how I understand Haskell 98 lexing rules. Argh, I was wrong. It's A.. (qualified operator), then . (operator). You are forgetting about the maximal munch rule. An operator

Re: Syntax extensions (was: RE: The Future of Haskell discussion at the Haskell Workshop)

2003-09-10 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: Of course, if we change the language that is implied by -fglasgow-exts now, we risk breaking old code :-) Would folk prefer existing syntax extensions be moved into their own flags, or left in -fglasgow-exts for now? I'm thinking of: - implicit

Re: haskell html-colorizer

2003-09-03 Thread Malcolm Wallace
[EMAIL PROTECTED] writes: Are anyone aware of a haskell html-colorizer a' la the emacs-mode? I wrote one a few months ago, but never released it. So here it is, released at last as version 1.0. (It can also do ANSI terminal colouring, if you are interested.) Regards, Malcolm

Re: Debugging

2003-08-29 Thread Malcolm Wallace
Konrad Hinsen [EMAIL PROTECTED] writes: But if I can only see the results of named function calls, I don't get the intermediate values. A typical situation would be a function that looks like f x = sum [...] When my unit test reports that the sum is wrong, I'd then like to use a

Re: Debugging

2003-08-28 Thread Malcolm Wallace
Konrad Hinsen [EMAIL PROTECTED] writes: Particular difficulties in Haskell: - Conditional tracing. Suppose a function is called 1000 times but I am interested in a particular intermediate result only when the third argument is greater then three. - Tracing a part of a value, say the

Re: literate scripts.

2003-08-14 Thread Malcolm Wallace
Immanuel Litzroth [EMAIL PROTECTED] writes: thanks for your code. Perhaps I was not completely clear in my question: I specifically want to know if unliterating should include lexing so that it recognizes strings (comments) or if it can be a separate phase. The following compiles without

Re: Timing repeated function calls

2003-08-11 Thread Malcolm Wallace
Jeffrey A. Scofield [EMAIL PROTECTED] writes: I'm not worried about speed per se, rather I'm trying to validate my (rough) complexity analysis for the function and, if it works, to make some projections for how long it would take to calculate various things. Since you aren't interested in

Re: literate scripts.

2003-08-05 Thread Malcolm Wallace
Immanuel Litzroth [EMAIL PROTECTED] writes: I have a small question relating to literate haskell programs that use the \begin{code} \end{code} style. Am I correct to assume that \end{code} inside a string should be recognized as being inside a string. The report seems to say this, but the

Re: Interaction and ambiguous type variables

2003-07-03 Thread Malcolm Wallace
Ralf Hinze [EMAIL PROTECTED] writes: I am posting the following bug report every once in a while. Main mirror [] ERROR - Cannot find show function for: *** Expression : mirror [] *** Of type: [a] Instructor: it's because `mirror []' has the polymorphic type `[a]' and the compiler

Re: state of ghc6 on sparc

2003-06-19 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: | Making a working readline isn't that simple - you need to know something | about the terminal properties for one, which means being able to use | termcap or terminfo. I expect that one can avoid termcap/terminfo by sticking to ANSI terminal control

Re: ghc6.0 and ghc5.04.3 i386 rpms available

2003-06-13 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: The reason for including the version number in the name is so you can have side-by-side installation of several different versions of GHC, right? Is there really a demand for having several different patchlevel releases installed at the same time? The

Re: FFI Help

2003-06-04 Thread Malcolm Wallace
foreign import ccall math.h signgam signgamC :: IO Int signgam is an int variable, but this assumes that it is a function of type int signgam(void). Write a C wrapper int get_signgam(void) { return signgam; } and import that. Or alternatively, foreign import the address of the int and

Re: ANNOUNCE: GHC version 6.0

2003-06-02 Thread Malcolm Wallace
Sven Panne [EMAIL PROTECTED] writes: Hmm. Perhaps you should rename the long form of -L to --list-local-packages. Just a small note: This was a buglet in System.Console.GetOpt.getOpt, which has been fixed since GHC 5.04.3. Consequently this does not happen if you use a GHC = 5.04.3

HaXml and ghc-6.0 (was Re: can't manage to compile ghc6)

2003-05-31 Thread Malcolm Wallace
Jan Scheffczyk [EMAIL PROTECTED] writes: I installed HaXml 1.08 newly under ghc 6 and get the following error when using ghci -package HaXml: GHCi runtime linker: fatal error: I found a duplicate definition for symbol TextziPrettyPrintziHughesPJ_zdzpzd_entry whilst processing object

Re: ANNOUNCE: GHC version 6.0

2003-05-30 Thread Malcolm Wallace
We are pleased to announce a new major release of the Glasgow Haskell Compiler (GHC), version 6.0. There is a strange error message in ghc-pkg-6.0, viz. $ ghc-pkg-6.0 --list-packages option `--list-packages' is ambiguous; could be one of: -l --list-packagesList packages

Re: -fwarn-unused-matches

2003-03-28 Thread Malcolm Wallace
Serge D. Mechveliani [EMAIL PROTECTED] writes: ghc -c -fwarn-unused-matches says Warning: Defined but not used: x when compiling the function f :: Eq a = [(a, a)] - (a, a) - [(a, a)] fps (x, y) = [(z, y) | (z, x) - ps] Is it a bug? No. The x on

<    3   4   5   6   7   8   9   10   11   >