Re: [Haskell-cafe] Syntax programming with lexemes rather than trees?

2010-03-22 Thread Malcolm Wallace
I'm working in a domain (music typesetting) where modelling syntax with trees can be problematic and I'm wondering whether I should work at a lower level - essentially a list / stream of lexemes and some notion of a context stack for processing, tracking when I'm inside a tuplet and the

[Haskell-cafe] Call for community volunteers

2010-03-18 Thread Malcolm Wallace
As you may know, community.haskell.org (also hosting code.h.o, trac.h.o, etc) exists as a resource to enable Haskellers to publish and collaborate on open source projects. The current admin team for this virtual host finds itself with a lack of time (and occasionally expertise) to maintain

Re: [Haskell-cafe] GPL answers from the SFLC (WAS: Re: ANN: hakyll-0.1)

2010-03-05 Thread Malcolm Wallace
On 5 March 2010 09:53, Magnus Therning mag...@therning.org wrote: Now I'm even more confused. How is hosting on Hackage an issue in [1]? The GPL specifically (and only) applies when code is distributed to others outside the originating authors' organisation. Hackage is a means of

Re: [Haskell-cafe] GPL answers from the SFLC (WAS: Re: ANN: hakyll-0.1)

2010-03-05 Thread Malcolm Wallace
The GPL specifically (and only) applies when code is distributed to others outside the originating authors' organisation. I'm pretty sure it says nothing about organizations. http://www.gnu.org/licenses/gpl-faq.html#InternalDistribution Is making and using multiple copies within one

Re: [Haskell-cafe] Re: Gut Build System

2010-03-05 Thread Malcolm Wallace
I'd also like to point to Nix[3] and Cabal[4] for ideas, and I bet most of the dependency analysis could be ripped from the latter. Hrrm, sadly Cabal has no dependency analysis at all - everything must be specified by the author of the .cabal file, both modules and packages. Regards,

Re: [Haskell-cafe] Re: Real-time garbage collection for Haskell

2010-03-02 Thread Malcolm Wallace
Both concurrent GC and incremental GC tend to add overheads to the mutator, because they need a read barrier. There was an incremental GC for GHC once [1], taking advantage of the built-in read barrier that we have whereby most closures are entered Was there a specific reason why that GC

[Haskell] Haskell prime: the sequel (2011)

2010-02-22 Thread Malcolm Wallace
http://hackage.haskell.org/trac/haskell-prime The new committee for Haskell language standardisation has been appointed, based on public nominations. I am the new chair. http://hackage.haskell.org/trac/haskell-prime/wiki/Committee In case you missed it, the previous committee

Haskell prime: the sequel (2011)

2010-02-22 Thread Malcolm Wallace
http://hackage.haskell.org/trac/haskell-prime The new committee for Haskell language standardisation has been appointed, based on public nominations. I am the new chair. http://hackage.haskell.org/trac/haskell-prime/wiki/Committee In case you missed it, the previous committee

Re: [Haskell-cafe] Parsing of bytestrings with non-String errors?

2010-02-21 Thread Malcolm Wallace
Is there a parser combinator library out there that works on bytestrings and allows using a custom error type? The HuttonMeijerWallace combinators (distributed with polyparse) have the custom error type, but not the bytestrings. Or maybe there's some very basic reason why String is so

Re: [Haskell-cafe] Interpreting profiling results

