Re: Debugging on Mac OS X

2006-10-24 Thread Malcolm Wallace
Luke Worth [EMAIL PROTECTED] wrote: I just installed GHC 6.6 using the PPC binary installer on Mac OS X. I'm having some trouble getting debuggers to work; I have tried both plargleflarp (buddha) and Hat. Neither of them will compile on GHC 6.6 on Mac yet. As an interim measure, I have

Re: (Pattern) Guards in lambdas

2006-10-18 Thread Malcolm Wallace
Claus Reinke [EMAIL PROTECTED] wrote: since Pattern Guards appear to be popular with the committee, I suggest to revisit the decision to drop guards from lambdas: suggestion: undo removal of guards from lambdas, especially (but not only) if pattern guards make it into the language. See the

Re: Pattern matching order for records

2006-10-13 Thread Malcolm Wallace
Ian Lynagh [EMAIL PROTECTED] wrote: Has clarifying the pattern matching order for records as described in http://hackage.haskell.org/trac/ghc/ticket/246 been discussed for haskell'? I couldn't see it on the proposals list. Perhaps because this has already been fixed in the errata to the

Re: [Haskell-cafe] tail-recursing through an associative list

2006-10-12 Thread Malcolm Wallace
Seth Gordon [EMAIL PROTECTED] wrote: almost-entirely-functional code ... that in its first draft, took about three seconds to process 2,000 rows, eight minutes to process 20,000 rows, and overflowed a 1-MB stack when processing 200,000 rows. Oops. Which just goes to show that your algorithm

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Malcolm Wallace
ihope [EMAIL PROTECTED] wrote: It's possible to make both infinite list and finite list datatypes: data Inf a = InfCons a (Inf a) data Fin a = FinCons a !(Fin a) | FinNil At least, I think the Fin type there has to be finite... No, your Fin type can also hold infinite values. The

Re: [Haskell-cafe] beginner's problem about lists

2006-10-11 Thread Malcolm Wallace
Matthias Fischmann [EMAIL PROTECTED] wrote: No, your Fin type can also hold infinite values. let q = FinCons 3 q in case q of FinCons i _ - i == _|_ does that contradict, or did i just not understand what you are saying? That may be the result in ghc, but nhc98 gives the answer 3. It

Re: [Haskell-cafe] HaXml and ghci unresolved symbol

2006-09-11 Thread Malcolm Wallace
Andrea Rossato [EMAIL PROTECTED] wrote: So, I'm not able to create an object file (dynamically) linked to HaXml. This is the reason why hxml doesn't work with ghc (and ghci) but works perfectly with hugs. Now, I don't know whether I should contact the HaXml author or submit a bug report

Re: [Haskell-cafe] Re: how do you debug programs?

2006-09-06 Thread Malcolm Wallace
Andrae Muys [EMAIL PROTECTED] wrote: It's a truism to say if your code doesn't work it's because you don't understand it; ... Indeed, but tracing the execution of the code, on the test example where it fails, will often give insight into one's misunderstanding. And often, the person trying

Re: cvs commit: hugs98 Makefile RPM.mk hugs98/libraries/tools convert_libraries

2006-09-05 Thread Malcolm Wallace
HaXml (no longer builds) In what way does HaXml fail to build for Hugs? Is it easily fixable? ... and there's the famous Data.FiniteMap. So does anyone have any objections if I go ahead and commit the replacement (compatibility) implementation of Data.FiniteMap to the main

Re: FiniteMap

2006-09-05 Thread Malcolm Wallace
So does anyone have any objections if I go ahead and commit the replacement (compatibility) implementation of Data.FiniteMap to the main repository for packages/base? I'd rather see HaXml updated to use Data.Map, perhaps with a compatibility layer for older GHCs. OK, I've looked more

Re: [Haskell-cafe] [Parsec] No identEnd in ParsecToken?

2006-09-05 Thread Malcolm Wallace
Stephane Bortzmeyer [EMAIL PROTECTED] wrote: identifier = do start - letter rest - many (alphaNum | char '-') end - letter return ([start] ++ rest ++ [end]) ? characters authorized for identifiers because the parser created by many is greedy: it consumes

Re: Re[2]: [GHC] #876: stack overflow on 'length . filter odd $ [0 .. 999999999]'

