Re: Collecting values from Functors?

2003-06-06 Thread Graham Klyne
At 20:40 04/06/03 +0200, Tomasz Zielonka wrote: Or a variant of Functor constructor class that I have proposed some time ago on comp.lang.functional: class FunctorM t where fmapM :: Monad m = (a - m b) - (t a - m (t b)) fmapM_ :: Monad m = (a - m b) - (t a - m ()) fmapM_ f t =

categories: technical question about omega-categories

2003-06-06 Thread Philippe Gaucher
Dear all, Let C be an omega-category (strict, globular). Let U be the forgetful functor from strict globular omega-categories to globular sets. And let F be its left adjoint. Let us suppose that we are considering an equivalence relation R on UC (the underlying globular set of C) such that the

Re: Gtk2hs - developer snapshot 0.9.3 now available

2003-06-06 Thread Oliver Braun
FYI, I have added a FreeBSD port some minutes ago: http://www.freshports.org/x11-toolkits/hs-gtk2hs Regards, Olli -- Oliver Braun :: [EMAIL PROTECTED] :: Work= [EMAIL PROTECTED] :: FreeBSD = [EMAIL PROTECTED] - http://people.freebsd.org/~obraun/ :: Haskell = [EMAIL

Re: forall quantifier

2003-06-06 Thread Ralf Hinze
Am Freitag, 6. Juni 2003 09:15 schrieb Simon Peyton-Jones: I forget whether I've aired this on the list, but I'm seriously thinking that we should change 'forall' to 'exists' in existential data constructors like this one. One has to explain 'forall' every time. But we'd lose a keyword. Or

Re: ANN: H98 FFI Addendum 1.0, Release Candidate 10

2003-06-06 Thread Ralf Hinze
On Fri, Jun 06, 2003 at 09:32:18AM +0100, Simon Peyton-Jones wrote: Yes! Yes! Advice is good! OK, how about avoid unsafePerformIO like the plague? Why is it the business of the FFI spec to document unsafe uses of unsafePerformIO? I'd like to second Ross here. Advice is good at the right

Re: forall quantifier

2003-06-06 Thread Christian Maeder
I forget whether I've aired this on the list, but I'm seriously thinking that we should change 'forall' to 'exists' in existential data constructors like this one. One has to explain 'forall' every time. But we'd lose a keyword. exists (like forall in ghc only) could be used independently in a

Re: Typesafe MRef with a regular monad

2003-06-06 Thread Ralf Hinze
A more concrete way to formulate a problem that I believe to be equivalent is this. Implement the following interface module TypedFM where data FM k -- Abstract; finite map indexed by keys of type k data Key k a-- Abstract; a key of type k, indexing

RE: Typesafe MRef with a regular monad

2003-06-06 Thread Simon Peyton-Jones
Oh bother, I forgot to add that you can of course insert a new value with an old key (suitably typed) and have it overwrite. Else, as you say, there would not be much point. Maybe it'd be better to have a separate key-construction function newKey :: k - Key k a instead of having

Re: Typesafe MRef with a regular monad

2003-06-06 Thread Ralf Hinze
Am Freitag, 6. Juni 2003 15:23 schrieb Simon Peyton-Jones: Oh bother, I forgot to add that you can of course insert a new value with an old key (suitably typed) and have it overwrite. Else, as you say, there would not be much point. Maybe it'd be better to have a separate key-construction

RE: Typesafe MRef with a regular monad

2003-06-06 Thread Simon Peyton-Jones
Yes, one *could* use dynamic types. But the check would always succeed! That suggests a lack in the static type system. It's not surprising: the soundness depends on the un-forgeability of keys. So it's reasonable that there should be some language extension. I'm just looking for the minimal

Re: forall quantifier

2003-06-06 Thread Jon Fairbairn
On 2003-06-06 at 08:15BST Simon Peyton-Jones wrote: I forget whether I've aired this on the list, but I'm seriously thinking that we should change 'forall' to 'exists' in existential data constructors like this one. You did mention it, and there were several replies. I'd characterise them as

ANNOUNCE: GreenCard 3.01

2003-06-06 Thread Alastair Reid
Green Card 3.01 A Foreign Function Interface Preprocessor for Haskell In preparation for a major release of Green Card, we are making an alpha release for folk to play with. This release fixes a bunch of little details that people commented on in the 3.00

Re: Typesafe MRef with a regular monad

2003-06-06 Thread Ralf Hinze
Am Freitag, 6. Juni 2003 15:47 schrieb Simon Peyton-Jones: Yes, one *could* use dynamic types. But the check would always succeed! Why is that? If I overwrite an entry with a value of a different type, then the check fails. I am certainly missing something ... Cheers, Ralf

ANNOUNCE: HSX11 1.00

