==
CALL FOR PARTICIPATION
WGP 2010
6th ACM SIGPLAN Workshop on Generic Programming
Baltimore, Maryland, US
Sunday,
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
==
CALL FOR PAPERS
WGP 2010
6th ACM SIGPLAN Workshop on Generic Programming
Baltimore, Maryland, US
Sunday,
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
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
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
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)
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
confirm this?
Cheers,
Bruno Oliveira
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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
(\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
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
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
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
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
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)
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
17 matches
Mail list logo