2006-08-31 Thread Malcolm Wallace
Bulat Ziganshin [EMAIL PROTECTED] wrote: It makes sense to me that the above behaviour is seen: length is now a good consumer, but it generates 1+(1+(1+(1+... as it is consuming, and this causes a stack overflow. I don't think we can fix this while staying with fold/build fusion,

Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Malcolm Wallace
it's because you not programmed a lot with type classes. if you start, you will soon realize that type signatures with classes are just unreadable. just look at sources of my streams library copyStream :: (BlockStream h1, BlockStream h2, Integral size) = h1 - h2 -

Re: class [] proposal Re: [Haskell-cafe] One thought: Num to 0 as ? to list?

2006-08-22 Thread Malcolm Wallace
Bulat Ziganshin [EMAIL PROTECTED] wrote: 2) allow to use type classes in type declarations like the types itself. for example, allow the following: f :: Num a = a - Int write as f :: Num - Int and following: sequence :: Monad m = [m a] - m [a] write as sequence :: [Monad a] - Monad

Re: ghci feature suggestion

2006-08-17 Thread Malcolm Wallace
Frederik Eaton [EMAIL PROTECTED] wrote: I've been thinking that it would be nice if I could give ghci on the command line a list of commands to run initially when it starts. GHCi can read commands from a .ghci or $HOME/.ghci files. It's not enough because I work on more than one

Re: [Haskell-cafe] if-then-else as rebindable syntax (was Re: Why does Haskell have the if-then-else syntax?)

2006-07-28 Thread Malcolm Wallace
David House [EMAIL PROTECTED] wrote: Or perhaps (?:) or something like that, This has come up a few times on #haskell, and the consensus is that a tertiary (?:) operator isn't possible because of the deep specialness of (:). However, you can simulate it pretty well: infixr 1 ? (?) ::

Re: GHC compile times (was Re: GHC 6.4.3 is stalled)

2006-07-26 Thread Malcolm Wallace
Joel Reymont [EMAIL PROTECTED] wrote: Thanks for the tip! I'm _really_ interested in why it takes 55 min on Linux and 3+ hours on Mac Intel, though. Any clues? Building a compiler generally reads/touches/creates a very large number of files. So one possibility is the relative efficiency of

Re: GHC compile times (was Re: GHC 6.4.3 is stalled)

2006-07-26 Thread Malcolm Wallace
Joel Reymont [EMAIL PROTECTED] wrote: Thanks for the tip! I'm _really_ interested in why it takes 55 min on Linux and 3+ hours on Mac Intel, though. Any clues? Another thought. The ghc HACKING guide has this to say: The GHC build tree is set up so that, by default, it builds a

Re: [Haskell-cafe] ghc hackathon start time?

2006-07-25 Thread Malcolm Wallace
What time on September 14th will the GHC Hackathon begin? I don't need a precise answer, just a quick one. Plus or minus an hour will do. Morning certainly. In the absence of a more definite answer from the Simons (or the Galois hosts), I would guess 0900-1000hrs local time. Regards,

Re: [Haskell-cafe] Why Haskell?

2006-07-23 Thread Malcolm Wallace
Matthew Bromberg [EMAIL PROTECTED] writes: 1) Hat looks really interesting thanks. Hopefully it will run on windows. Under mingw or cygwin, possibly. Natively, not. 3) The problem here is existing code. I don't want to add every function that I use into a class just to maintain simple

Re: Lookup module and package defining x?

2006-07-21 Thread Malcolm Wallace
Marc Weber [EMAIL PROTECTED] wrote: My purpose: After having found the a function I want to use it without having to search where does it belong to and where does it come from. I want it beeing as up to date as the installed libraries. You can download Hoogle as a command-line tool, and give

Re: [Haskell-cafe] trace function

2006-07-20 Thread Malcolm Wallace
Alexander Vodomerov [EMAIL PROTECTED] wrote: main = do putStrLn xxx return (trace yyy ()) putStrLn zzz only xxx and zzz is displayed. yyy is missing. This is because you never demanded the value of (trace yyy ()), so it was never computed. The joys of laziness! To force its

Re: [Haskell-cafe] Re: Why is Day and Month bounded?

2006-07-14 Thread Malcolm Wallace
Johan Holmquist [EMAIL PROTECTED] wrote: If Day (and Month) where NOT instances of Bounded, the following would be possible: [Saturday .. Tuesday] = should return [Saturday, Sunday, Monday, Tuesday] = but returns [] This does seem like a reasonable argument to me. Some enumerations are

Re: [Haskell-cafe] Hackathon hesitation