2003-06-06 Thread Alastair Reid
HSX11 1.00 A Haskell binding for X11 In preparation for a major release of HSX11, we are making an alpha release for folk to play with. We welcome bug reports, comments on how the system is packaged, the web page, examples, comments from those

RE: Typesafe MRef with a regular monad

2003-06-06 Thread Simon Peyton-Jones
You can't overwrite an entry with a value of a different type, because the keys are typed! Any more than you can overwrite an IORef with a value of a different type. S | -Original Message- | From: Ralf Hinze [mailto:[EMAIL PROTECTED] | Sent: 06 June 2003 15:01 | To: Simon Peyton-Jones;

Re: Typesafe MRef with a regular monad

2003-06-06 Thread Ralf Hinze
Am Freitag, 6. Juni 2003 16:09 schrieb Simon Peyton-Jones: You can't overwrite an entry with a value of a different type, because the keys are typed! Any more than you can overwrite an IORef with a value of a different type. S Why is that? Ok, here is my second implementation. It uses the

ANNOUNCE: HSHGL 3.00

2003-06-06 Thread Alastair Reid
HSHGL 3.00 A Portable Graphics Library In preparation for a major release of HSHGL, we are making an alpha release for folk to play with. This release only works with X11 and GHC (it almost certainly still runs on Hugs too but we haven't tested

RE: Typesafe MRef with a regular monad

2003-06-06 Thread George Russell
In fact I think these Typesafe MRef's are exactly equivalent to dynamic types. In other words, if you've got one, you've got the other. Ralf Hinze has just shown that if you have dynamic types you can implement Typesafe MRef. The reverse implementation would be something like data Dynamic = FM

Early phase of Semantic Web inferencing skeleton in Haskell

2003-06-06 Thread Graham Klyne
This announces availability of an early phase of my Semantic Web inferencing skeleton in Haskell (Swish), which has been posted on my web site at: http://www.ninebynine.org/Software/Intro.html#Swish (links) http://www.ninebynine.org/Software/Swish-0.1.zip (software source+doc)

Call for Papers on Compositional Verification of UML Models

2003-06-06 Thread frb
Call for Papers Compositional Verification of UML Models Workshop of the UML 2003 Conference The definition of UML has been motivated by the need for a standard notation for modelling system architectures and behaviours at

Re: ANNOUNCE: HSHGL 3.00

2003-06-06 Thread Jens Petersen
20030606()2340 Alastair Reid : HSHGL 3.00 A Portable Graphics Library Thanks for releasing this too. :-) The library can be downloaded from: http://www.haskell.org/graphics/. The link to the source on http://haskell.org/graphics/downloading.html

ghc-6.0 compiler bug

2003-06-06 Thread Ch. A. Herrmann
Hi, playing around with partial evaluation, I encountered the following bug: 65 ghc --make -fglasgow-exts -package haskell-src Main.hs -o Main -ddump-splices Chasing modules from: Main.hs Compiling Power( Power.hs, ./Power.o ) Compiling Main ( Main.hs, ./Main.o )

Re: thread blocked indefinitely

2003-06-06 Thread Carl R. Witty
Simon Marlow [EMAIL PROTECTED] writes: I'm now `GHC.Conc.forkProcess`ing only from the initial thread, and all seems well. Thanks for the suggestion! Any idea when `forkProcess` might get fixed? Don't hurry on my account; I'm just curious. There's a comment in the code from

