Martijn van Steenbergen wrote:
Tom Schrijvers wrote:
data EvalDict sem = EvalDict { val :: Int - sem Int, add :: sem Int
- sem Int - sem Int }
An alternative option is to capture the structure in a GADT:
data Eval a where
Val :: Int - Eval Int
Add :: Eval Int - Eval Int - Eval Int
And
Tom Schrijvers wrote:
William Cook's Onward! essay is relevant here. He characterizes the
difference between objects and abstract data types nicely: the latter
allow binary methods that pattern match (to exploit the combined
knowledge of the internals of two different values) whereas objects
Tom Schrijvers wrote:
Yeah, subject Finally Tagless again, sorry, I'm just not done with it yet.
In Olegs haskell implementation he is using classes mainly to model the
syntax and instances to use for evaluators / compilers to allow multiple
interpretations.
I wonder if it'd be possible to do
Tom Schrijvers wrote:
data EvalDict sem = EvalDict { val :: Int - sem Int, add :: sem Int
- sem Int - sem Int }
An alternative option is to capture the structure in a GADT:
data Eval a where
Val :: Int - Eval Int
Add :: Eval Int - Eval Int - Eval Int
And then write what were instances
Hi all,
and Oleg et al in particular.
Yeah, subject Finally Tagless again, sorry, I'm just not done with it yet.
In Olegs haskell implementation he is using classes mainly to model the
syntax and instances to use for evaluators / compilers to allow multiple
interpretations.
I wonder if
Yeah, subject Finally Tagless again, sorry, I'm just not done with it yet.
In Olegs haskell implementation he is using classes mainly to model the
syntax and instances to use for evaluators / compilers to allow multiple
interpretations.
I wonder if it'd be possible to do the same without
Hi Günther
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
TypeCase can be implemented via GADTs or type classes - typed printf
in section 4.2 of the paper is
Stephen Tetley wrote:
The finally tagless style is an implementation of the TypeCase pattern
(Bruno C. d. S. Oliveira and Jeremy Gibbons):
One part of our work does that, yes.
The authors of the Finally Tagless note in the long version of their
paper that the GADT TypeCase had some
Günther Schmidt wrote:
In Olegs haskell implementation he is using classes mainly to model
the syntax and instances to use for evaluators / compilers to allow
multiple interpretations.
When there are 3 authors on a paper (and in the implementation file), it
is customary to acknowledge all 3,
Dear Jacques,
you are right, I should have done so and will do my best not to repeat
this error.
Please accept my sincere apologies to Ken and yourself for my
negligence, no offense was meant.
Best regards
Günther
Am 09.03.10 03:37, schrieb Jacques Carette:
Günther Schmidt wrote:
10 matches
Mail list logo