Re: [Haskell-cafe] Exploring Programming Language Theory

2012-12-09 Thread Sebastien Zany
Try http://lambda-the-ultimate.org/node/492 On Sat, Dec 8, 2012 at 2:41 PM, Danny Gratzer danny.grat...@gmail.comwrote: Sorry for the multiple posts, last time I try to write any decent length email from my phone... Anyways, and that was a tutorial not an introduction. I am also reading

Re: [Haskell-cafe] When is a composition of catamorphisms a catamorphism?

2012-08-26 Thread Sebastien Zany
Thanks Wren. That was my guess too, but it seems not necessary: http://stackoverflow.com/questions/12103309/when-is-a-composition-of-catamorphisms-a-catamorphism On Sat, Aug 25, 2012 at 10:33 PM, wren ng thornton w...@freegeek.orgwrote: On 8/24/12 3:44 AM, Sebastien Zany wrote: More

Re: [Haskell-cafe] When is a composition of catamorphisms a catamorphism?

2012-08-24 Thread Sebastien Zany
(fold2 g) . (fold1 f) :: μF1 - A a catamorphism? On Thu, Aug 23, 2012 at 10:11 PM, Sebastien Zany sebast...@chaoticresearch.com wrote: From page 3 of http://research.microsoft.com/en-us/um/people/emeijer/Papers/meijer94more.pdf : it is not true in general that catamorphisms are closed under

[Haskell-cafe] When is a composition of catamorphisms a catamorphism?

2012-08-23 Thread Sebastien Zany
From page 3 of http://research.microsoft.com/en-us/um/people/emeijer/Papers/meijer94more.pdf : it is not true in general that catamorphisms are closed under composition When is this true? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Fixed point newtype confusion

2012-05-08 Thread Sebastien Zany
. On Mon, May 7, 2012 at 6:59 PM, wren ng thornton w...@freegeek.org wrote: On 5/7/12 8:55 PM, Sebastien Zany wrote: To slightly alter the question, is there a way to define a class class (Functor f) = Fixpoint f x where ... You can just do that (with MPTCs enabled). Though the usability

Re: [Haskell-cafe] Fixed point newtype confusion

2012-05-08 Thread Sebastien Zany
Er, sorry – fix = id should be fix = Fix. On Tue, May 8, 2012 at 5:24 PM, Sebastien Zany sebast...@chaoticresearch.com wrote: Hmm, I don't understand how that would work. I wish I could define something like this: class (Functor f) = Fixpoint f x | x - f where fix :: x - Fix f

Re: [Haskell-cafe] Fixed point newtype confusion

2012-05-07 Thread Sebastien Zany
Thanks Wren! When I try fix term ghci complains of an ambiguous type variable. I have to specify term :: (Expr (Expr (Expr (Fix Expr for it to work. Is there a way around this? On Sun, May 6, 2012 at 4:04 PM, wren ng thornton w...@freegeek.org wrote: On 5/6/12 8:59 AM, Sebastien Zany

Re: [Haskell-cafe] Fixed point newtype confusion

2012-05-07 Thread Sebastien Zany
of x? Or alternatively could something analogous be done with type families? Thanks, Sebastien On Mon, May 7, 2012 at 5:45 PM, Sebastien Zany sebast...@chaoticresearch.com wrote: Thanks Wren! When I try fix term ghci complains of an ambiguous type variable. I have to specify term

[Haskell-cafe] Fixed point newtype confusion

2012-05-06 Thread Sebastien Zany
Hi, Suppose I have the following types: data Expr expr = Lit Nat | Add (expr, expr) newtype Fix f = Fix {unFix :: f (Fix f)} I can construct a sample term: term :: Expr (Expr (Expr expr)) term = Add (Lit 1, Add (Lit 2, Lit 3)) But isn't quite what I need. What I really need is: term' ::

Re: [Haskell-cafe] On the purity of Haskell

2011-12-29 Thread Sebastien Zany
Steve Horne wrote: I haven't seen this view explicitly articulated anywhere before See Conal Elliott's blog post The C language is purely functionalhttp://conal.net/blog/posts/the-c-language-is-purely-functional . ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Why the reluctance to introduce the Functor requirement on Monad?

2011-07-24 Thread Sebastien Zany
:19 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 24 July 2011 00:49, Sebastien Zany sebast...@chaoticresearch.com wrote: Would it be theoretically possible/convenient to be able to put boilerplate like this in class definitions? Not really: what happens for Functors

Re: [Haskell-cafe] Why the reluctance to introduce the Functor requirement on Monad?

2011-07-23 Thread Sebastien Zany
Would it be theoretically possible/convenient to be able to put boilerplate like this in class definitions? On Thu, Jul 21, 2011 at 5:58 AM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Thu, Jul 21, 2011 at 8:31 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Well, for

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Sebastien Zany
Hi Arnaud, I'm not the best person to answer this question, and I'm not certain this constitutes an answer, but you might be interested in Conal Elliott's paper Denotational design with type class morphisms available at http://conal.net/papers/type-class-morphisms/. Sebastien On Tue, Jun 21,