[Haskell-cafe] Re: small step evaluation as an unfold?
sdowney at gmail.com
Wed Jan 24 08:19:05 EST 2007
good, it felt like something that might have occurred to someone before.
On 1/23/07, Nicolas Frisby <nicolas.frisby at gmail.com> wrote:
> Jeremy Gibbons thought of it; that's good company ;)
> On 1/23/07, Steve Downey <sdowney at gmail.com> wrote:
> > (overall context - working through TaPL on my own, reimplemnting
> > typecheckers in haskell)
> > the type checkers all follow the same pattern, in ocaml they throw an
> > exception when the small step fails, which may mean taking another
> > branch in the eval, but that that sub expression has hit bottom.
> > it is self admittedly not good ocaml, and it seems to be even worse
> > haskell, as i try to extend the simple evaluator i have to deal with
> > managing reporting errors.
> > having the single small step evaluator return a Maybe is fairly close.
> > then the evaluator above it just bottoms out when eval1 expr returns
> > Nothing, by passing expr back up as the result.
> > but it occurs to me that it might be better to express it as an
> > unfold, where the result is a list with the last element as the
> > irresucible expression.
> > or am i insane / intoxicated ?
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe