Re: [Haskell-cafe] Writing functions over GADTs

2011-03-16 Thread Benedikt Huber
On 16.03.11 10:26, Dominic Mulligan wrote: Dear all, I'm working on a small proof assistant in Haskell. In the logic that I'm implementing it's very important that I distinguish between `large' and `small' types for consistency reasons. I have worked to get this distinction reflected in my

[Haskell-cafe] Re: String vs ByteString

2010-08-16 Thread Benedikt Huber
On 16.08.10 14:44, Daniel Fischer wrote: Hi Bulat, On Monday 16 August 2010 07:35:44, Bulat Ziganshin wrote: Hello Daniel, Sunday, August 15, 2010, 10:39:24 PM, you wrote: That's great. If that performance difference is a show stopper, one shouldn't go higher-level than C anyway :) *all*

[Haskell-cafe] Re: ANN: weighted-regexp-0.1.0.0

2010-07-29 Thread Benedikt Huber
Sebastian Fischer schrieb: On Jul 29, 2010, at 12:47 AM, Benedikt Huber wrote: Taking a quick look at the PyPy blog post on JIT code generation for regular expressions, I thought it would be fun to implement a generator using the excellent LLVM bindings for haskell. Interesting. Would you

[Haskell-cafe] Re: The 8 Most Important GSoC Projects

2010-04-02 Thread Benedikt Huber
Ivan Lazar Miljenovic schrieb: Stephen Tetley stephen.tet...@gmail.com writes: I had a little experiment along the lines of A Package Versioning Policy Checker a few months ago. I got as far as using Haskell-src-exts to extract module export list, but didn't work out out a hashing scheme for

[Haskell-cafe] Re: fast, strongly typed heterogeneous collections

2010-02-19 Thread Benedikt Huber
Alberto G. Corona schrieb: Hi What is the speed of hProjectByLabel/s in Data.HList.Record? . The documentation in hackage http://hackage.haskell.org/packages/archive/HList/latest/doc/html/Data-HList-Record.html#t%3AH2ProjectByLabelsdoes not mention it. Perhaps this is because Hlist is

[Haskell-cafe] Re: no sparks?

2009-12-20 Thread Benedikt Huber
Felipe Lessa schrieb: On Mon, Dec 21, 2009 at 12:39:06AM +0100, Daniel Fischer wrote: Am Sonntag 20 Dezember 2009 23:25:02 schrieb Jamie Morgenstern: Also, I was wondering if something akin to a parallel or exists. By this, I mean I am looking for a function which, given x : a , y : a, returns

[Haskell-cafe] Re: no sparks?

2009-12-20 Thread Benedikt Huber
Daniel Fischer schrieb: Am Sonntag 20 Dezember 2009 23:25:02 schrieb Jamie Morgenstern: Hello; Also, I was wondering if something akin to a parallel or exists. By this, I mean I am looking for a function which, given x : a , y : a, returns either, whichever computation returns first. This

[Haskell-cafe] Re: Why are these record accesses ambiguous

2009-06-06 Thread Benedikt Huber
Hi John, The record field disambiguation only works if you use the form C{ field-name = variable } where C is a datatype constructor. In your example you have to write let TypeA{ x = v } = getA print v You're right, after type inference it is clear (for us) that x should mean A.x, but

[Haskell-cafe] Re: I have forgotten .. my bad

2009-05-15 Thread Benedikt Huber
Vasili I. Galchin schrieb: Hello, darcs get --init ?? I want to pull down Data.FiniteMap. I have forgotten the path to Hackage .. I tried Hi Vasili, Hackage does not host the darcs repositories. You can get the FinitMap's source code via cabal unpack FiniteMap though.

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

2009-04-19 Thread Benedikt Huber
Thomas Davie schrieb: On 19 Apr 2009, at 00:31, Antoine Latter wrote: ... Apparently a user install of uuagc and fgl isn't good enough. Fun to know. I've found user installs don't work at all on OS X, various people in #haskell were rather surprised to discover this, so apparently it's

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

2009-04-19 Thread Benedikt Huber
a...@cs.uu.nl schrieb: Utrecht Haskell Compiler -- first release, version 1.0.0 The UHC team is happy to announce the first public release of the Utrecht Haskell Compiler (UHC). Great to see another haskell

[Haskell-cafe] Re: Performance question

2009-02-26 Thread Benedikt Huber
hask...@kudling.de schrieb: Hi, i have compared a C++ implementation with a Haskell implementation of the Monte Carlo Pi approximation: http://lennart.kudling.de/haskellPi/ The Haskell version is 100 times slower and i wonder whether i do something obvious wrong. Hi, Nice benchmark, but I

[Haskell-cafe] Re: Class Instances

2009-02-13 Thread Benedikt Huber
Cetin Sert schrieb: Hi, class Processor a where ready :: (forall b c. a → [b → c]) instance Processor (b → c) where ready = repeat ... --- Why can I not declare the above instances and always get: Hi Cetin, in your class declaration you state that a

[Haskell-cafe] Re: Class Instances

2009-02-13 Thread Benedikt Huber
:: Processor p b c = p - [b] - [c] Maybe there are other possibilities as well. -- benedikt Regards, Cetin P.S.: * broadcast is a dummy function, I need this for tidying up the interface of a little experiment: http://corsis.blogspot.com/ 2009/2/13 Benedikt Huber benj...@gmx.net

[Haskell-cafe] Re: Graph library, was: Haskell.org GSoC

2009-02-12 Thread Benedikt Huber
Daniel Kraft schrieb: Don Stewart wrote: - Graphs. True graphs (the data structure) are still a weak point! There's no canonical graph library for Haskell. That sounds interesting... What do you mean by no canonical library? Are there already ones but just no standard one? But in this

[Haskell-cafe] Re: Graph library, was: Haskell.org GSoC

2009-02-12 Thread Benedikt Huber
Daniel Kraft schrieb: Benedikt Huber wrote: I would also like to see a project working on a new graph library. Currently, there is at least Data.Graph (just one Module, package containers), based on Array - adjacency lists, and the functional graph library (package fgl). I don't know those

[Haskell-cafe] Re: type metaphysics

2009-02-02 Thread Benedikt Huber
Ryan Ingram schrieb: 2009/2/2 Luke Palmer lrpal...@gmail.com: However! If we have a function f : Nat - Nat - Bool, we can construct the diagonalization g : Nat - Bool as: g n = not (f n n), with g not in the range of f. That makes Nat - Bool computably uncountable. This is making my head

[Haskell-cafe] Re: C-like Haskell

2009-01-28 Thread Benedikt Huber
Ross Mellgren schrieb: Duncan, I think you must have some magics -- on my machine the original code also takes forever. Running with +RTS -S indicates it's allocating several gig of memory or more. Applying some bang patterns gives me ~8s for 10^8 and somewhat more than a minute for 10^9:

[Haskell-cafe] Re: The problem with Monads...

2009-01-13 Thread Benedikt Huber
Rafael Gustavo da Cunha Pereira Pinto schrieb: Yes, I've read it twice, and it is a nice explanation that yes, the reader monad is an application and is a monad. How do I use it? Why not the function itself? How would the plumbing work in a real world example? Hi Rafael, First of all, I agree

[Haskell-cafe] Re: Parsec : Problems with operator precedence (solution)

2009-01-02 Thread Benedikt Huber
Erik de Castro Lopo schrieb: Erik de Castro Lopo wrote: binaryOp :: String - (SourcePos - a - a - a) - E.Assoc - E.Operator Char st a binaryOp name con assoc = E.Infix (reservedOp name getPosition = return . con) assoc Replacing reservedOp above

[Haskell-cafe] Re: Parsec question

2008-12-23 Thread Benedikt Huber
Erik de Castro Lopo schrieb: Erik de Castro Lopo wrote: qualifiedIdentifier :: CharParser st [ String ] Ahh, figured it out myself: qualifiedIdentifier :: CharParser st [ String ] qualifiedIdentifier = do i - identifier r - dotIdentifier

[Haskell-cafe] Re: Pretty Print, text or ++?

2008-08-15 Thread Benedikt Huber
Paul Keir schrieb: Hi there, I'm writing a pretty printer using the Text.PrettyPrint library, and there's a pattern I'm coming across quite often. Does anyone know whether, text (a ++ b ++ c ++ d) or text a + text b + text c + text d runs quicker? Hi Paul, text (a ++ b ++ c ++ d)

[Haskell-cafe] Fwd: ANN: Initial release of Language.C

2008-08-14 Thread Benedikt Huber
available soon. Thanks for your interest. Begin forwarded message to [EMAIL PROTECTED]: From: Benedikt Huber [EMAIL PROTECTED] Date: 13. August 2008 15:45:50 GMT+02:00 I'm pleased to announce the first release of Language.C, a library for analysing and generating C code. This release

[Haskell-cafe] Re: (Lazy) SmallCheck and peano numbers

2008-06-20 Thread Benedikt Huber
Levi Stephen schrieb: On Fri, Jun 20, 2008 at 3:30 AM, Benedikt Huber [EMAIL PROTECTED] wrote: Levi Stephen schrieb: Hi, I have the following definitions type Zero type Succ a so that I can muck around with a Vector type that includes its length encoded in its type. I was wondering whether

[Haskell-cafe] Re: Meaning of ribbonsPerLine at Text.PrettyPrint.HughesPJ ?

2008-06-19 Thread Benedikt Huber
Evan Laforge schrieb: byorgey: fons: I can't explain it, all I know is that you must set it to 1 or else it does bizarre things fons: hahah, ok fons: byorgey: that's funny considering its default value is 1.5 byorgey: if you set it to 1 then lineLength means what you think it should byorgey:

[Haskell-cafe] Re: (Lazy) SmallCheck and peano numbers

2008-06-19 Thread Benedikt Huber
Levi Stephen schrieb: Hi, I have the following definitions type Zero type Succ a so that I can muck around with a Vector type that includes its length encoded in its type. I was wondering whether it was possible to use SmallCheck (or QuickCheck) to generate random Peano numbers? Is there an

[Haskell-cafe] Re: type-level integers using type families

2008-05-30 Thread Benedikt Huber
Peter Gavin schrieb: Has anyone else tried implementing type-level integers using type families? I tried using a couple of other type level arithmetic libraries (including type-level on Hackage) and they felt a bit clumsy to use. I started looking at type families and realized I could pretty

[Haskell-cafe] Re: is there a more concise way to generate helper functions for a datatype built on records?

2007-11-28 Thread Benedikt Huber
apfelmus schrieb: Benedikt Huber wrote: So, the Ref deriviation is really nice for sequential updates; parallel updates on the other hand need some work. .. While the select part of the Ref is expressed using , I don't know how the parallel update can be expressed in terms of combinators. Any

[Haskell-cafe] Re: is there a more concise way to generate helper functions for a datatype built on records?

2007-11-26 Thread Benedikt Huber
Neil Mitchell wrote: Hi Some of these can be automatically derived by the Data.Derive tool... The derivations Set, Is, From, Has, LazySet all look useful. ... On Nov 24, 2007 4:01 PM, Thomas Hartman [EMAIL PROTECTED] wrote: I think I'm running into more or less the same issue discussed at