Re: [Haskell-cafe] Constrained Category, Arrow, ArrowChoice, etc?

2013-05-10 Thread Sjoerd Visscher
On May 9, 2013, at 10:36 PM, Conal Elliott co...@conal.net wrote: BTW, have you see the new paper The constrained-monad problem? I want to investigate whether its techniques can apply to Category friends for linear maps and for circuits. Perhaps you’d like to give it a try as well. I got to

Re: [Haskell-cafe] Constrained Category, Arrow, ArrowChoice, etc?

2013-05-09 Thread Sjoerd Visscher
Hi Conal, I have a package data-category that should be able to do this. http://hackage.haskell.org/package/data-category I tried implementing your linear map, and this is the result: https://gist.github.com/sjoerdvisscher/5547235 I had to make some changes to your linear map data type,

Re: [Haskell-cafe] Constrained Category, Arrow, ArrowChoice, etc?

2013-05-09 Thread Conal Elliott
Hi Sjoerd, Thanks very much for the help sorting out options for more flexibility in Category instances. I like how you spotted and removed the id problem. I’ve cloned your gist https://gist.github.com/conal/5549861 and tried out an idea to simplify verifying the required constraints on linear

Re: [Haskell-cafe] Constrained Category, Arrow, ArrowChoice, etc?

2013-05-09 Thread Sjoerd Visscher
Hi Conal, I’ve cloned your gist and tried out an idea to simplify verifying the required constraints on linear map values. Lovely use of view patterns! It looks like it is not necessary to store the LM value, all that is needed is to store that VS2 s a b is satisfied. Am I right in thinking

[Haskell-cafe] Constrained Category, Arrow, ArrowChoice, etc?

2013-05-07 Thread Conal Elliott
I'm using a collection of classes similar to Category, Arrow, ArrowChoice, etc (though without arr and with methods like fst, snd, dup, etc). I think I need some associated constraints (via ConstraintKinds), so I've tried adding them. However, I'm getting terribly complex multiplication of these

[Haskell-cafe] Is ([] - []) an arrow?

2007-03-21 Thread Chad Scherrer
In John Hughes's Programming With Arrows (http://www.cs.chalmers.se/~rjmh/afp-arrows.pdf), he discusses a stream function type newtype SF a b = SF {runSF :: [a] - [b]} and gives instance Arrow SF where He gives some examples using this, and everything seems to go just fine. But in Ross

Re: [Haskell-cafe] Is ([] - []) an arrow?

2007-03-21 Thread Jeff Polakow
Hello, In John Hughes's Programming With Arrows (http://www.cs.chalmers.se/~rjmh/afp-arrows.pdf), he discusses a stream function type newtype SF a b = SF {runSF :: [a] - [b]} and gives instance Arrow SF where He gives some examples using this, and everything seems to go just fine. I