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

2013-05-10 Thread Sjoerd Visscher
On May 9, 2013, at 10:36 PM, Conal Elliott 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 > linear m

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 think

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 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 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, because

[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 co