bug with (##) operator and -fglasgow-exts, GHC 5.04, 6.0

2003-06-06 Thread Bernard James POPE
Hi all, I seem to remember reading about this before, but I can't find it, so I'm sorry if I'm repeating a known bug report. It seems that -fglasgow-exts has trouble with (##) as an operator: module Main where f ## x = f x main = print $ (##) id True It doesn't like the prefix use of

Re: bug with (##) operator and -fglasgow-exts, GHC 5.04, 6.0

2003-06-06 Thread Tomasz Zielonka
On Fri, Jun 06, 2003 at 08:00:00PM +1000, Bernard James POPE wrote: Hi all, I seem to remember reading about this before, but I can't find it, so I'm sorry if I'm repeating a known bug report. It seems that -fglasgow-exts has trouble with (##) as an operator: module Main where f

RE: ghc-6.0 compiler bug

2003-06-06 Thread Simon Peyton-Jones
Yes, this is a known bug, but thank you for reporting it anyway. I'm going to fix it as part of my next sweep though. I enclose a message that gives a workaround. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On | Behalf Of Ch. A. Herrmann | Sent: 05

RE: ghc-6.0 compiler bug

2003-06-06 Thread Ch. A. Herrmann
Hi Simon Simon Yes, this is a known bug, Sorry that I'm not perfectly aware of everything going on with Template Haskell. Simon but thank you for reporting it Simon anyway. I'm going to fix it as part of my next sweep though. Thank you very much. I'm happy to know that it is

Re: locating package.conf

2003-06-06 Thread Sven Panne
Simon Marlow wrote: [...] but 'make install' on Windows is very rare anyway (most people just install from the .msi or run it from the build tree). But a 'make install' is not so rare if you took the trouble of installing half a dozen utilities to do a successful 'make'. :-) I'd only be

Demande de confirmation d'inscription à mysql-france

2003-06-06 Thread Yahoo!Groupes
Bonjour, Nous avons reçu votre demande d'inscription au groupe mysql-france sur Yahoo! Groupes, le nouveau service de communautés de Yahoo!. Pour vous inscrire, vous devez confirmer votre demande en répondant à ce message. Si vous n'avez pas demandé ou ne souhaitez pas vous inscrire au groupe

happy, ghc and {# OPTIONS #} pragma

2003-06-06 Thread Martin Norbäck
I am trying to get an {-# OPTIONS #-} pragma to appear in my Happy generated file, since I use warnings and want to disable them for this file. I'm putting the pragma first in the module header section of my Happy file. My problem is that the generated file starts like this (the first pragma is

Re: update of ghc-6.0 rpms for Red Hat Linux 9

2003-06-06 Thread Jens Petersen
20030605()2012 Jens Petersen : It seems there is demand for profiling, so I'll turn it back on again next time I update the rpm package. I just uploaded ghc-6.0-3 built with the prof libs to http://haskell.org/~petersen/rpms/ghc/ Jens ___

running 6.0 for Linux on Red Hat 9

2003-06-06 Thread John Mann
Hello all. I would like to know whether I can use the following binary of the ghc compiler for Linux, listed on the Glasgow Haskell home page, on my Red Hat 9 Linux Pentium box which has glibc version 2.3.2; "Binary tar for Linux/x86 with glibc 2.2 (a complete build, including interactive

Naive question on lists of duplicates

2003-06-06 Thread Stecher, Jack
Hi, all. I have an exceedingly simple problem to address, and am wondering if there are relatively straightforward ways to improve the efficiency of my solution. The task is simply to look at a lengthy list of stock keeping units (SKUs -- what retailers call individual items), stores, dates

Re: Naive question on lists of duplicates

2003-06-06 Thread Sarah Thompson
I'm pretty confident that this will be more efficient than my colleague's SAS code, as he was comparing each record to every other record (giving n (n-1) comparisons). It seems like this, in the worst case where everything is on promotion at distinct times, will compare the first record to (n-1)

Re: powerset

2003-06-06 Thread Graham Klyne
At 19:50 04/06/03 -0400, Derek Elkins wrote: foldl (++) [] [ combinations n as | n - intRange 1 (length as) ] *cries out in pain and horror* fold_l_ (++) over combinatorially large lists! (++) has gotten a reputation for being slow. (++) isn't slow in and of itself, even using it a

RE: Network.CGI

2003-06-06 Thread Simon Peyton-Jones
If anyone cares to write some (Haddockised), we'd be happy to paste it into the source code. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On | Behalf Of Thomas L. Bevan | Sent: 04 June 2003 08:29 | To: [EMAIL PROTECTED] | Subject: Network.CGI | | Can

RE: powerset

2003-06-06 Thread Graham Klyne
At 20:25 05/06/03 -0700, Mark P Jones wrote: Or, if duplicated computation offends you, replace (++) in the original version of powerset with an interleave operator: powerset :: [a] - [[a]] powerset [] = [[]] powerset (x:xs) = xss /\/ map (x:) xss where xss =

Re: Collecting values from Functors?

2003-06-06 Thread Graham Klyne
[Moved to haskell-cafe] At 20:40 04/06/03 +0200, Tomasz Zielonka wrote: I'm trying to figure if there's any way I can use (say) monads to collect values from a Functor. For example, suppose I have a tree of some values that supports fmap, is there any way I can use the fmap

Re: Collecting values from Functors?

2003-06-06 Thread Ralf Hinze
class FunctorM t where fmapM :: Monad m = (a - m b) - (t a - m (t b)) fmapM_ :: Monad m = (a - m b) - (t a - m ()) fmapM_ f t = fmapM f t return () The `fmapM' function is also known as a monadic map. It can be defined in a generic way for every Haskell data type. It's in the

Re: Collecting values from Functors?

2003-06-06 Thread Graham Klyne
At 20:52 06/06/03 +0200, Ralf Hinze wrote: class FunctorM t where fmapM :: Monad m = (a - m b) - (t a - m (t b)) fmapM_ :: Monad m = (a - m b) - (t a - m ()) fmapM_ f t = fmapM f t return () The `fmapM' function is also known as a monadic map. It can be defined in a generic