Re: [Haskell-cafe] Best way to build a GHC backend?

2012-07-07 Thread Niklas Larsson
2012/7/8 Jonathan Geddes : > Venerable Haskell Hackers, > > I love Haskell and think it should run everywhere. Now supposing I would > like to build another backend for GHC, perhaps for Java Bytecode, .Net CIL, > or JavaScript, What would be the best way to approach that? I can think of a > few opt

Re: [Haskell-cafe] Best way to build a GHC backend?

2012-07-07 Thread KC
As to your porting of Haskell to the JVM question; the JVM would be unable to perform all the optimizations that GHC can do. There is really not much point in running slow code. JavaScript is interesting since the JIT compiler gets better all the time. On Sat, Jul 7, 2012 at 10:02 PM, Jonathan

[Haskell-cafe] Best way to build a GHC backend?

2012-07-07 Thread Jonathan Geddes
Venerable Haskell Hackers, I love Haskell and think it should run everywhere. Now supposing I would like to build another backend for GHC, perhaps for Java Bytecode, .Net CIL, or JavaScript, What would be the best way to approach that? I can think of a few options: 1. Produce External Core with -

Re: [Haskell-cafe] vector-simd: some code available, and some questions

2012-07-07 Thread Nicolas Trangez
On Sun, 2012-07-08 at 01:40 +0200, Gábor Lehel wrote: > unsafeXorSSE42 :: (Storable a, > > SV.AlignedToAtLeast SV.A16 o1, SV.Alignment o1, > > SV.AlignedToAtLeast SV.A16 o2, SV.Alignment o2, > > SV.AlignedToAtLeast SV.A16 o3, SV.Alignment o3) => > > SV.Vector o1 a -> SV.Vector o2 a

Re: [Haskell-cafe] combining predicates, noob question

2012-07-07 Thread Sebastián Krynski
Ok , thanks for the answers, I understand now what liftM2 does. In this case would it be silly to use combinerPred (and maybe a newType Predicate a = a -> Bool) for the sake of readability or shoud I stick with a -> Bool and liftM2? thanks, Sebastián 2012/7/6 Brent Yorgey > On Fri, Jul

Re: [Haskell-cafe] vector-simd: some code available, and some questions

2012-07-07 Thread Nicolas Trangez
On Sat, 2012-07-07 at 21:13 +0200, Nicolas Trangez wrote: > As you can see, the zipWith Data.Vector.SIMD implementation is slightly > slower than the Data.Vector.Storable based one. I didn't perform much > profiling yet, but I suspect allocation and ForeignPtr creation is to > blame, this seems to

Re: [Haskell-cafe] vector-simd: some code available, and some questions

2012-07-07 Thread Gábor Lehel
On Sun, Jul 8, 2012 at 12:21 AM, Nicolas Trangez wrote: > On Sat, 2012-07-07 at 21:59 +0200, Gábor Lehel wrote: >> An alternative solution is to encode all of the alignments in unary, >> which is more general; if they're all going to be a power of two you >> can "store" just the logarithm: >> >> d

Re: [Haskell-cafe] vector-simd: some code available, and some questions

2012-07-07 Thread Nicolas Trangez
On Sat, 2012-07-07 at 21:59 +0200, Gábor Lehel wrote: > An alternative solution is to encode all of the alignments in unary, > which is more general; if they're all going to be a power of two you > can "store" just the logarithm: > > data One > data Twice n -- not practical to call it Double :) >

Re: [Haskell-cafe] vector-simd: some code available, and some questions

2012-07-07 Thread Gábor Lehel
On Sat, Jul 7, 2012 at 9:59 PM, Gábor Lehel wrote: > class AlignedToAtLeast n a > instance AlignedToAtLeast A1 A1 > instance AlignedToAtLeast A4 A1 > instance AlignedToAtLeast A4 A4 > instance AlignedToAtLeast A8 A1 > instance AlignedToAtLeast A8 A4 > instance AlignedToAtLeast A8 A8 > instance Ali

Re: [Haskell-cafe] vector-simd: some code available, and some questions

2012-07-07 Thread Gábor Lehel
On Sat, Jul 7, 2012 at 9:13 PM, Nicolas Trangez wrote: > - Currently Alignment phantom types (e.g. A8 and A16) are not related to > each other: a function (like Data.Vector.SIMD.Algorithms.unsafeXorSSE42) > can have this signature: > > unsafeXorSSE42 :: Storable a => SV.Vector SV.A16 a -> SV.Vecto

Re: [Haskell-cafe] Interest in typed relational algebra library?

2012-07-07 Thread Jay Sulzberger
On Sat, 7 Jul 2012, Paul Visschers wrote: Hello, I've been out of the Haskell game for a bit, but now I'm back. A couple of years ago I made a small library that implements relational algebra with types so that malformed queries and other operations are caught at compile time. It is heavily

[Haskell-cafe] vector-simd: some code available, and some questions

