Using existential types
Tomasz Zielonka
t.zielonka at students.mimuw.edu.pl
Wed Oct 8 20:08:57 EDT 2003
On Wed, Oct 08, 2003 at 09:40:35AM -0700, Mike Gunter wrote:
>
> Jan-Willem Maessen <jmaessen at MIT.EDU> writes:
>
> > Tomasz Zielonka <t.zielonka at zodiac.mimuw.edu.pl> wrote:
> > [...]
> > > data Stat i o = -- aggregate function taking i's on input and producing o
> > > forall s. Stat
> > > s -- init
> > > (s -> i -> s) -- update
> > > (s -> o) -- result
> > [...]
> > * But it bugs me that an awful lot of examples of existential typing
> > could be obtained simply by currying / lazy evaluation. In this
> > case, however, the "update" function lets us absorb additional input
> > as in the subsequent message (which I've now accidentally deleted):
>
> I'm not convinced that existentials are needed here.
>
> mike
You are right. When I came up with updateStat, I could go futher and
remove existential type.
Best regards,
Tom
--
.signature: Too many levels of symbolic links
More information about the Haskell-Cafe
mailing list