tdammers / ginger

A Haskell implementation of the Jinja template language.
MIT License
77 stars 13 forks source link

MonadFail migration #48

Closed ejconlon closed 4 years ago

ejconlon commented 4 years ago

Tests pass with Stackage LTS-15.11.

tdammers commented 4 years ago

Hmm, I'm not 100% sure I like it like this.

Getting things to compile cleanly on 8.8 is of course necessary, but I think that rather than make fail work, we should get rid of it - it's kind of an ad-hoc solution to the problem of dealing with failures, and I'd much rather resort to a more "proper" solution, probably something along the lines of a more descriptive error type and ExceptT.

I'm particularly unhappy with extending runGinger, which is supposed to be (technically and morally) pure to return an arbitrary m.

I'll do some thinking on this and get back to you.

tdammers commented 4 years ago

On this note: #49

ejconlon commented 4 years ago

Ok, thanks for looking!