Re: [Haskell] Current maintainer of the VTY package?

2008-05-29 Thread Stefan O';Rear
Yi editor. I attempted to Stefan O'Rear <[EMAIL PROTECTED]> but > received no reply. The suspicion is that he is no longer the > maintainer of this package. Fate of the message: Filed while trying to think of the best way to put my response, then forgotten. Current maintainer

Re: [Haskell] Should the following program be accepted by ghc?

2008-01-15 Thread Stefan O';Rear
On Wed, Jan 16, 2008 at 01:02:43PM +0800, Martin Sulzmann wrote: > Bruno Oliveira writes: > > I have been playing with ghc6.8.1 and type families and the following > > program is accepted without any type-checking error: > > > > > data a :=: b where > > >Eq :: a :=: a ... > > Ofcourse,

Re: [Haskell] Image manipulation

2007-10-31 Thread Stefan O';Rear
On Wed, Oct 31, 2007 at 10:58:40AM +0100, Ketil Malde wrote: > Bjorn Lisper <[EMAIL PROTECTED]> writes: > > > Wait, Jerzy. Haskell implementations do not have to be lazy as long as they > > preserve the more abstract semantics. Optimistic evaluation has been > > considered, for instance by Robert

Re: [Haskell] Re: Trying to install binary-0.4

2007-10-11 Thread Stefan O';Rear
On Fri, Oct 12, 2007 at 01:27:11AM +0200, Udo Stenzel wrote: > - Rename 'base' ASAP and especially before GHC 6.8 comes out, call it > 'foundation' or something else. If you want to keep the name 'base', > make sure Cabal considers 'base-2.x' a different library than > 'base-3.x'. > - Provid

Re: [Haskell] Haskell Applications - reg

2007-10-03 Thread Stefan O';Rear
On Thu, Oct 04, 2007 at 05:32:31AM +0530, Ganesh Narayan wrote: > [1] Am presently constructing the call graphs from disassembled application > binaries; resultant graph includes ghc runtime library calls. Not necessary a good idea - Haskell's purity gives the compilers great license to reorder an

Re: [Haskell] question about a failure to generalize

2007-09-16 Thread Stefan O';Rear
On Mon, Sep 17, 2007 at 04:15:10PM +1200, Tom Pledger wrote: > Norman Ramsey wrote: > : > | This code fails to compile because the compiler is willing to > | use 'fold' at only one type (CmmExpr as it happens) > : > > When it failed to compile, was > > fold = foldRegsUsed > > a top-level de

Re: [Haskell] Swapping parameters and type classes