2010-02-16 Thread Malcolm Wallace
So for me the question remains open, is entries a precisely counted value or a statistically determined one? The entry count is precise. It is only the time (and allocation) counts that are determined statistically. (If the entry count _were_ statistically sampled, it would give exactly

Re: [Haskell-cafe] Re: How many Haskell Engineer I/II/IIIs are there?

2010-02-12 Thread Malcolm Wallace
On 12 Feb 2010, at 12:32, Matthias Görgens wrote: It might be big for SoC but perhaps there's some well-defined subset, like fix some blocking issue? Good idea. By the way, do all SoC projects have to be single-contributor projects, or could someone get together with a friend and work

Re: foreign import PlaySound causing GHCi to crash

2010-02-05 Thread Malcolm Wallace
foreign import ccall PlaySound play :: CString - Int32 - Int32 - IO Bool Is it possible that the foreign function should use the stdcall convention rather than ccall? IIRC, the difference is in who is responsible for cleaning the the stack after the call returns, which might match one of

Re: [Haskell-cafe] Anyone up for Google SoC 2010?

2010-02-05 Thread Malcolm Wallace
If the goal is to have more source code [..] created and released for the use and benefit of all, how does my project fail to achieve this? Also, it is worth pointing out that from Google's point of view, they are most interested in whether the programme yields students who stick around and

Re: Quasi quoting

2010-02-01 Thread Malcolm Wallace
(ii) If [pads| is a lexeme, then some list comprehensions become illegal, I am not myself a TH or QQ user, but it has always bothered me slightly that the syntax for them steals some valid list comprehensions. Of the alternative syntaxes you suggest... My gut feel is to go with [|pads|

[Haskell-cafe] Anyone up for Google SoC 2010?

2010-01-31 Thread Malcolm Wallace
Google has announced that the Summer of Code programme will be running again this year. If haskell.org people would like to take part again this year, then we need volunteers: First, * suggestions for suitable projects (in the past this was organised using a reddit) * an

Re: [Haskell-cafe] Re: where is the eros distribution

2010-01-30 Thread Malcolm Wallace
Odd. Looks like most of the packages on d.h.o evaporated. I'll push the repo to a new location. In the move between servers, we took the opportunity to clean up some historical accidents. Many of the repositories formerly on d.h.o could equally live on community.h.o, which offers more

Re: Language extensions - backwards compatibility

2010-01-29 Thread Malcolm Wallace
The flag -P for traditional gnu cpp (or --noline for stand-alone cpphs) should suppress the initial #line noise. Does ghc still fail to recognise a module-start pragma, even if the only characters preceding it are whitespace? I intended to give an example. file foo.h #if

Re: [Haskell-cafe] HList darcs repo missing?

2010-01-26 Thread Malcolm Wallace
Most things that could be moved to community.haskell.org weren't moved across to the new machine: http://www.haskell.org/pipermail/haskell/2010-January/021861.html Thanks, I found what seems to be the latest version here (last update 14th Jan 2010): http://old-darcs.well-typed.com/HList/

Re: [Haskell-cafe] Failing to install hxt: tagsoup versioning

2010-01-25 Thread Malcolm Wallace
Minor version bumps which leave the API unchanged shouldn't break anything, http://www.haskell.org/haskellwiki/Package_versioning_policy Neil, in this case i think, tagsoup's version shouldn't have changed from 0.6 to minor 0.8 while exported definitions such as optLookupEntity were

Re: [Haskell-cafe] hsql won't install due to system.time

2010-01-21 Thread Malcolm Wallace
On 21 Jan 2010, at 06:10, Brian Denheyer wrote: Database/HaskellDB/HSQL.hs:25:7: Could not find module `System.Time': it is a member of the hidden package `old-time-1.0.0.3' it is a member of the hidden package `old-time-1.0.0.2' Suggestions on how to fix this ... The easiest

Re: [Haskell-cafe] Dependency trickery

2010-01-17 Thread Malcolm Wallace
Suppose I write some code that can work with Gtk2hs or wxHaskell. How do I go about making that into a package? You just need to add a flag 'gtk2hs' and then construct the Build-Depends depending on the value of the flag. However, if e.g. that flag is by default True, then users of wxHaskell

Re: [Haskell-cafe] Hackage strangeness

2010-01-15 Thread Malcolm Wallace
At the time of writing this message the newest package on Hackage is dated Tue Jan 12 16:24:18 UTC 2010. The newest on my mirror is Thu Jan 14 20:07:04 UTC 2010. I believe the Hackage data is being migrated to a new physical server machine (from monk to abbot). This may involve some period

Re: [Haskell-cafe] FFI, C/C++ and undefined references

2010-01-14 Thread Malcolm Wallace
I still get the undefined reference errors. It is likely there is some combination of other mistakes as well then. Other responses have made suggestions of fixes you require in the C++ code for instance. You will need those as well. I did eventually get ghc to compile Main.hs by

[Haskell] ANN: HaXml-1.20.1

2010-01-13 Thread Malcolm Wallace
I am pleased to announce a new, stable, release of HaXml. (Actually, 1.20 has been available for some time, but I am just getting round to the announcement, and a fresh bugfix means a version bump to 1.20.1.) HaXml-1.20.1

Re: [Haskell-cafe] FFI, C/C++ and undefined references

2010-01-13 Thread Malcolm Wallace
But when I try to compile it (after having successfully compiled the C code with g++), I get: $ ghc --make Main.hs You are not telling ghc to link against the C/C++ code, e.g. ghc --make Main.hs srilm.o Regards, Malcolm ___ Haskell-Cafe

Re: [Haskell-cafe] Parsers (Parsec and Iteratee-based Parsers)

2010-01-12 Thread Malcolm Wallace
As I said I've been using Parsec quite a lot, but wonder if there is a different approach possible/feasible to parsing. Parsec (2x) isn't an online parser, ie, it doesn't produce a result before the whole parse is completed. There is AFAIK one alternative, the uulib, In addition, the

Re: Poll: Error message spans

2010-01-07 Thread Malcolm Wallace
Would you find the extra information useful, or just noise? i.e. should we show error spans by default? I certainly wouldn't find it distracting, and I think it could be quite useful in many cases. I vote for turning it on by default. I agree. +1. It is a feature I have always found useful

Re: Where did the GHC API go?

2009-12-28 Thread Malcolm Wallace
Too late. We had a stable link, I used it, Google used it, blog posts were written that linked to it, I've emailed my wife links to it, I've put them in Word documents, I've posted them on internal intranets. You can't create a link, put content behind it, then move the content - it just breaks

Re: Qualified names in import lists

2009-12-28 Thread Malcolm Wallace
module Main where import Foo (Bar.bar) GHC apparently accepts this code, but I can find no mention of such a feature in the GHC docs. It certainly is an extension beyond Haskell'98 and Haskell 2010, which do not permit qualified names in import lists. I cannot think for any use for such

Re: Nominations for the Haskell 2011 committee

2009-12-20 Thread Malcolm Wallace
To nominate someone (which may be yourself), send a message to haskell-prime@haskell.org . Please give reasons for your nomination. I would like to nominate Neil Mitchell for the Haskell Prime committee. He falls into the categories of commercial user, and open-source tool writer. He has been

Re: ANNOUNCE: GHC version 6.12.1

2009-12-14 Thread Malcolm Wallace
I've the 6.10.4 version installed on my MacOS X 10.6 OS. Have I to uninstall this version of GHC before installing the Mac .pkg for the 6.12.1? Most installer packages (_except_ for MacOS) allow you to have multiple previous versions of ghc - they are simply left in place (but must now

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-11 Thread Malcolm Wallace
there is enough experimentally determined about reading in general to be certain that visible gaps between words materially improves readability, and internal capital letters harm it. Here is a (slightly mischievous) proposal. Allow the Unicode non-breaking space character (nbsp; in HTML) as a

Re: [Haskell-cafe] Are there standard idioms for lazy, pure error handling?

2009-12-03 Thread Malcolm Wallace
data TerminatedList a e = Then a (TerminatedList a e) | Finally e Nice. (So you could do e.g: 4 `Then` 5 `Then` 1 `Finally` success!. Errm, you mean: 4 `Then` 5 `Then` 1 `Then` Finally success! Regards, Malcolm

Re: [Haskell-cafe] Finding HP

2009-12-03 Thread Malcolm Wallace
It would perhaps be better to have one nice big Download button that takes you to a separate download page. Having a single download link that only points to the Haskell Platform would be a bit of a policy shift. ... but that was *not* what was suggested. The suggestion was to have a

Re: [GHC] #3709: Data.Either.partitionEithers is not lazy enough

2009-12-02 Thread Malcolm Wallace
#3709: Data.Either.partitionEithers is not lazy enough This is a behavioural change, e.g.: Main case partitionEithers1 [Left 'a', error Not me] of (x : _, _) - x Program error: Not me Main case partitionEithers2 [Left 'a', error Not me] of (x : _, _) - x 'a' Yes, and isn't that the point

Re: [Haskell-cafe] License question

2009-11-30 Thread Malcolm Wallace
www.haskell.org is under the simple permissive license. Does this license also cover the souce code available from that site? the license cover only Wiki contents. std haskell libraries covered by BSD3 license, for example as a part of bsd3-covered GHC distribution And in fact the

Re: Re[2]: [Haskell-cafe] License question

2009-11-30 Thread Malcolm Wallace
i don't think that reproducing in its entirety is more permissive for his purpose :) I think translating to F# counts as modification, so the other clause of the license applies; namely you can do anything you like with it, provided you do not claim it defines Haskell'98. Regards,

Re: [Haskell-cafe] Are there standard idioms for lazy, pure error handling?

2009-11-29 Thread Malcolm Wallace
I'm working on a library which needs to operate on large data sets, so I'd like to use lazy values. ... import qualified Data.Text as T parse :: TL.Text - [Either ParseError Event] I would say that this is the

-package-name flag in 6.10.x

2009-11-24 Thread Malcolm Wallace
The ghc documentation at http://www.haskell.org/ghc/docs/latest/html/users_guide/packages.html says the following: -package-name foo Tells GHC the the module being compiled forms part of package foo. If this flag is omitted (a very common case) then the default package main is

Re: [Haskell] Announcing Haskell 2010

2009-11-24 Thread Malcolm Wallace
On 24 Nov 2009, at 10:50, Simon Marlow wrote: I'm very proud to announce a new revision of the Haskell language, Haskell 2010. Hurrah! * Compilers can start implementing the changes, and flags to select the Haskell 2010 revision. In GHC we expect to have support in the next major

Re: [Haskell-cafe] What's wrong with code.haskell.org ?

2009-11-22 Thread Malcolm Wallace
code.h.o and community.h.o have rather flaky hosting, and have been going down often recently. Yes, we know that code/community.h.o can be somewhat flaky. However, it does claim to have been up continuously for the last 79 days. I suspect it is that (a) the service daemons occasionally

Re: [Haskell-cafe] omitting params in function bindings

2009-11-17 Thread Malcolm Wallace
Doug McIlroy wrote: Is there a deep reason (beyond saving a sentence or two in the language definition) for requiring all patterns in a function binding to have the same explicit arity? Perhaps it is more likely that a clause omitting an argument is a mistake by the programmer, than that it

Re: [Haskell-cafe] Re: ANNOUNCE: deepseq-1.0.0.0

2009-11-17 Thread Malcolm Wallace
The documentation claim that The default implementation of 'deepseq' is simply 'seq' is not exactly right, as `deepseq` and `seq` have different signatures. Yes indeed. In order to use deepseq, it looks like I also need some way to force the () return value, e.g. let res = deepseq

Re: [Haskell-cafe] Pattern Matching

2009-11-13 Thread Malcolm Wallace
(And, entertainingly, because the incorrect version is perfectly valid source code, no compiler errors or warnings...) If you actually turn on compiler warnings (-Wall), I think you will see something like andrew.hs:10:10: Warning: This binding for `eVENT_QUIT' shadows the existing

Re: [Haskell-cafe] Parsing Haskell

2009-11-07 Thread Malcolm Wallace
The UHC compiler contains a combinator based Haskell parser from which you can borrow fragments, ... and the nhc98/yhc compiler likewise has a combinator parser for full Haskell'98 (the combinators are in applicative style). Regards, Malcolm

Re: [Haskell-cafe] Re: frag game - compilation fixes

2009-10-29 Thread Malcolm Wallace
So here's the resulting package tree. If anyone knows how to turn it into a darcs working copy and create a patch from it, please do! It's easy (and I recommend you do it yourself). * darcs get http://...blah/blah/foo * cp -R /my/hacked/copy/of/foo/* foo * cd foo * darcs record *

Re: Re[2]: [Haskell-cafe] better way to do this?

2009-10-07 Thread Malcolm Wallace
afair, nhc was started there. it was a small compiler exactly because Amiga was a rather small computer (comapred to RISC stations) nhc12 (for Haskell 1.2) was first developed on an Acorn Archimedes with 2Mb of RAM, under RiscOS. Regards, Malcolm

Re: [Haskell-cafe] Instances for Data.Text

2009-09-29 Thread Malcolm Wallace
instance Serial Text where -- DOUBT: is this efficient? series d = [T.pack (series d :: String)] -- DOUBT: how to define this coseries rs = error coseries What's Serial? The class used in SmallCheck, similar to the Arbitrary class used by QuickCheck. Regards, Malcolm

[Haskell] Videos of HIW 2009

2009-09-14 Thread Malcolm Wallace
Videos of all the presentations/discussions at the recent Haskell Implementers Workshop 2009, in Edinburgh, are now online. http://www.vimeo.com/album/126462 The programme of talks (which does not mention some of the on-the-day 5minute slots) is here:

Re: [Haskell-cafe] Community.haskell.org is down

2009-09-14 Thread Malcolm Wallace
I assume this is the same as code.haskell.org, which is also down? Yes, code.h.o and community.h.o run on the same virtual machine. a WHOIS gives the Yale University Comp. Sci. Dept. Haskell Group as the registrant, maybe someone over there needs to take a look? Yale looks after the DNS

Re: [Haskell-cafe] Text.Html introduction

2009-08-19 Thread Malcolm Wallace
Based on the original Text.Html library by Andy Gill. See http://www.cse.ogi.edu/~andy/html/intro.htm for an introduction to that library. Try the Internet Archive: http://web.archive.org/web/*/http://www.cse.ogi.edu/~andy/html/intro.htm Regards, Malcolm

Re: Standarize GHC.Prim.Any

2009-08-18 Thread Malcolm Wallace
Also, can/do all compilers that implement unsafeCoerce implement a safe Any? Hugs can do it with just data Any = Ignored I believe, not sure about nhc, yhc or jhc... nhc98 and yhc do not implement the Any type. unsafeCoerce is easily implemented without it. Regards, Malcolm

Re: What is the mutator?

2009-08-07 Thread Malcolm Wallace
Say you are implementing a network server, for example -- you don't want to have big spikes in the request latency due to GC. We think concurrent GC is unlikely to be practical in the Haskell setting, due to the extra synchronisation needed in the mutator. -- Simon Marlow It

Re: bug in language definition (strictness)

2009-08-07 Thread Malcolm Wallace
Yet I think it would be valid to say that seq can turn a non-terminating (exceptioning) program into a terminating one. Do you have an example of that? Sure. foldl (+) 0 [1..1000] :: Integer *** Exception: stack overflow foldl' (+) 0 [1..1000] :: Integer

Re: bug in language definition (strictness)

2009-08-07 Thread Malcolm Wallace
If, as I understand it, you are relying on the fact that seq's first argument is evaluted before its second, then you really want pseq rather than seq. In GHC we provide a way to do what you want (pseq), I'm just not convinced it should be the required behaviour of seq. Whilst looking

Re: NoMonomorphismRestriction

2009-08-07 Thread Malcolm Wallace
On 6 Aug 2009, at 12:18, Simon Peyton-Jones wrote: The paper makes the (somewhat radical) case for not generalising local bindings at all; which would at a stroke remove most of the issues of the MR. (We'd still need to think about the top level.) Only the other day I was writing some

Re: [Haskell-cafe] Linking failing due to Control.Monad.State.Strict?

2009-08-07 Thread Malcolm Wallace
If I look with '-v' tho it seems to include Haskell libs in the underlying link - see below? Plus it only complains about this library, I use many other standard libs too? Looks like something stranger is going on? Looks like you need to add -package mtl to the ghc commandline. If you

Re: What is the mutator?

2009-08-06 Thread Malcolm Wallace
i'm not an expert, but: once value of thunk is evaluated, it's written back by code called mutator Whilst that is indeed mutation, it is not what is usually referred to as the mutator in the context of garbage collection. Quite simply, the mutator is the actual running program, as

[Haskell] bug in language definition (strictness)

2009-08-06 Thread Malcolm Wallace
It has been brought to my attention (as errata editor of the revised H'98 report) that there is a bug in the language definition, concerning strictness annotations on datatypes. In section 4.2.1, the translation of strict components of a data constructor is defined as (\ x1 ... xn - ( ((K

Re: bug in language definition (strictness)

2009-08-06 Thread Malcolm Wallace
What semantics would you like Haskell to have, in which (x `seq` y `seq` e) and (y `seq` x `seq` e) are not equal? I can easily imagine that (x `seq` y `seq` e) might have *two* semantic denotations: bottom (Exception: stack overflow), and e. And I would like to be able to choose which

Re: [Haskell-cafe] Haskell interface files: Why used? What about same data in object files?

2009-08-05 Thread Malcolm Wallace
for some changes of .hs file (where just the implementation changes) the .o file can be regenerated without touching the .hi file. This allows more accurate build dependencies and less recompilation. Is that really the case? I thought that GHC may add code to the interface files for

Re: Data.List permutations

2009-08-04 Thread Malcolm Wallace
Your function is not equivalent: perm _|_ = _|_ permutations _|_ = _|_ : _|_ I have a vague memory that the library version diagonalises properly, so that if you give it a lazy infinite input, it still generates sensible output lazily. If so, this important property should be noted in

Re: [Haskell-cafe] Haskell interface files: Why used? What about same data in object files?

2009-08-04 Thread Malcolm Wallace
I am trying to understand the design of the Haskell interface files. Why are they a separate file rather than having the same data in the object file generated by the compiler? (Naively, it seems to me this would work also. Am I missing something?) Placing interface information into

Re: [Haskell-cafe] Efficient functional idiom for histogram

2009-08-01 Thread Malcolm Wallace
I'm expecting the answer to be that I've got unnecessary laziness - which is fine, but ultimately my interest is in ease of expression and performance combined, so I'm looking for beginner-level improvements rather than subtle advanced techniques like unboxing. You're right, it is too lazy.

Re: [Haskell-cafe] Efficient functional idiom for histogram

2009-07-31 Thread Malcolm Wallace
In an imperative language like Python, I'd use a dictionary as an accumulator - something like for el in input: accums[i] = accums.get(i, 0) + 1 Haskell has efficient dictionary structures too, e.g. Data.Map List.foldl' (\m x- Map.insertWith' (+) x 1 m) Map.empty Regards,

Re: [Haskell-cafe] Adding a field to a data record

2009-07-28 Thread Malcolm Wallace
and perhaps use emacs to query-replace all the Foo1's back to Foo's At least this bit can be avoided easily enough, by using module qualification during the conversion process. module Original (Foo(..)) where data Foo = Foo { ... y :: Int } deriving ... module New (Foo(..)) where

Re: [Haskell-cafe] Re: Adding a field to a data record

2009-07-28 Thread Malcolm Wallace
the part I would really like to avoid is writing the New.Foo { a=a, b=b, ... z=1 } part, where the field names are many, long, and varied. OK, here is another hack-ish trick, since I notice your data is stored on disk as text, using show. I assume you are using something like Read to

Re: Proposal: change to qualified operator syntax

2009-07-14 Thread Malcolm Wallace
left section right section prefix unqualified (+ 1) (1 +) (+) Haskell 98 (M.+ 1) (1 M.+) (M.+) proposed (`M.(+)` 1) (1 `M.(+)`) M.(+) or(*) (M.(+) 1) (flip M.(+) 1) The last line is not correct. (M.(+) 1) captures the first

Re: Haskell 2010: libraries

2009-07-14 Thread Malcolm Wallace
A natural language consists of a vocabulary of words, as well as a grammar for stringing them together. If we omit the common basic libraries from the language definition, then are we implicitly reducing the common vocabulary, and encouraging dialects to appear? If I see the function

Re: [Haskell-cafe] Program with profiling runs faster than without

2009-07-14 Thread Malcolm Wallace
On 14 Jul 2009, at 11:09, Grigory Sarnitskiy wrote: I think it is quite strange to the profiled version to run faster I'm really interested how to obtain the same speed withput profiling compilation. This is only a guess, but maybe there is a context-qualified CAF-like value that is

Re: [Haskell-cafe] Questions about haskell CPP macros

2009-07-13 Thread Malcolm Wallace
{-# LANGUAGE CPP #-} main = putStrLn (__FILE__ ++ : ++ show __LINE__) This outputs: test.hs:2 if I had a module Foo.Bar.Car.MyModule, I would like to be able to output something like this on error: Foo.Bar.Car.MyModule:2 It works for me. If you place that text in Try/Me.hs and call

Re: [Haskell-cafe] Re: Adding an ignore function to Control.Monad

2009-07-11 Thread Malcolm Wallace
Johan Tibell wrote: [...] I also think void is clearer than ignore. So do I. Another point is, that it's familiar from other languages; a function void f(...) doesn't return anything but may have an effect on the environment. +1. Regards, Malcolm

Re: what about moving the record system to an addendum?

2009-07-07 Thread Malcolm Wallace
On 7 Jul 2009, at 02:28, John Meacham wrote: Haskell currently doesn't _have_ a record syntax (I think it was always a misnomer to call it that) it has 'labeled fields'. ... and a reworking of the standard to not refer to the current system as a 'record syntax' but rather a 'labeled

Re: Announcing the new Haskell Prime process, and Haskell 2010

2009-07-07 Thread Malcolm Wallace
i can't understand. does this list supposed to be full list of changes in haskell'? this is a provisional list of features that the Haskell' committee thinks would be feasible to include in a 2010 revision of the Haskell standard. And just to add, the new standardisation process means that

Re: How to save a haskell data structure in C?

2009-07-03 Thread Malcolm Wallace
In C code, I want to save a complex data strcuture defined in haskell and pass it back to a haskell function at certain time. Look up StablePtr in Haskell's FFI spec. Regards, Malcolm ___ Glasgow-haskell-users mailing list

Re: Proposal: Deprecate ExistentialQuantification

2009-06-27 Thread Malcolm Wallace
I would hereby like to propose that the ExistentialQuantification extension is deprecated. It is worth pointing out that all current Haskell implementations (to my knowledge) have ExistentialQuantification, whilst there is only one Haskell implementation that has the proposed replacement

Re: Proposal: Deprecate ExistentialQuantification

2009-06-27 Thread Malcolm Wallace
I would hereby like to propose that the ExistentialQuantification extension is deprecated. It is worth pointing out that all current Haskell implementations (to my knowledge) have ExistentialQuantification, whilst there is only one Haskell implementation that has the proposed replacement

Re: [Haskell-cafe] How to read safely?

2009-06-24 Thread Malcolm Wallace
Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Read often throws runtime errors, which breaks the robust of the problem. How to deal with it? Without lost too much proformance (so reads is a no). At least, if its error could be catched, that'd be better. You might like to try

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Malcolm Wallace
Erik de Castro Lopo mle...@mega-nerd.com wrote: Vasili I. Galchin wrote: where/let functions use the same name for function parameters as the outer function and hence there is a shadow warning from the compiler. In Haskell there is an easy way around this. Variables can be name a,

Re: [Haskell-cafe] coding standard question

2009-06-22 Thread Malcolm Wallace
Johan Tibell johan.tib...@gmail.com wrote: Example: f a b = g (a+b) (b-a) where g a c = a*c f a b = g (a+b) (b-a) where g a' c = a*c Actually there's a warning: interactive:1:34: Warning: Defined but not used: `a'' Clearly I simplified the example too far.

[Haskell] Re: Top Level

2009-06-17 Thread Malcolm Wallace
Wolfgang Jeltsch g9ks1...@acme.softbase.org wrote: The Yampa people and I (the Grapefruit maintainer) already agreed to introduce a top-level FRP namespace instead of putting FRP under Control or whatever. The problem with a top-level namespace like FRP is that it is a cryptic acronym: it

Re: [Haskell-cafe] graphical user interface library for editing graphs?

2009-06-15 Thread Malcolm Wallace
Claude Heiland-Allen claudiusmaxi...@goto10.org wrote: My question: can you suggest a library that would make implementing this specification relatively painless? OpenGL-based would be preferable, as I would like to scale the graph under construction automatically to fit the display, and

Re: [Haskell-cafe] Cabal addressibility problem

2009-06-08 Thread Malcolm Wallace
Vasili I. Galchin vigalc...@gmail.com wrote: Executable GraphPartitionTest Main-Is:Swish.HaskellRDF.GraphPartitionTest.hs Other-modules: Swish.HaskellRDF.GraphPartition Swish.HaskellRDF.GraphClass Swish.HaskellUtils.ListHelpers

Re: [Haskell-cafe] Incremental XML parsing with namespaces?

2009-06-08 Thread Malcolm Wallace
On 8 Jun 2009, at 19:39, John Millikin wrote: + HaXml and hexpat seem to disregard namespaces entirely -- that is, the root element is parsed to doc instead of (org:myproject:mainns, doc), and the second child is x:ref instead of (org:myproject:otherns, ref). Yes, HaXml makes no special effort

Re: [Haskell-cafe] A small puzzle: inTwain as function of foldr

2009-06-05 Thread Malcolm Wallace
Martijn van Steenbergen mart...@van.steenbergen.nl wrote: But this uses length and init and last all of which are recursive functions. I consider that cheating: only foldr may do the recursion. I think the key is to pick your intermediate data-structure wisely. A pair of queues would be my

Re: [Haskell-cafe] GSoC update: sneak peek at the live heap profiler

2009-06-03 Thread Malcolm Wallace
I haven't seen this blog on planet.haskell.org, but it definitely should be! ... Yes, I did that not long after starting the blog. Maybe someone should flush the queue. ;) There are other requests from GSoC students to join planet.haskell.org, also still stuck in the queue. (I have

Re: [Haskell-cafe] Re: Lazy Parsing

2009-05-31 Thread Malcolm Wallace
It is my pleasure to announce that after 5 days of experimenting with uu-parsinglib I have absolutely no clue, whatsoever, on how to use it. I do not even manage to write a parser for even a mere digit or a simple character. I don't know whether you will be willing to change over to

Re: [Haskell-cafe] Lazy Parsing

2009-05-28 Thread Malcolm Wallace
Henning Thielemann schlepp...@henning-thielemann.de wrote: I don't think that it is in general possible to use the same parser for lazy and strict parsing, just because of the handling of parser failure. Polyparse demonstrates that you can mix-and-match lazy parsers with strict parsers in the

[Haskell-cafe] Parsec float

2009-05-28 Thread Malcolm Wallace
is there any reason why float parses only positive numbers? It is usual in parsing libraries to separate the recognition of a leading sign from recognition of the number itself: the sign-only parser can be reused in many contexts, e.g. in the Haskell'98 Numeric library, there is

Re: [Haskell-cafe] Expression parsing problem

2009-05-19 Thread Malcolm Wallace
The grammar: expression = get | [ + | - ] term { ( + | - ) term } term = factor { ( * | / ) factor } factor = IDENTIFIER | VALUE | ( expression ) I can't make term parse, for instance 1 * 2 / 3 Indeed, the grammar does not admit 1*2/3 as a sentence of that language although it

Re: [Haskell-cafe] question on the Prelude .. vis-a-vis

2009-05-13 Thread Malcolm Wallace
Vasili I. Galchin vigalc...@gmail.com wrote: Graham Lyle has written some seriously beautiful code That would be Graham _Klyne_. 1) I strongly suspect that in Swish 0.2.1 that some of Graham's libaries are already superseded by the Haskell prelude , e.g. HUnit, Parsec(!!!), his Sort

Re: [Haskell-cafe] Research in functional programming

2009-05-04 Thread Malcolm Wallace
Louis Wasserman wasserman.lo...@gmail.com wrote: Where might I find or submit a paper on functional data structures? Examples I've found so far include ICFP http://www.icfpconference.org/ and the JFP http://journals.cambridge.org/action/displayJournal?jid=JFP, but Google hasn't found me

Re: [Haskell-cafe] Problems with Haskell Program Coverage

2009-04-23 Thread Malcolm Wallace
Dominic Steinitz dominic.stein...@blueyonder.co.uk wrote: I want to use hpc to check that the ASN.1 library tests cover all the code. When I run it with a set of tests that I *know* don't test certain things, it reports that they have been covered i.e. there are not coloured in the markup

Re: [Haskell-cafe] Re: ANNOUNCE: Utrecht Haskell Compiler (UHC) -- first release

2009-04-20 Thread Malcolm Wallace
Just refuse to use UHC until it conforms. Do you not use Hugs for the same reason? Not to mention that GHC does not comply with the H'98 standard either: http://www.haskell.org/ghc/docs/latest/html/users_guide/bugs-and-infelicities.html#vs-Haskell-defn Regards, Malcolm

Re: [Haskell-cafe] minor typo in The Haskell 98 Report

2009-04-06 Thread Malcolm Wallace
for the bug report. As noted on the page http://haskell.org/haskellwiki/Language_and_library_specification The report still has minor bugs. There are tracked at the Haskell 98 bugs page. Report any new bugs to Malcolm Wallace. (There are links for the bugs page, and for my email address

Re: [Haskell-cafe] Re: Reverting to any old version using Darcs

2009-04-03 Thread Malcolm Wallace
Thus the uploaded sdist was missing one of the source files, and consequently failed to build. I have a pre-release make target where I test everything I can think of. I think it prevents the above, am I right ? Not unless you run 'make check' in a separate pristine copy of the repo.

Re: [Haskell-cafe] Program using 500MB RAM to process 5MB file

2009-04-03 Thread Malcolm Wallace
(2) You are parsing strictly, meaning you have to read the whole input file before anything can be output. This is likely the main performance problem. I'm guessing you are using parsec. Try switching to polyparse if you want to try out lazy parser combinators instead. (module

Re: [Haskell-cafe] Possible floating point bug in GHC?

2009-04-03 Thread Malcolm Wallace
Interesting. This could be the cause of a weird floating point bug that has been showing up in the ghc testsuite recently, specifically affecting MacOS/Intel (but not MacOS/ppc). http://darcs.haskell.org/testsuite/tests/ghc-regress/lib/Numeric/num009.hs That test compares the result of

Re: [Haskell-cafe] Is there a way to see the equation reduction?

2009-04-01 Thread Malcolm Wallace
Daryoush Mehrtash dmehrt...@gmail.com wrote: But I am more interested in seeing the expansion and reduction that the execution encounters as it lazily evaluates the function. Have you tried GHood? http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/GHood/ It is a bit like the

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Malcolm Wallace
On 30 Mar 2009, at 20:16, Andrew Coppin wrote: Lennart, what is the next language DSL you are going to build? Prolog? XSLT? Declarative 3D scene construction? ;-) The ICFP programming contest in year 2000 was to write a ray tracer for a given declarative 3D scene construction language

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