[Haskell-cafe] searching a function by providing examples of input/ouput pairs

2010-03-18 Thread Paul Brauner
Hi, I was looking at hoogle documentation when I remembered that there is some nice, but quite unusable, feature of squeak (smalltalk) which allows you to search function in the library by giving a list of pairs of inputs/ouputs. When I'm saying that it is quite unusable, I mean that squeak has

Re: [Haskell-cafe] Re: searching a function by providing examples of input/ouput pairs

2010-03-18 Thread Paul Brauner
On Thu, Mar 18, 2010 at 01:49:20PM +0100, Janis Voigtländer wrote: Paul Brauner schrieb: Hi, I was looking at hoogle documentation when I remembered that there is some nice, but quite unusable, feature of squeak (smalltalk) which allows you to search function in the library by giving a list

[Haskell-cafe] explicit big lambdas

2010-03-18 Thread Paul Brauner
Hi again, is there a way in some haskell extension to explicit (system F's) big lambdas and (term Type) applications in order to help type inference? If not: is there a way to provide ghc directly with core code before the type checking phase? Paul

Re: [Haskell-cafe] phonetic dictionnary

2010-03-25 Thread Paul Brauner
You should have a looks at soundexes: http://en.wikipedia.org/wiki/Soundex the algorithm is really simple and you can process a whole dictionnary in no time to obtain what you're looking for. Paul On Thu, Mar 25, 2010 at 01:59:28PM +0100, Dupont Corentin wrote: Hello, sorry if i ask a lot of

Re: [Haskell-cafe] explicit big lambdas

2010-03-25 Thread Paul Brauner
Thanks to all! Paul On Fri, Mar 19, 2010 at 04:24:17PM +0100, Bas van Dijk wrote: On Fri, Mar 19, 2010 at 4:03 AM, Nicolas Frisby nicolas.fri...@gmail.com wrote: Alternatively: let f :: some type involving a    f = ...    f' :: a - some type involving a    f' _ = f in f'

[Haskell-cafe] libraries and executables in cabal

2010-03-25 Thread Paul Brauner
Hi, i'm working on a project made of - lots of modules - one excutable importing these modules - another excutable importing these same modules I don't especially want to expose those modules as libraries, especially on hackage, since they are meaningless without the executables. But, if I

[Haskell-cafe] benchmarking pure code

2010-03-31 Thread Paul Brauner
Hello, I'm writing a library for dealing with binders and I want to benchmark it against DeBruijn, Locally Nameless, HOAS, etc. One on my benchmark consists in 1. generating a big term \x.t 2. substituting u fox in t The part I want to benchmark is 2. In particular I would like that: a.

Re: [Haskell-cafe] benchmarking pure code

2010-03-31 Thread Paul Brauner
is that it is a GADT, but this souldn't change anything right? Did I make some mistake in instancing NFData ? Regards, Paul On Wed, Mar 31, 2010 at 09:32:29AM +0200, Bas van Dijk wrote: On Wed, Mar 31, 2010 at 9:17 AM, Paul Brauner paul.brau...@loria.fr wrote: Does anyone have an idea why calling rnf

Re: [Haskell-cafe] benchmarking pure code

2010-03-31 Thread Paul Brauner
Thank you, I will look at that. But it seems that criterion uses NFData no? Paul On Wed, Mar 31, 2010 at 12:57:20PM +0200, Bas van Dijk wrote: On Wed, Mar 31, 2010 at 11:06 AM, Paul Brauner paul.brau...@loria.fr wrote: data Term = Lam Term | App Term Term | Var Int instance NFData where

Re: [Haskell-cafe] benchmarking pure code

2010-04-01 Thread Paul Brauner
Ok, thank you for all your answers. I'm going to use NFData as advised by everyone. Paul On Wed, Mar 31, 2010 at 10:38:50AM -0700, Bryan O'Sullivan wrote: On Wed, Mar 31, 2010 at 4:12 AM, Paul Brauner paul.brau...@loria.fr wrote: Thank you, I will look at that. But it seems that criterion

[Haskell-cafe] Control.Parallel and the Reader monad

2009-12-23 Thread Paul Brauner
Hi, I'm facing the following problem. I've got come computation c :: a - Reader e b that i'm running on several as: mapM c xs A natural optimisation of this program would to be to take advantage of Control.Parallel to run these computation in parallel, which seems sound since the Reader

[Haskell-cafe] lawless instances of Functor

2010-01-04 Thread Paul Brauner
Hi, I'm trying to get a deep feeling of Functors (and then pointed Functors, Applicative Functors, etc.). To this end, I try to find lawless instances of Functor that satisfy one law but not the other. I've found one instance that satisfies fmap (f.g) = fmap f . fmap g but not fmap id = id:

Re: [Haskell-cafe] lawless instances of Functor

2010-01-04 Thread Paul Brauner
don't know much about category theory, but it seems to me that functors are pretty central to it. Maybe i'm confusing haskell's notion of Functor and category theory functors. Paul On Tue, Jan 05, 2010 at 08:01:46AM +0900, Derek Elkins wrote: On Tue, Jan 5, 2010 at 7:14 AM, Paul Brauner

[Haskell-cafe] telling ghc to run several jobs in parallel

2010-01-08 Thread Paul Brauner
Hi, I have to processors but ghc --make only uses one of them, even if some files could be compiled in parallel. Is there some option similar to the -j one of the make tool ? (I read the manual but didn't find it) Regards, Paul ___ Haskell-Cafe

[Haskell-cafe] datakind declaration

2010-02-22 Thread Paul Brauner
Hello, I remember seeing something like typedata T = A | B somewhere, where A and B are type constructors, but I can't find it in the ghc doc. Have I been dreaming or is it some hidden feature ? Paul ___ Haskell-Cafe mailing list

[Haskell-cafe] haltavista - look for functions by example

2010-09-18 Thread Paul Brauner
Hello, I just hacked together something I've been talking about a while ago on that mailing list. It's a program that looks for functions given a set of input/outputs. Example session 1: brau...@worf:~$ haltavista 2 2 4 EOF Prelude (*) Prelude (+) Prelude (^) Example session 2

Re: [Haskell-cafe] haltavista - look for functions by example

2010-09-19 Thread Paul Brauner
Hi, i'ts on hackage now. Thanks to Jun Inoue, stack overflows are now catched. Paul On Sat, Sep 18, 2010 at 11:47:07AM +0200, Paul Brauner wrote: Hello, I just hacked together something I've been talking about a while ago on that mailing list. It's a program that looks for functions given

Re: [Haskell-cafe] haltavista - look for functions by example

2010-09-19 Thread Paul Brauner
That's a great idea! In the same vein, have you had a look at quickspec by Koen Claessen, Nicholas Smallbone and John Hughes? www.cse.chalmers.se/~nicsma/quickspec.pdf This reminds me of another idea, suggested by Jun inoue: look for functions by specification instead of examples. I will try

Re: [Haskell-cafe] haltavista - look for functions by example

2010-09-19 Thread Paul Brauner
. Paul On Sun, Sep 19, 2010 at 08:16:08PM +0200, Paul Brauner wrote: That's a great idea! In the same vein, have you had a look at quickspec by Koen Claessen, Nicholas Smallbone and John Hughes? www.cse.chalmers.se/~nicsma/quickspec.pdf This reminds me of another idea, suggested by Jun

Re: [Haskell-cafe] haltavista - look for functions by example

2010-09-19 Thread Paul Brauner
There's a timeout of 1.5 second right now.. On Sun, Sep 19, 2010 at 07:46:54PM +0200, Roel van Dijk wrote: In my haste to reply I made an error in my 'newby' multiplication function. Pesky negative numbers... intMul ∷ Integer → Integer → Integer intMul x n | n 0 = -(intMul x $ abs n)

Re: [Haskell-cafe] Haskellers design

2010-10-23 Thread Paul Brauner
Looks perfect to me. Go for it! PS: I'm reading your book, I have never tried web dev before but Yesod feels very right On Sat, Oct 23, 2010 at 08:09:25PM +0200, Michael Snoyman wrote: It looks good to me. Are there any objections to using this for Haskellers? On Sat, Oct 23, 2010 at 3:31

[Haskell-cafe] Fwd: second call for papers: LDTA 2011 / ETAPS

2010-12-07 Thread Paul Brauner
-- Forwarded message -- From: Emilie Balland emilie.ball...@inria.fr Date: Tue, Dec 7, 2010 at 10:35 PM Subject: second call for papers: LDTA 2011 / ETAPS To: Paul.Brauner paul.brau...@loria.fr LDTA 2011 Call for Papers and Tool Challenge Submissions

[Haskell-cafe] haskell code pretty printer ?

2009-08-03 Thread Paul . Brauner
Hello, is there a pretty printer for haskell code somewhere ? I've googled and caballisted for this without success. I've written some small script using Language.Haskell.Pretty and Language.Haskell.Parser but the result isn't that 'pretty'. I mean, it outputs readable code but supercombinator's

[Haskell-cafe] convert a list of booleans into Word*

2009-09-30 Thread Paul . Brauner
Hello, I haven't found a function in hackage or in the standard library that takes a list of booleans (or a list of 0s and 1s, or a tuple of booleans or 0s and 1s) and outputs a Word8 or Word32. I have written one which seems very inefficient : toWord8 :: [Bool] - Word8 toWord8 bs = go 0 0 bs

Re: [Haskell-cafe] convert a list of booleans into Word*

2009-09-30 Thread Paul . Brauner
Thanks for the answers. I already had a look at Binary but, as said above, it doesn't support bit manipulation, only bytes. On Wed, Sep 30, 2009 at 11:18:03AM +0200, paul.brau...@loria.fr wrote: Hello, I haven't found a function in hackage or in the standard library that takes a list of

[Haskell-cafe] Pattern matching with singletons

2013-03-25 Thread Paul Brauner
Hello, the following programs seems to hit either some limitation of GHC or maybe I'm just missing something and it behaves the intended way. {-# LANGUAGE TemplateHaskell, TypeFamilies, DataKinds, GADTs #-} module Test where import Data.Singletons data TA = CA data TB = CB data TC = CC

Re: [Haskell-cafe] Pattern matching with singletons

2013-03-27 Thread Paul Brauner
Very helpful, thanks! I may come back with more singleton/type families questions :) On Tue, Mar 26, 2013 at 6:41 PM, Richard Eisenberg e...@cis.upenn.eduwrote: Hello Paul, - Forwarded message from Paul Brauner polux2...@gmail.com - snip - is a ~ ('CC ('Left 'CA

[Haskell-cafe] %==%, :==: and type equality in the singletons library

2013-04-08 Thread Paul Brauner
Hello, from the output of -ddump-splices I dont think it is the case but I'm asking anyway: is there any way to deduce a ~ b from a :==: b? Given data T = C1 | ... | Cn I can easily derive data EqT :: T - T - * where EqT :: a ~ b = EqT a b eqT :: ST a - ST b - Maybe (EqT a b)

Re: [Haskell-cafe] %==%, :==: and type equality in the singletons library

2013-04-08 Thread Paul Brauner
On Mon, Apr 8, 2013 at 9:59 PM, Richard Eisenberg e...@cis.upenn.edu wrote: On Apr 8, 2013, at 3:12 PM, Paul Brauner polux2...@gmail.com wrote: from the output of -ddump-splices I dont think it is the case but I'm asking anyway: is there any way to deduce a ~ b from a :==: b? Not easily