2012-07-07 Thread Nicolas Trangez
All, After my message of yesterday [1] I got down to it and implemented something along those lines. I created a playground repository containing the code at [2]. Initial benchmark results at [3]. More about the benchmark at the end of this email. First some questions and requests for help: - I

[Haskell-cafe] sample terms and interpreting program output from Tc Monad

2012-07-07 Thread rickmurphy
Hi All: I'm still working through the following paper [1] and I wondered whether you could help me confirm my understanding of some sample terms and program output from the Tc Monad. For those interested, the language is specified in Parser.lhs available in the protoype here [2]. I understand the

Re: [Haskell-cafe] Odd HDBC connection bug

2012-07-07 Thread William Shackleton
I found the solution to this problem: for both libraries, I had to wrap calls in 'withRTSSignalsBlocked' from HDBC-mysql. On 16 June 2012 00:32, William Shackleton wrote: > Hi > > I'm having issues with HDBC when connecting to a remote MySQL server - > certain queries cause the DB connection to

Re: [Haskell-cafe] Interest in typed relational algebra library?

2012-07-07 Thread Carter Schonwald
I'd be interested in at least playing with it. On Saturday, July 7, 2012, Paul Visschers wrote: > Hello, > > I've been out of the Haskell game for a bit, but now I'm back. A couple of > years ago I made a small library that implements relational algebra with > types so that malformed queries and

Re: [Haskell-cafe] Interest in typed relational algebra library?

2012-07-07 Thread Ertugrul Söylemez
Paul Visschers wrote: > I've been out of the Haskell game for a bit, but now I'm back. A > couple of years ago I made a small library that implements relational > algebra with types so that malformed queries and other operations are > caught at compile time. It is heavily based off of the interna

Re: [Haskell-cafe] [Haskell] ANNOUNCE: lens-family-th 0.1.0.0

2012-07-07 Thread Henning Thielemann
On Sat, 7 Jul 2012, Dan Burton wrote: > > Could the documentation be an argument of mkLenses? > Does haddock run on the template-haskell expanded code?   TH macros must have type Q [Dec]. Dec has no constructor for comments, with the exception of pragmas. This might be feature request worthy,

Re: [Haskell-cafe] [Haskell] ANNOUNCE: lens-family-th 0.1.0.0

2012-07-07 Thread Dan Burton
> > >>> I don't know if it is possible to add haddock to functions whose type >>> signatures are generated by template haskell. >>> >> >> Could the documentation be an argument of mkLenses? >> > > Does haddock run on the template-haskell expanded code? TH macros must have type Q [Dec]. Dec has no

Re: [Haskell-cafe] [Haskell] ANNOUNCE: lens-family-th 0.1.0.0

2012-07-07 Thread roconnor
I don't know if it is possible to add haddock to functions whose type signatures are generated by template haskell. Could the documentation be an argument of mkLenses? Does haddock run on the template-haskell expanded code? -- Russell O'Connor

[Haskell-cafe] Interest in typed relational algebra library?

2012-07-07 Thread Paul Visschers
Hello, I've been out of the Haskell game for a bit, but now I'm back. A couple of years ago I made a small library that implements relational algebra with types so that malformed queries and other operations are caught at compile time. It is heavily based off of the internals of HaskellDB (see htt

Re: [Haskell-cafe] [Haskell] ANNOUNCE: lens-family-th 0.1.0.0

2012-07-07 Thread Henning Thielemann
On Sat, 7 Jul 2012, rocon...@theorem.ca wrote: On Fri, 6 Jul 2012, Dan Burton wrote: Following the announcement of lens-family, I'm pleased to announce lens-family-th 0.1.0.0, a Template Haskell library supplying macros to generate lens-family lenses for fields of data types declared with r

Re: [Haskell-cafe] ANNOUNCE: lens-family-th 0.1.0.0

2012-07-07 Thread roconnor
On Fri, 6 Jul 2012, Dan Burton wrote: Following the announcement of lens-family, I'm pleased to announce lens-family-th 0.1.0.0, a Template Haskell library supplying macros to generate lens-family lenses for fields of data types declared with record syntax. Be warned that currently, type signa

Re: [Haskell-cafe] [Haskell] ANNOUNCE: Sifflet visual programming language, release 2.0.0.0

2012-07-07 Thread Henning Thielemann
On Thu, 5 Jul 2012, gdwe...@iue.edu wrote: Sifflet and sifflet-lib 2.0.0.0, now available on Hackage! This version introduces a type checker and partial support for higher order functions in Sifflet, the visual, functional programming language and support system for students learning about rec

Re: [Haskell-cafe] translation between two flavors of lexically-scoped type variables

2012-07-07 Thread oleg
> Do you know why they switched over in GHC 6.6? If I were to speculate, I'd say it is related to GADTs. Before GADTs, we can keep conflating quantified type variables with schematic type variables. GADTs seem to force us to make the distinction. Consider this code: data G a where GI :: Int