2006-07-13 Thread Malcolm Wallace
Martin Percossi [EMAIL PROTECTED] writes: Another question regarding the hackathon: will anyone be video taping the presentations? I live in europe and travel will be prohibitive: it would be nice if the presentations where mpeg'd and dumped onto the haskell website so that anyone can

Re: RULES pragmas

2006-07-12 Thread Malcolm Wallace
[EMAIL PROTECTED] (Donald Bruce Stewart) wrote: So what am I doing wrong? And is there any way to ask the compiler to give a warning if the RULES pragma contains errors? In this case, it's because it's missing -fglasgow-exts, I think. Ah, thank you. The missing (and undocumented)

Re: RULES pragmas

2006-07-12 Thread Malcolm Wallace
Malcolm Wallace [EMAIL PROTECTED] wrote: Ah, thank you. The missing (and undocumented) option. Actually, now I came to submit a patch to the manual, I discover that it /is/ documented, but at the beginning of section 7. (But on the index page on the web, the link to section 7 is two whole

Re: -threaded

2006-07-07 Thread Malcolm Wallace
Christian Maeder [EMAIL PROTECTED] wrote: It doesn't work under solaris and under linux [1] my nightly compilation jobs are killed every tuesday morning (!) for some reason that i cannot reproduce. I suspect the threaded RTS and heavy load. I had no such problems with ghc-6.4.1 before. A

Re: [Haskell-cafe] New Benchmark Under Review: Magic Squares

2006-07-05 Thread Malcolm Wallace
Daniel Fischer [EMAIL PROTECTED] wrote: Cool, though the problem of exploding runtime remains, it's only pushed a little further. Now I get a 5x5 magig square in 1 s, a 6x6 in 5.4 s, but 7x7 segfaulted after about 2 1/2 hours - out of memory, I note that your solution uses Arrays. I have

Re: [Haskell-cafe] Inferred type not most general?

2006-06-10 Thread Malcolm Wallace
Greg Buchholz [EMAIL PROTECTED] writes: tmap :: (b - a, b - a) - Twist b b - Twist a a ...I'm wondering why they couldn't infer the more general... tmap :: (a - b, c - d) - Twist a c - Twist b d Because the latter type involves polymorphic recursion. Standard H-M cannot infer a

Re: [Haskell-cafe] Re: Editors for Haskell

2006-06-07 Thread Malcolm Wallace
Pete Kazmier [EMAIL PROTECTED] wrote: As part of my learning experience, I think I want to see if I can write a haskell pastebin that does proper syntax highlighting. Someone in #haskell suggested that I use just a lexer because using a parser is overkill. However, I can't make this

Re: [Haskell-cafe] Re: Editors for Haskell

2006-06-02 Thread Malcolm Wallace
Brian Hulley [EMAIL PROTECTED] wrote: Thanks for pointing this out. Although there is still a problem with the fact that var, qvar, qcon etc is in the context free syntax instead of the lexical syntax so you could write: 2 `plus ` 4 (Prelude.+

Re: [Haskell] My summer of code project: HsJudy

2006-05-30 Thread Malcolm Wallace
Brian Hulley [EMAIL PROTECTED] wrote: http://judy.sf.net I wonder if the authors of the library could be persuaded to make it available under an Open Source license, because currently it is under the very limiting restrictions imposed by LGPL... You have a very non-standard definition

Re: [Haskell-cafe] Haskell RPC

2006-05-26 Thread Malcolm Wallace
S. Alexander Jacobson [EMAIL PROTECTED] wrote: Given that we have no easy way to serialize thunks, the whole RPC approach just seems wrong for Haskell. Tom Shackell is developing a simple bytecode reflection API to be implemented in the yhc compiler. This will allow the transmission of

Re: [Haskell-cafe] QuickChecking IO

2006-05-25 Thread Malcolm Wallace
Mike Gunter [EMAIL PROTECTED] wrote: I'd like to use QuickCheck on IO code. For instance, I'd like to check a property of type String - IO Bool. Barring that, I suspect it's possible modify QuickCheck to accommodate IO code (or perhaps, general monadic code). Has anyone done this? Yes,

Re: [Haskell] GHC Hackathon

2006-05-23 Thread Malcolm Wallace
I think many would be grateful if a podcast were made of this event such that those who missed it can still watch the presentations. +1. A podcast would be perfect, posting minutes would be next in line. If the Hackathon goes ahead, recording a video podcast of the event should be

Re: [Haskell] GHC Hackathon

2006-05-23 Thread Malcolm Wallace
I think many would be grateful if a podcast were made of this event such that those who missed it can still watch the presentations. +1. A podcast would be perfect, posting minutes would be next in line. If the Hackathon goes ahead, recording a video podcast of the event should be

Re: Regarding Class Aliases

2006-05-23 Thread Malcolm Wallace
Christophe Poucet [EMAIL PROTECTED] wrote: Class Aliases. I have looked at the ticket and right now it's marked as a low priority with low probability of entering the standard. I think class aliases might be a nice idea too. But we don't have any concrete experience with implementations that

Re: [Haskell-cafe] Space leak when returning pairs?

2006-05-19 Thread Malcolm Wallace
Henning Thielemann [EMAIL PROTECTED] wrote: let ~(ts, strm') = idX strm ~(us, strm'') = idX strm' Let-bindings are already lazy, so the ~ here is redundant. Regards, Malcolm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Space leak when returning pairs?

2006-05-19 Thread Malcolm Wallace
Shin-Cheng Mu [EMAIL PROTECTED] wrote: I was wondering where the space leak came from and suspected that it's the leak described in one of Philip Wadler's early paper Fixing Some Space Leaks With a Garbage Collector (1987). But since Wadler has addressed this problem a long time ago, I

Re: [Haskell-cafe] dumb monad syntax question

2006-05-15 Thread Malcolm Wallace
I've been reading Phil Wadler's monad papers from the early '90s, and it's been interesting to see how the monad concept evolved over the course of those years. But I haven't been able to track down the first use of the do notation for monads. Can anyone tell me where that came from? I'd

[Haskell] ANNOUNCE: cpphs-1.2

2006-05-04 Thread Malcolm Wallace
cpphs - 1.2 --- We would like to announce a new release of cpphs, the in-Haskell implementation of the C pre-processor. The major change in this release is that the source files have been re-arranged into a cabal-ised hierarchical library

[Haskell] ANNOUNCE: hmake-3.11

2006-05-03 Thread Malcolm Wallace
hmake - 3.11 This announcement is for a bug-fix release of 'hmake', the compiler-independent project-building tool for Haskell programs. It automates recompilation analysis, based on import declarations in your files, to rebuild only

Re: [Haskell] standard prelude and specifications

2006-04-13 Thread Malcolm Wallace
Laszlo Nemeth [EMAIL PROTECTED] wrote: Chp 8 of the Haskell Report says: In this chapter the entire Haskell Prelude is given. It constitutes a *specification* for the Prelude. My question is how strictly this word specification is to be interpreted? I can think of a strict and a

Re: preemptive vs cooperative: attempt at formalization

2006-04-12 Thread Malcolm Wallace
John Meacham [EMAIL PROTECTED] wrote: In a concurrent implementation, a thread performing an infinite loop with no IO or interaction with the outside world can potentially stall switching to another thread forever, in FP, we usually denote an infinite loop by _|_. so I think the first

Re: preemptive vs cooperative: attempt at formalization

2006-04-12 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] wrote: By infinite loop, you mean both non-terminating, and non-productive. A non-terminating but productive pure computation (e.g. ones = 1:ones) is not necessarily a problem. That's slightly odd terminology. ones = 1:ones is definitely terminating.

FD use cases (was Re: postponing discussion on exceptions and deepSeq)

2006-04-12 Thread Malcolm Wallace
isaac jones [EMAIL PROTECTED] wrote: Ross has asked for use cases for functional dependencies and so far has only two replies. Surely there are those on this list who have use of functional dependencies? Personally, I have never used FDs, but I recall some discussion we had in the Hat

Re: quoting in error messages

2006-04-10 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] wrote: `thing' thing We should be using Unicode left/right single quotes if the locale supports it (U+2018, U+2019). Better still, use a different color for quoted code fragments if the terminal supports it. You could make the highlighting

Re: [Haskell-cafe] casting numerical types

2006-04-02 Thread Malcolm Wallace
Matthias Fischmann [EMAIL PROTECTED] writes: avg :: (FractionalOrIntegral a) = [a] - a avg xs = sum (map fromFractionalOrIntegral xs) / (fromIntegral (length xs)) Your condition is probably too strong. For one thing, there is no need to convert every element of the list being summed,

Re: GHC 6.5 on Mac Os X

2006-03-30 Thread Malcolm Wallace
Chris Brown [EMAIL PROTECTED] writes: ld: Undefined symbols: _TypeRep_AClass_stauic_info I have noticed that there are spelling mistakes in these error messages. _TypeRep_AClass_stauic_info should be _TypeRep_AClass_static_info Earlier there was something with DISCASD instead of

Re: FFI, safe vs unsafe

2006-03-30 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] wrote: I thought yhc supported unboxed values, so a loop like count 0 = 0 count n = count (n - 1) count 10 could block the runtime (assuming it was properly unboxed by the compiler) since it never calls back into it and is just a straight

concurrency (was Re: important news: refocusing discussion)

2006-03-28 Thread Malcolm Wallace
Tomasz Zielonka [EMAIL PROTECTED] wrote: It may be relevant for this discussion: I believe I reimplemented STM, including retry and orElse, on top of old GHC's concurrency primitives. http://www.uncurry.com/repos/FakeSTM/ Perhaps it could serve as a drop-in replacement for STM in

concurrency (was Re: important news: refocusing discussion)

2006-03-28 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] wrote: The portable interface could be Control.Concurrent.MVar, perhaps. I don't really understand the problem, maybe I'm missing something. I thought the idea would be that a thread-safe library would simply use MVar instead of IORef. I was misled by

Re: Concurrency (was: RE: Re[2]: important news: refocusing discussion)

2006-03-28 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] wrote: (a) we're going to standardise concurrency anyway Well, but that only begs the question, what *kind* of concurrency are we going to standardise on? e.g. Will we admit all variations of scheduling (co-operative, time-slice, and pre-emptive)? (b) it is

Re: [Haskell] Haskell as a disruptive technology?

2006-03-27 Thread Malcolm Wallace
Paul Johnson [EMAIL PROTECTED] wrote: Is there a market that is poorly served by the incumbent languages for which Haskell would be an absolute godsend? Yes. Safety critical systems, encompassing everything from avionics to railway signalling equipment, to medical devices. These markets are

Re: [Haskell] Haskell as a disruptive technology?

2006-03-27 Thread Malcolm Wallace
Dusan Kolar [EMAIL PROTECTED] wrote: Yes. Safety critical systems, encompassing everything from avionics to railway signalling equipment, to medical devices. These markets are relatively small / low-volume, with needs for high assurance, and better development times. Well, the

Re: important news: refocusing discussion

2006-03-27 Thread Malcolm Wallace
John Goerzen [EMAIL PROTECTED] wrote: On Fri, Mar 24, 2006 at 11:07:53AM +, Malcolm Wallace wrote: I assume that since a non-concurrent implementation has only one thread, that thread will be trying to MVar-synchronise with something that does not exist, and hence

Re: [Haskell-cafe] Positive integers

2006-03-24 Thread Malcolm Wallace
Daniel McAllansmith [EMAIL PROTECTED] wrote: Unless I've missed it, there is no typeclass for positive integers in GHC. Is there any particular reason it doesn't exist? Also, it seems Word would be a far better type in the likes of (!!), length, etc. Is it just tradition that resulted in

Re: Ranges and the Enum class

2006-03-21 Thread Malcolm Wallace
Wolfgang Jeltsch [EMAIL PROTECTED] writes: Also, toEnum and fromEnum would make more sense mapping from and to Integer. Why do we need toEnum and fromEnum at all? As far as I know, they are merely there to help people implement things like enumFrom. They are often useful for writing

Re: [Haskell-cafe] strange ghc program behaviour

2006-03-21 Thread Malcolm Wallace
[EMAIL PROTECTED] wrote: E.g. An xml file of 12.3k will result in a file of 8k and will stop at 8k An xml file of 15.7k will result in a file of 16k An xml file of 36k will result in a file of 24k From ghc-6.4, the runtime system no longer flushes open files; it truncates them instead. You

Re: Infix expressions

2006-03-15 Thread Malcolm Wallace
[EMAIL PROTECTED] (Donald Bruce Stewart) writes: Yes, this is _exactly_ the kind of thing to add to the Idioms page of the wiki, here: http://www.haskell.org/haskellwiki/Category:Idioms So if anyone knows of an interesting Haskell trick, and wants to write about it, add a page! It is

Re: [Haskell-cafe] Re: request for code review

2006-03-14 Thread Malcolm Wallace
Shannon -jj Behrens [EMAIL PROTECTED] writes: o How important is it that I switch from using the State monad to using arrows? Not at all. o How important is it that I switch from using | or $ to using arrows? Not at all. (It seems that using arrows just to replace | or $ is like

Re: the dreaded offside rule

2006-03-10 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] wrote: Here's another couple that just occurred to me: f x | let y = x = y f x = case x of _ | let y = x - y granted these are unlikely to occur in practice. Are these Haskell'98? I'm afraid I don't understand how a let binding (without in) can occur

Re: [Haskell-cafe] Layout rule (was Re: PrefixMap: code reviewrequest)

2006-03-06 Thread Malcolm Wallace
Brian Hulley wrote: However I think there is an error in the description of this in section 2.7 of the Haskell98 report, which states: If the indentation of the non-brace lexeme immediately following a where, let, do or of is less than or equal to the current indentation level, then

Re: [Haskell-cafe] Layout rule (was Re: PrefixMap: code reviewrequest)

2006-03-06 Thread Malcolm Wallace
Daniel Fischer [EMAIL PROTECTED] wrote: At the beginning of the module, there is _no_ current indentation level - thus the fourth equation of L applies. I think, the third from last equation of L applies, since If the first lexeme of a module is _not_ { or module, then it is preceded by

Re: Keep the present Haskell record system!

2006-03-01 Thread Malcolm Wallace
Ross Paterson [EMAIL PROTECTED] wrote: On Wed, Mar 01, 2006 at 08:26:14AM +, Henrik Nilsson wrote: I'm increasingly convinced that the records should be left alone for Haskell', possibly modulo some minor tweaks to polish the system. Yes, no alternative candidate is available

Re: Export lists in modules

2006-02-28 Thread Malcolm Wallace
Johannes Waldmann [EMAIL PROTECTED] wrote: For reference, in Java, ... there's nice syntactic sugar for looping over collections: CollectionE c; for (E item : c) { ... } I'd say this is an example of moving away from a left-biased representation, or at least freeing the programmer from

Re: Export lists in modules

2006-02-28 Thread Malcolm Wallace
Johannes Waldmann [EMAIL PROTECTED] wrote: In Haskell, this is called 'fmap'. :-) OK, then show me an instance Functor Set so that I can use it :-) instance Function Set where fmap = Data.Set.mapMonotonic Ok, so this introduces a precondition on the function being mapped, so there is

Re: instance Functor Set, was: Re: Export lists in modules

2006-02-28 Thread Malcolm Wallace
But if contexts-on-datatypes worked correctly, data Set a = Ord a = then even the real map from Data.Set: map :: (Ord a, Ord b) = (a - b) - Set a - Set b could be an instance method of Functor. I'd love that. But I don't quite understand: do you think this

Re: [Haskell'-private] pragmas and annotations (RE: the record system)

2006-02-28 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] wrote: How does ENCODING work for a UTF-16 file, for example? We don't know the file is UTF-16 until we read the ENCODING pragma, and we can't read the ENCODING pragma because it's in UTF-16. Use the same type of heuristic as XML uses (for instance). * If

[Haskell] Compilation of big, static tables

2006-02-23 Thread Malcolm Wallace
Stefan Karrmann [EMAIL PROTECTED] wrote: can ghc compile huge tables into efficient code if they are constant at compile time? I have a related but different question. If I have large, statically defined tables of data e.g. table = listArray (0,max) [ [1,2,3,4]

Re: [Haskell] Re: Compilation of big, static tables

2006-02-23 Thread Malcolm Wallace
What I would really like is a syntax to statically construct an array, without having to compute it from a list. I'm not sure that even Template Haskell can help here, since there is no normal form for it to translate to. SM Happy Alex use the hack of encoding static arrays as strings

Re: Export lists in modules

2006-02-23 Thread Malcolm Wallace
Ketil Malde [EMAIL PROTECTED] wrote: I would solve this problem by reducing the Prelude to just a core. List function could go, for example, (mostly) into Data.List. If this means that you must import Data.List almost everywhere, this won't change anything - only add yet another import

Re: Export lists in modules

2006-02-23 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] wrote: However, I would be equally happy to combine type/newtype/data into a single keyword for exports. for the record, I am in favour of tagging export specifiers with 'class' or 'type' (using 'type' for all type constructors, in light of yours and

Re: Re[2]: Export lists in modules

2006-02-23 Thread Malcolm Wallace
Bulat Ziganshin [EMAIL PROTECTED] wrote: MW With my proposal, you would simply replace the MW implicit import Prelude with an explicit import MW Prelude.Standard import Prelude ($) can't solve this problem? One of the problems with the current mechanism for overriding Prelude definitions,

Re: Export lists in modules

2006-02-22 Thread Malcolm Wallace
John Meacham [EMAIL PROTECTED] wrote: Malcolm Wallace wrote: There is also the issue that we might adopt the proposal to allow (and perhaps eventually, to require) type signatures on export lists. All I have to say is please, no to the requiring part that is. I don't seriously propose

Re: Export lists in modules

2006-02-22 Thread Malcolm Wallace
Johannes Waldmann [EMAIL PROTECTED] wrote: Sounds like the perfect example to illustrate the point that information shouldn't be doubled in the first place. Yes, I suppose one could argue that. Can you say why you want the type in the export list? As a compact description of the module

Re: Export lists in modules

2006-02-22 Thread Malcolm Wallace
Simon Peyton-Jones [EMAIL PROTECTED] wrote: | I don't seriously propose for haskell-prime that signatures should | be required on exports. Just permitting them would be a large and | useful step up already. If this is to be a serious proposal, someone had better think what to do about

Re: [Haskell] Re: Question for the haskell implementors: Arrays, unsafePerformIO, runST

2006-02-21 Thread Malcolm Wallace
John Meacham [EMAIL PROTECTED] wrote: I generalized this primitive to drop__ :: a - b - b Also known in the Prelude as const... The difference is that you propose it be primitive, with the intention that a clever compiler should not be able to bypass it by inlining its definition and

Re: [Haskell] Long live Edison

2006-02-21 Thread Malcolm Wallace
Robert Dockins [EMAIL PROTECTED] wrote: On Feb 20, 2006, at 5:19 PM, [EMAIL PROTECTED] wrote: Data.Set, Data.Map, Data.Hash and the various Array interfaces are all inconsistent in subtle ways, so whatever you do, do not take them as the ideal to which Edison should aspire. This is

Re: Pragmas for FFI imports

2006-02-21 Thread Malcolm Wallace
On Fri, Feb 17, 2006 at 01:45:27AM +0200, Einar Karttunen wrote: I would like to propose two pragmas to be included in Haskell' for use with FFI. One for specifying the include file defining the foreign import (INCLUDE in ghc) and an another for defining a library that the foreign import

Re: Export lists in modules

2006-02-21 Thread Malcolm Wallace
Jared Updike [EMAIL PROTECTED] wrote: I am not sure if this has been mentioned before, but something I would really find useful is the ability to tell Haskell to export everything in a function except for some named functions. No one has responded so ... I believe some people (perhaps

Re: [Haskell-cafe] HaXml: ampersand in attribute value

2006-02-20 Thread Malcolm Wallace
Graham Klyne [EMAIL PROTECTED] wrote: Did you come across the HaXml test harness I created based on a subset of W3C conformance tests? http://www.ninebynine.org/Software/HaskellUtils/HaXml-1.12/test/ This covers all the parameter entity problems I fixed some time ago. Indeed, and an

Re: [Haskell-cafe] HaXml: ampersand in attribute value

2006-02-17 Thread Malcolm Wallace
[EMAIL PROTECTED] wrote: HaXml seems to choke on finding an ampersand in an attribute value. Is this normal? Is there any workaround? Yes, it is expected. An ampersand indicates the start of a reference, e.g. lt; or #20; If there is no semicolon to indicate the end of the reference, then

Re: [Haskell-cafe] HaXml: ampersand in attribute value

2006-02-17 Thread Malcolm Wallace
Lennart Augustsson wrote: But speaking of HaXml bugs, I'm pretty sure HaXml doesn't handle % correctly. It seem to treat % specially everywhere, but I think it is only special inside DTDs. I have many XML files produced by other tools that the HaXml parser fails to process because of this.

Re: [Haskell-cafe] Lazy read

2006-02-16 Thread Malcolm Wallace
Neil Mitchell [EMAIL PROTECTED] writes: Check out ReadP or parsec, they are far superior in general. I think there was a suggestion of replacing Read with ReadP? The whole point is not about writing a parser, its about having a parser written for me with deriving Read - unfortunately

Re: Re[2]: Tuple-like constructors

2006-02-08 Thread Malcolm Wallace
Robert Dockins [EMAIL PROTECTED] writes: instance (Bin a,Bin b,Bin c,Bin d) = Bin (a,b,c,d) See the problem? Sooner or later (probably sooner) I'll get tired of typing. I have to write down an 'instance' declaration for each value of n. Clearly this can't generalize to all n. There

Re: The dreaded M-R

2006-01-31 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: Given the new evidence that it's actually rather hard to demonstrate any performance loss in the absence of the M-R with GHC, I'm attracted to the option of removing it in favour of a warning. As another data point, today for the first time I received an

Re: separate class and type namespace

2006-01-31 Thread Malcolm Wallace
Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes: I've always liked the idea of saying 'class C' or 'type T' in import/export lists. Type signatures too should be allowed in export lists. Both ideas already noted at http://haskell.galois.com/trac/haskell-prime/wiki/ModuleSystem

Re: The dreaded M-R

2006-01-30 Thread Malcolm Wallace
[EMAIL PROTECTED] writes: Nhc didn't use to implement the M-R (maybe it does now). When porting code to nhc this caused a few code changes. Perhaps 10 lines out of 1 when I tried the Bluespec compiler. So my gut feeling is that the M-R is a rare beast in practise. I can confirm that

Re: The dreaded M-R

2006-01-26 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: On 26 January 2006 09:59, John Hughes wrote: The solution I favour is simply to use *different syntax* for the two forms of binding, I wonder if there's an alternative solution along these lines: - We use ParialTypeSignatures to make bindings

Re: darcs switchover

2006-01-18 Thread Malcolm Wallace
John Goerzen [EMAIL PROTECTED] writes: Meanwhile, I noted that the HaXml repo on darcs.haskell.org seems to be a verbatim copy of the darcs repo at York. Ahh. You are correct. Re-converting now, since you've presumably committed patches to the darcs side, is probably not going to be

Re: GHC vs. GCC on raw vector addition

2006-01-18 Thread Malcolm Wallace
Sven Moritz Hallberg [EMAIL PROTECTED] writes: I'm running GHC and GCC head-to-head on the task of adding a bunch of long IOUArray-Vectors really fast. My machine is a Linux-ppc PowerBook and gets a runtime for the GHC-compiled binary that's about 10x as long as for GCC. Is it possible that

Re: darcs switchover

2006-01-17 Thread Malcolm Wallace
John Goerzen wrote: * I will re-convert all of the top-level directories in the current libraries darcs repo, except for: doc, mk, and Cabal * Each new repo will be under darcs.haskell.org/packages Inspired by the new browsable interface to the libraries repo at

Re: [Haskell] Re: State Monad

2006-01-13 Thread Malcolm Wallace
Christian Maeder [EMAIL PROTECTED] writes: Bruno Oliveira wrote: Can somebody point me out the exact CVS location of the State Monad implementation that ships with GHC? I am a bit lost in the CVS directory structure ... fptools/libraries/mtl/Control/Monad/State.hs Or rather

Re: [Haskell] Re: haskell.org Public Domain

2006-01-12 Thread Malcolm Wallace
Ashley Yakeley [EMAIL PROTECTED] writes: I, the creator of this work, hereby release it into the public domain. This applies worldwide. In case this is not legally possible: I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are

Re: [Haskell] Re: haskell.org Public Domain

2006-01-12 Thread Malcolm Wallace
Wolfgang Jeltsch [EMAIL PROTECTED] writes: I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law, or explicitly claimed in the work for some clearly identifiable portion of the work. No warranty of

Re: [Haskell] Re: New look for haskell.org: MediaWiki

2006-01-11 Thread Malcolm Wallace
Is there a way to typeset Haskell syntax yet? Not yet, but someone could write an extension to do that... http://meta.wikimedia.org/wiki/Extending_wiki_markup Looks like it would be easy to call out to hscolour: http://www.cs.york.ac.uk/fp/darcs/hscolour provided only that there is some

Re: darcs switchover

2006-01-09 Thread Malcolm Wallace
Sven Panne [EMAIL PROTECTED] writes: I've been looking at the cvs configuration file CVSROOT/modules. I /think/ the procedure is something like changing this: nhc98src-d nhc98 nhc98 nhc98libraries -d nhc98/src/libraries fptools/libraries nhc98 -a

Re: darcs switchover

2005-12-23 Thread Malcolm Wallace
Simon Marlow [EMAIL PROTECTED] writes: But how about having a separate repository for each library package? The time to mention this would have been a few weeks ago when I proposed the current scheme :-) Err, I think I did... I think it /would/ actually be nicer to split up the

Re: darcs switchover

2005-12-21 Thread Malcolm Wallace
[EMAIL PROTECTED] (Donald Bruce Stewart) writes: One thing it occurs to me to ask is what will be happening to CVS commit messages, once the switchover to darcs happens? I originally wrote this script as a temporary fix until darcs supported post-apply hooks. If it does now, perhaps

<    1   2   3   4   5   6   7   8   9   10   >