Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-15 Thread Tsuyoshi Ito
On Fri, Jul 13, 2012 at 8:11 AM, Ross Paterson r...@soi.city.ac.uk wrote: On Thu, Jul 12, 2012 at 02:47:57PM +0100, Ross Paterson wrote: Though one possibility that might get us most of the way there would be to refactor the Arrow class as class PreArrow a where premap :: (b - b') - a

[Haskell-cafe] I can see lists working for matrix algorithms if the access patterns are mostly from the start or end of rows and columns.

2012-07-15 Thread KC
Are there any such matrix algorithms that operate mainly from the start or end or rows and columns? Note: If the access pattern starts from the end of a row then one stores the row in reverse order in a list. -- -- Regards, KC ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-15 Thread Ertugrul Söylemez
Ross Paterson r...@soi.city.ac.uk wrote: Though one possibility that might get us most of the way there would be to refactor the Arrow class as class PreArrow a where premap :: (b - b') - a b' c - a b c Note that you are reinventing the 'profunctors' package here. Every arrow forms a

Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-15 Thread Ross Paterson
On Sun, Jul 15, 2012 at 06:51:07PM +0100, Tsuyoshi Ito wrote: Thank you for the response. This sounds exciting, but sadly, I must admit that it is a little (?) above my head, and I cannot relate this extension to my original question…. Sorry about that -- I got a bit side-tracked. The

Re: [Haskell-cafe] Getting a segmentation fault when starting/stopping the RTS, from C, several times.

2012-07-15 Thread Albert Y. C. Lai
On 12-07-10 11:35 PM, Brandon Allbery wrote: Quoth the Fine Manual (8.2.1.1. Using your own main() http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#using-own-main): There can be multiple calls to |hs_init()|, but each one should be matched by one (and only one) call to

Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-15 Thread Ross Paterson
Silly me -- that code works with the current GHC (module attached). I still think the generalization is worth doing, though. - {-# LANGUAGE Arrows #-} module ArrowTest where import Control.Applicative import Control.Arrow

Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-15 Thread Tsuyoshi Ito
On Sun, Jul 15, 2012 at 6:30 PM, Ross Paterson r...@soi.city.ac.uk wrote: Silly me -- that code works with the current GHC (module attached). Aha! Now I see why the GHC documentation states “the arrows involved need not be the same” in the section about banana brackets. After all, I was wrong

Re: [Haskell-cafe] Getting a segmentation fault when starting/stopping the RTS, from C, several times.

2012-07-15 Thread Felipe Almeida Lessa
Em 15/07/2012 18:38, Albert Y. C. Lai tre...@vex.net escreveu: On 12-07-10 11:35 PM, Brandon Allbery wrote: Quoth the Fine Manual (8.2.1.1. Using your own main() http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#using-own-main ): There can be multiple calls to

Re: [Haskell-cafe] Getting a segmentation fault when starting/stopping the RTS, from C, several times.

2012-07-15 Thread Albert Y. C. Lai
On 12-07-15 08:37 PM, Felipe Almeida Lessa wrote: Would that be: Prog ::= nop | hs_init(); Prog'; hs_exit(); Prog' ::= nop | hs_init(); Prog'; hs_exit(); | Prog' Prog' Yeah, I keep forgetting that. ___ Haskell-Cafe mailing list