[Haskell-cafe] Re: Are there standard idioms for lazy, pure error handling?

Heinrich Apfelmus apfelmus at quantentunnel.de
Wed Dec 9 05:11:12 EST 2009

Nicolas Pouillard wrote:
> Henning Thielemann wrote:
>> @Apfelmus:
>> For practical purposes I think Train should have swapped type parameters 
>> in order to make Functor act on the type of the list elements.
>> data Train b a = Wagon a (Train b a)
>>                | Loco  b
> The functor on the Loco/Caboose makes sense too and swapping the arguments
> is less natural to read.

It's a bifunctor! :D

I don't really mind. The application "list that may end with an error"
uses a fixed  b , so putting the  a  at the end makes sense.

Heinrich Apfelmus


More information about the Haskell-Cafe mailing list