Re: [Haskell-cafe] Re: Polyvariadic functions operating with a monoid

2010-10-09 Thread Bartek Ćwikłowski
, you can ask ghci about the type of unwrap . polyToMonoid and paste that into the type sig. regards, Bartek Ćwikłowski ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Accepting and returning polyvariadic functions

2010-08-11 Thread Bartek Ćwikłowski
hListToTuple (HCons x xs) = (x,hListToTuple xs) Rest of the code (functions eat, arity and mcomp) is presented here: http://paczesiowa.blogspot.com/2010/03/generalized-zipwithn.html Regards, Bartek Ćwikłowski ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Bartek Ćwikłowski
application I wrote a demo app that used hot code reloading and it maintained gtk state just fine. The code (and video) is available at http://paczesiowa.dw.pl/ , it worked in ghc 6.8 and needed hs-plugins, so it won't work now, but the approach should work. regards, Bartek Ćwikłowski

Re: [Haskell-cafe] polyvariadic function for Applicative instances

2010-05-09 Thread Bartek Ćwikłowski
is just a left fold over the list of arguments. I've written about such things here: http://paczesiowa.blogspot.com/2010/03/generalized-zipwithn.html regards, Bartek Ćwikłowski ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Re: Set Operations In Haskell's Type System

2010-05-06 Thread Bartek Ćwikłowski
-recursion. Are you sure that subset isn't what you really want? With subset you can already ask questions such as is tabby cat an animal?. If so, my code (from hpaste) already has this (iirc isDescendentOf ). regards, Bartek Ćwikłowski ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Set Operations In Haskell's Type System

2010-05-04 Thread Bartek Ćwikłowski
(and backtracking) and it has to be done at the type level. Please use more descriptive type-variable names, type-level code should also be easy to read:) regards, Bartek Ćwikłowski ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org