Re: [Haskell-cafe] More documentation: how to create a Haskell project

2006-10-30 Thread Ketil Malde
[EMAIL PROTECTED] (Donald Bruce Stewart) writes: > But we could do with more information on: [...] How to make cabal projects into distribution-specific (.deb, .rpm, and so on) packages? -k -- If I haven't seen further, it is by standing in the footprints of giants

Re: [Haskell-cafe] mapAccumL - find max in-sequence subsequence

2006-10-30 Thread Ross Paterson
It's a pity that groupBy isn't defined a little differently: -- @'groupBy' rel xs@ returns the shortest list of lists such that -- -- * the concatenation of the lists is @xs@, and -- -- * @rel@ is 'True' for each consecutive pair of elements in a sublist. -- groupBy :: (a -> a -> B

Re: [Haskell-cafe] Deriving class instances using DrIFT

2006-10-30 Thread Einar Karttunen
On 29.10 19:56, John Meacham wrote: > Since DrIFT can only understand haskell source code, it can't derive > instances for anything you don't have the original source to. such as > things in the pre-compiled libraries that come with ghc. you will likely > have to write out those instances by hand.

Re: [Haskell-cafe] More documentation: how to create a Haskell project

2006-10-30 Thread Antti-Juhani Kaijanaho
Ketil Malde wrote: > How to make cabal projects into distribution-specific (.deb, .rpm, and > so on) packages? The answer for .debs is: ask a Debian developer (or a prospective developer) to package it for you. The reason is that to make a good .deb, one needs to be familiar with a lot of Debian

Re: [Haskell-cafe] More documentation: how to create a Haskell project

2006-10-30 Thread Andrea Rossato
On Mon, Oct 30, 2006 at 09:54:08AM +0100, Ketil Malde wrote: > How to make cabal projects into distribution-specific (.deb, .rpm, and > so on) packages? for slackware you can have a look to this slackBuild script: http://gorgias.mine.nu/repos/slackBuild/hxt/hxt/hxt.SlackBuild regards, andrea ___

Re: [Haskell-cafe] More documentation: how to create a Haskell project

2006-10-30 Thread David House
On 30/10/06, Tony Morris <[EMAIL PROTECTED]> wrote: 4) If you want links to base libraries in your haddock output, do "such and such" (how do you do that anyway?) I believe you need a local copy of the library sources, whose path you give to haddock with some flag. -- -David House, [EMAIL PROT

Re[2]: [Haskell-cafe] More documentation: how to create a Haskell project

2006-10-30 Thread Bulat Ziganshin
Hello Tony, Monday, October 30, 2006, 6:22:31 AM, you wrote: > My suggestion: > The steps of reasoning as you start with a blank directory. > For example: great idea! i'm sure that such sort of manual will be very helpful for anyone starting his first haskell project -- Best regards, Bulat

[Haskell-cafe] Simple GADT parser for the eval example

2006-10-30 Thread Greg Buchholz
I'm trying to create a simple parser for the GADT evaluator from the wobbly types paper, and I need a little help. Here's the GADT and the evaluator... > data Term a where > Lit :: Int -> Term Int > Inc :: Term Int -> Term Int > IsZ :: Term Int -> Term Bool > If :: Term B

Re: [Haskell-cafe] monadic performance

2006-10-30 Thread Chad Scherrer
On 10/28/06, Tomasz Zielonka <[EMAIL PROTECTED]> wrote: On Fri, Oct 27, 2006 at 06:28:58AM -0700, Chad Scherrer wrote: > Should I expect a monadic version to take a performance hit? What if I > use some SPECIALIZE pragmas or somesuch? Is it more efficient to write > one from scratch, or do specif

Re: [Haskell-cafe] Deriving class instances using DrIFT

2006-10-30 Thread Daniel McAllansmith
On Monday 30 October 2006 22:18, Einar Karttunen wrote: > On 29.10 19:56, John Meacham wrote: > > Since DrIFT can only understand haskell source code, it can't derive > > instances for anything you don't have the original source to. Ahhh, ok. > > such as > > things in the pre-compiled libraries

[Haskell-cafe] Accumulating related XML nodes using HXT

2006-10-30 Thread Daniel McAllansmith
Hello. I have some html from which I want to extract records. Each record is represented within a number of nodes, and all records nodes are contained by the same parent node. The things I've tried so far end up giving me the cartesian product of record fields, so for the html fragment incl

Re: [Haskell-cafe] Deriving class instances using DrIFT

2006-10-30 Thread John Meacham
On Tue, Oct 31, 2006 at 07:46:05AM +1300, Daniel McAllansmith wrote: > Hmmm, seems strange that it can successfully derive for the Data.Maybe type > but not the Data.Word32 type. I didn't think it would have access to any > original source from my ghc install, there only seems to be hi files. I

Re: [Haskell-cafe] Simple GADT parser for the eval example

2006-10-30 Thread John Meacham
I don't have an answer, but would be extremely interested in knowing one! one of my first attempts to use GADTs was to do something similar, implemening the simple polymorphic lambda calculus in a way that transformations could be guarenteed typesafe statically, but then when I went and tried to w

Re: [Haskell-cafe] Simple GADT parser for the eval example

2006-10-30 Thread Joost Visser
Hi Greg, We've built some GADT parsers recently to fit our two-level transformation library with front-ends for for XML Schema and SQL. See "Coupled Schema Transformation and Data Conversion For XML and SQL" (PADL 2007) if you're interested. The trick is to use a constructor in which the

Re: [Haskell-cafe] Simple GADT parser for the eval example

2006-10-30 Thread Dimitrios Vytiniotis
Just noticed Joost Visser's message but since I had (essentially a very similar) response I thought I might send it off as well ... It includes the conditional cases. Regards, -d {-# OPTIONS_GHC -fglasgow-exts #-} module Main where data Term a where Lit :: Int -> Term Int Inc :: Ter

[Haskell-cafe] YAHT: searchAll5

2006-10-30 Thread Magnus Therning
I can't get searchAll5[1] in Yet Another Haskell Tutorial to run. Ghci complains that it can't find a MonadPlus that satisfies the required type; it needs a MonadPlus. I suspect this is due to the use of 'mzero' and 'mplus', without making StateT a MonadPlus. My thought for this was to "push" mz

Re: [Haskell-cafe] YAHT: searchAll5

2006-10-30 Thread Nicolas Frisby
Disclaimer: I've never read through YAHT, so I don't know if I'm missing any context... Your intuition was correct: you do want to lift the MonadPlus property through the StateT transformer. This is the key to the transformer libraries, each transformer both contributes a computational feature (M