2007-09-16 Thread Stefan O';Rear
On Sun, Sep 16, 2007 at 10:45:39PM +0200, Bas van Dijk wrote: > On 9/16/07, Mads Lindstrøm <[EMAIL PROTECTED]> wrote: > > But what if I want to "apply" the 'b' ? How do I do that ? > > The following uses type families (functions) and compiles under GHC HEAD: > > {-# OPTIONS_GHC -XTypeFamilies -XE

Re: [Haskell] functional dependencies not satisfactory?

2007-09-04 Thread Stefan O';Rear
On Tue, Sep 04, 2007 at 11:11:00PM +0200, Wolfgang Jeltsch wrote: > Am Dienstag, 4. September 2007 22:00 schrieben Sie: > > […] > > > It should be emphasized that this program worked the very first time I > > typed it in. > > Which version of GHC are you using? I’m a bit confused since the lates

Re: [Haskell] functional dependencies not satisfactory?

2007-09-04 Thread Stefan O';Rear
On Tue, Sep 04, 2007 at 06:20:26PM +0200, Wolfgang Jeltsch wrote: > Hello, > > I came across the following problem: > > I define a class with a functional dependency like so: > > class C a b | a -> b > > Then I want to define a datatype using the fact that the second argument of C > is dep

Re: [Haskell] Re: ghc.haddock?

2007-08-15 Thread Stefan O';Rear
On Wed, Aug 15, 2007 at 11:45:43PM -0700, Ashley Yakeley wrote: > Isaac Dupree wrote: > >> haddock.ghc and ghc.haddock are different. Haddock.ghc needs a GHC with >> the patches from ghc.haddock. The latest GHC 6.7 has ghc.haddock patches. >> Haddock.ghc is the new haddock, which requires thos

Re: [Haskell] Quantified class constraints (& back-chaining)

2007-08-01 Thread Stefan O';Rear
On Wed, Aug 01, 2007 at 05:29:19PM -0700, Conal Elliott wrote: > Sadly, this solution runs into the problem of instance selection based only > on head-matching, not back-chaining into constraints. For instance, I'd > like also to use the following "conflicting" declaration. > > instance (Appl

Re: [Haskell] Type Lambdas in Gofer

2007-07-31 Thread Stefan O';Rear
On Wed, Aug 01, 2007 at 07:57:48AM +0200, Wolfgang Lux wrote: > Jim Apple wrote: > >> data Rec f = In (f (Rec f)) >> type P f a = f (Rec f, a) >> >> mapP :: Functor f => (a -> b) -> P f a -> P f b >> mapP g = fmap (\(x,a) -> (x, g a)) >> >> instance Functor f => Functor (P f) where >> fmap = ma

Re: [Haskell] math library for Haskell

2007-07-25 Thread Stefan O';Rear
On Wed, Jul 25, 2007 at 06:03:04PM +1000, Lloyd Allison wrote: > > Am I looking in the wrong place > (http://haskell.org/ghc/docs/latest/html/libraries/ ) or > just not seeing it, but I was hoping there would be a > math library for Haskell that would include, e.g., > a Gamma function and the like

Re: [Haskell] View patterns in GHC: Request for feedback

2007-07-23 Thread Stefan O';Rear
On Mon, Jul 23, 2007 at 05:09:01AM -0400, Dan Licata wrote: > Hi everyone, > > Simon PJ and I are implementing view patterns, a way of pattern matching > against abstract datatypes, in GHC. Our design is described here: > > http://hackage.haskell.org/trac/ghc/wiki/ViewPatterns > > If you have a

[Haskell] Re: (Succ Haskell') `and` $ dependent types

2007-07-14 Thread Stefan O';Rear
On Sun, Jul 15, 2007 at 09:04:16AM +1200, Vivian McPhail wrote: > Hello, > > As the authors point out [1], coal-face time needs to be expended before > real world adoption of Dependently-Typed functional programming. But let's > get the ball rolling. They say that haskell programmers are normally

[Haskell] ANN: functorm-1.0.1

2007-07-06 Thread Stefan O';Rear
This is an update to remove a spurious dependency on the unix package (thanks to Andrea Vezzosi for the quick spot). I had used the vty cabal file as a template but forgot to fix the depenencies. Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/functorm-1.0.1 Tarball: http://

[Haskell] ANN: functorm-1.0

2007-07-06 Thread Stefan O';Rear
This is the Data.FunctorM module from 6.6's base, deleted from HEAD still used by some projects (notably jhc); this package can be used for compatibility. Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/functorm-1.0 Tarball: http://hackage.haskell.org/packages/archive/functorm

[Haskell] Re: [Haskell-cafe] lazy patterns versus where-clauses

2007-06-21 Thread Stefan O';Rear
On Thu, Jun 21, 2007 at 06:13:22PM +0200, Peter Padawitz wrote: > Is f(~p(x))=e(x) semantically equivalent to: f(z)=e(x) where p(x)=z? Yes. PS: I saw that twice Stefan ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell] Please help!!!

2007-06-09 Thread Stefan O';Rear
On Sat, Jun 09, 2007 at 12:22:02PM -0700, AVG wrote: > > What's wrong?? > > greatest common divisor > > code: > > > > mdc :: Int-> Int -> Int > mdc _ 1 = 1 > mdc 1 _ = 1 > mdc x y > |x > y = mdc (x-y) y > |y > x = mdc (y-x) x > |x==y = x Since the three lines starting with | are a continuati

Re: [Haskell] Please help!!!

2007-06-09 Thread Stefan O';Rear
On Sat, Jun 09, 2007 at 12:22:02PM -0700, AVG wrote: > > What's wrong?? > > greatest common divisor > > code: > > > > mdc :: Int-> Int -> Int > mdc _ 1 = 1 > mdc 1 _ = 1 > mdc x y > |x > y = mdc (x-y) y > |y > x = mdc (y-x) x > |x==y = x > > mdcl :: [Int]-> [Int] > mdcl []=[] > mdcl l = mdcl

Re: [Haskell] Core language inlined?

2007-05-14 Thread Stefan O';Rear
On Mon, May 14, 2007 at 03:26:34AM -0700, Marcel Manthe wrote: > > Hey, > > GHC seems to have a very powerful core language, which makes implementing > language features less painful. As further applications of Core were > mentioned: let other languages use it and build new features upon it. > >

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Stefan O';Rear
On Tue, May 01, 2007 at 01:59:01PM +0200, Federico Squartini wrote: > I was reading an old post where Hal Daume III was analyzing Haskell > performance for arrays. > He proposed a test program which initializes an array, reverse it a number > of times, and sums the contents. > > So I wrote a c++ r

Re: [Haskell] ANN: IOSpec 0.1

2007-04-24 Thread Stefan O';Rear
On Wed, Apr 25, 2007 at 03:22:33AM +0200, Twan van Laarhoven wrote: > Wouter Swierstra wrote: > >Test.IOSpecVersion 1.0 > Shouldn't that be 0.1? > > > * Test.IOSpec.Teletype: a specification of getChar and putChar. > > You use Dynamic for the data type in IORefs, this has the unf

Re: [Haskell] ANN: IOSpec 0.1

2007-04-24 Thread Stefan O';Rear
On Mon, Apr 23, 2007 at 04:16:56PM +0100, Wouter Swierstra wrote: > > * If you're an ICFP referee, you may want to avoid reading any further* > > > Test.IOSpec Version 1.0 > > > I'm pleased to announce the first release of the Test.IOSpec library, > that provides a

Re: [Haskell] ANN: IOSpec 0.1

2007-04-24 Thread Stefan O';Rear
On Tue, Apr 24, 2007 at 07:36:07PM -0400, Isaac Dupree wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Wouter Swierstra wrote: > > > > * If you're an ICFP referee, you may want to avoid reading any further* > > > > > > Test.IOSpecVersion 1.0 > > > > > > I'm please

Re: [Haskell] Haddock and type operators

2007-04-18 Thread Stefan O';Rear
On Wed, Apr 18, 2007 at 07:29:21PM +0200, Wolfgang Jeltsch wrote: > Hello everybody, > > I urgently need Haddock support for type operators like in the following code > snippet: > > infix 2 :::, := > infixl 9 :.: > > data name ::: value = name := value > newtype Composition f g

Re: [Haskell] ANN: wl-pprint-1.0: Wadler/Leijen pretty printer

2007-04-15 Thread Stefan O';Rear
On Mon, Apr 16, 2007 at 12:10:01AM +0100, Joel Reymont wrote: > On Apr 15, 2007, at 8:19 PM, Stefan O'Rear wrote: > > PPrint is an implementation of the pretty printing combinators > > described by Philip Wadler (1997). In their bare essence, the > > combinators of Wadler

[Haskell] ANN: wl-pprint-1.0: Wadler/Leijen pretty printer

2007-04-15 Thread Stefan O';Rear
Announcing wl-pprint-1.0, the classic Wadler / Leijen pretty printing combinators, now in 100% easier to use Cabalised form! Synopsis: PPrint is an implementation of the pretty printing combinators described by Philip Wadler (1997). In their bare essence, the combinators of Wadler are not expre

Re: [Haskell] Fixpoint combinator without recursion

2007-04-05 Thread Stefan O';Rear
On Thu, Apr 05, 2007 at 06:26:17PM -0300, Felipe Almeida Lessa wrote: > I know that types like > > >data T = T (T -> T) > > are inhabitated by things other than bottom (like id or \_ -> > undefined), but can it be useful for *anything*? Yes. In particular, types like those can produce an explic

Re: [Haskell] -compiler-options vs {#-LANGUAGE Flags-#}

2007-04-05 Thread Stefan O';Rear
On Thu, Apr 05, 2007 at 10:42:09AM -0700, John Meacham wrote: > On Sat, Mar 24, 2007 at 01:18:30PM +0100, Lennart Kolmodin wrote: > > I think the LANGUAGE pragma is much better than OPTIONS_GHC, for several > > reasons. > > > > * It's compiler independent. > > * It's clear that you're only adding

Re: [Haskell] Fixpoint combinator without recursion

2007-04-04 Thread Stefan O';Rear
On Wed, Apr 04, 2007 at 01:36:18PM -0700, Michael Vanier wrote: > For those of us who aren't type theorists: What's a "negative datatype"? Negative isn't the usual term; we mostly call them 'contravariantly recursive' data types, due to CT influence. Anyways the thing to note is that the value ap

Re: [Haskell] Fixpoint combinator without recursion

2007-04-04 Thread Stefan O';Rear
On Wed, Apr 04, 2007 at 07:39:24PM +0100, Edsko de Vries wrote: > Hey, > > It is well-known that negative datatypes can be used to encode > recursion, without actually explicitly using recursion. As a little > exercise, I set out to define the fixpoint combinator using negative > datatypes. I thin

Re: [Haskell] ANNOUNCE: Debian library

2007-04-03 Thread Stefan O';Rear
On Tue, Apr 03, 2007 at 03:04:51PM -0700, Jeremy Shaw wrote: > At Tue, 3 Apr 2007 13:04:36 -0700, > > > Sounds like your duplicating a lot of the functionality of jgoerzen's > > MissingH library. http://software.complete.org/missingh > > yes. but better ;) Ok then. > > Not all of your functiona

Re: [Haskell] ANNOUNCE: Debian library

2007-04-03 Thread Stefan O';Rear
On Tue, Apr 03, 2007 at 01:00:07PM -0700, Jeremy Shaw wrote: > Hello, > > I would like to announce the availability of the a library for > interacting with the Debian system. This library does not (currently) > depend on dpkg or apt for any functionality. Contributions are > welcome. You should pr

Re: [Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-25 Thread Stefan O';Rear
On Mon, Feb 26, 2007 at 03:43:08AM +0100, Andrzej Jaworski wrote: > It sounds reasonable. However knowledge of how program performs in > micro-steps does not add up, so the benchmarks may wet up appetite for lunch > that does not come. I have pointed into such example - an astonishing and > unexpla

Re: [Haskell] Converting to Foreign types

2007-02-17 Thread Stefan O';Rear
On Sat, Feb 17, 2007 at 05:58:49PM -0600, ROBERT DOUGLAS HOELZ wrote: > Hello, > > I want to convert a Haskell Integer (Data.Int.Int32) to a C long > (Foreign.C.Types.CLong), but it seems this code here doesn't work: > > intToLong :: Int32 -> Clong > intToLong num = > let maybelong = cast nu

Re: [Haskell] Finding pointer size

2007-02-15 Thread Stefan O';Rear
On Thu, Feb 15, 2007 at 11:56:58PM -0600, Rob Hoelz wrote: > I'm working with the Foreign module, and I need to allocate a pointer > to a pointer (in C, a char **). The problem is, I don't know how to > find out the size of a char * in Haskell. Here's the basic layout of > the code: > > allocaBy

[Haskell] ANN: Vty 3.0.0

2007-02-13 Thread Stefan O';Rear
Yet another new major of vty has been produced. While I had hoped this compatibility break would never be needed, it seems vty 2's lazy lists and unpacked records were preventing good performance, so the level of abstraction has been increased by creating opaque types Image and Attr. Internally,

Re: [Haskell] Haskell 98 syntax question

2007-01-10 Thread Stefan O';Rear
On Wed, Jan 10, 2007 at 03:33:44PM +0100, "Sascha B?hme" wrote: > Hello, > > referring to the Haskell 98 report as available in the Internet, I have a > short question. Section 4.1.3 (Syntax of Class Assertions and Contexts) > contains the rule: > > class -> qtycls tyvar > | qtycls ( tyv

[Haskell] ANN: vty 2.0

2006-12-30 Thread Stefan O';Rear
A new major version of vty exists: http://members.cox.net/stefanor/vty/dist/vty-2.0.tar.gz darcs get --tag=rel-2.0 http://members.cox.net/stefanor/vty Differences from 1.0: * vty now uses a record type for attributes, instead of bitfields in an Int. This is the reason for increasing the majo

[Haskell] ANN: vty 1.0: simple terminal interface library

2006-12-18 Thread Stefan O';Rear
Announcing vty, a very simple terminal interface library. In <150 non-blank non-comment lines of Haskell (and 7 lines of C) vty provides: * Automatic handling of suspend/resume (SIGTSTP+SIGCONT) * Automatic handling of window resizes * Automatic computation of minimal differences * Minimizes repa

Re: [Haskell] ANNOUNCE: Basic serialization library using only existing SYB infrastructure

2006-12-15 Thread Stefan O';Rear
> > darcs get http://members.cox.net/stefanor/genericserialize > > got the following error: > > darcs failed: Failed to download URL > http://members.cox.net/stefanor/genericserialize/_darcs/patches/ Apparently the FTP upload failed yesterday; I reran it. From now on I'll test the uploads :)

[Haskell] ANNOUNCE: Basic serialization library using only existing SYB infrastructure

2006-12-14 Thread Stefan O';Rear
Announcing GenericSerialize, a library for serialization using the existing generic-programming framework. It is often advocated that support for serialization should be added to the compiler (e.g. in the form of a deriving(Binary)). With this I intend to show that the existing infrastructure is

[Haskell] ANNOUNCE: How to make a type-safe alloca: a new construction of a restricted IO monad

2006-11-27 Thread Stefan O';Rear
Introducing RIO, an experimental library for extensible restricted IO in Haskell. Selling features: * Automatic permissions inference. If you define a function: fun fd r = do { str <- hGetContents fd ; modifyRIORef r (+1) ; return str } RIO can infer the requirements as part of the ty