[Haskell-cafe] WGP Call for Participation

2010-08-11 Thread Bruno Oliveira
== CALL FOR PARTICIPATION WGP 2010 6th ACM SIGPLAN Workshop on Generic Programming Baltimore, Maryland, US Sunday,

Re: [Haskell-cafe] Difficulties with tagless - create primitives or compose them

2010-06-12 Thread Bruno Oliveira
to override an interpretation, you will need an instance. More generally this approach tells you how you can modularize your EDSLs. Or, put another way, if offers a solution for the expression problem: http://www.daimi.au.dk/~madst/tool/papers/expression.txt Hope this helps! Cheers, Bruno

[Haskell-cafe] WGP 2010 Second Call for Papers (Apologies for multiple copies)

2010-05-02 Thread Bruno Oliveira
== CALL FOR PAPERS WGP 2010 6th ACM SIGPLAN Workshop on Generic Programming Baltimore, Maryland, US Sunday,

Re: [Haskell-cafe] Re: more thoughts on Finally tagless

2010-03-10 Thread Bruno Oliveira
Hi Oleg, (cc'ed the haskell-cafe as it may be of interest to other readers) On Tue, 9 Mar 2010 o...@okmij.org wrote: Hi, Bruno! Of course I know the EMGM paper and approach -- we discuss it at great length in the paper we are both editing, don't we? What I had in mind about tagless

Re: [Haskell-cafe] Re: more thoughts on Finally tagless

2010-03-09 Thread Bruno Oliveira
Hi Oleg, On 9 Mar 2010, at 17:52, o...@okmij.org wrote: Stephen Tetley wrote: The finally tagless style is an implementation of the TypeCase pattern (Bruno C. d. S. Oliveira and Jeremy Gibbons): http://www.comlab.ox.ac.uk/jeremy.gibbons/publications/typecase.pdf The finally tagless

Re: [Haskell-cafe] GADTs: the plot thickens?

2007-01-31 Thread Bruno Oliveira
Hello Conor, The following seems to work: On 31 Jan 2007, at 11:46, Conor McBride wrote: Hi folks A puzzle for you (and for me too). I just tried to translate an old Epigram favourite (which predates Epigram by some time) into GADT- speak. It went wrong. I had a feeling it might. I

Re: [Haskell-cafe] GADTs: the plot thickens?

2007-01-31 Thread Bruno Oliveira
Hello Pablo, What I meant was simply that the function thin does not need the extra Nat n argument to compile; Conor's original version was already compiling: thin :: Fin (S n) - Fin n - Fin (S n) thin Fz i = Fs i thin (Fs i) Fz = Fz thin (Fs i) (Fs j) = Fs (thin i j)

Re: [Haskell-cafe] what is a difference between existential quantification and polymorhic field?

2006-09-21 Thread Bruno Oliveira
a . Num a = a] myList = [3 :: Int, 4 :: Float, 6 :: Integer] which in previous versions of GHC would need to be written as: myList :: [Ex] myList = [Ex (3 ::Int), Ex (4 :: Float), Ex (6 :: Integer)] Hope this helps. Cheers, Bruno Oliveira

Re: [Haskell-cafe] what is a difference between existential quantification and polymorhic field?

2006-09-21 Thread Bruno Oliveira
confirm this? Cheers, Bruno Oliveira ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Non-existant existential?

2006-09-21 Thread Bruno Oliveira
Hello, Consider the following: data SimpExist a = SimpExist (forall x . x - a) f :: SimpExist Bool f = SimpExist (const True) g = SimpExist id What is the type of g? In a similar example, GHC tells me it is of type SimpExist c. Yet, I can't unify it with any other SimpExist c'. Have you tried

Re: [Haskell-cafe] Optimization problem

2006-09-14 Thread Bruno Oliveira
(\x - (0, x)) [1..]) and here a case where it terminates with infinite lists: *General7 take 10 (lookUp inf 0) [1,2,3,4,5,6,7,8,9,10] Cheers, Bruno Oliveira ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] Optimization problem

2006-09-14 Thread Bruno Oliveira
lowed by a continued search down the list. If you don't find it, you forward the request to the next function down the list. That's exactly the same as what the filter function does. It is possible I made a mistake somewhere and if I did, let me know. / Magnus On Thu, 14 Sep 2006, Bruno Olive

Re: [Haskell-cafe] Rank 2 polymorphism in pattern matching?

2006-04-08 Thread Bruno Oliveira
Hello, See this message: http://article.gmane.org/gmane.comp.lang.haskell.general/13145/ Your (initial) program should work in GHC 6.2. I actually find this feature useful, but Simon apparently changed this when moving to GHC 6.4 and nobody complained... Apparently not many people

Re: [Haskell-cafe] Can this be improved?

2005-12-29 Thread Bruno Oliveira
Hello, On Tue, 27 Dec 2005 16:39:34 +, Chris Kuklewicz wrote: Happy Holidays, I was wondering if it this small snippet of code could be altered to require fewer OPTIONS -fallow-... switches. Here is a partial solution using only -fglasgow-exts: module MyShow where class MyShow t where

Re: [Haskell-cafe] Regular Expressions without GADTs

2005-10-19 Thread Bruno Oliveira
features of Haskell 98 (but not GHC Haskell). Best Regards, Bruno Oliveira ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Regular Expressions without GADTs

2005-10-18 Thread Bruno Oliveira
Hello, You can also write this code in Haskell 98. Jeremy Gibbons and I have recently written a paper entitled TypeCase: A design pattern for type-indexed functions where we explore the use of some techniques from lightweight approaches to generic programming (Ralf Hinze and James Cheney's work)

Re: [Haskell-cafe] Simulating OO programming with type classes; writing a factory fu nction

2005-05-31 Thread Bruno Oliveira
Hi Alistair! Just a quick reply (I didn't had time to look at Ralf's technique). Looking at your code, it seems to me that you are missing the notion of a supertype (perhaps, that's the intended thing with BaseClass?). I would use an existencial type to capture this notion: === data