[Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

Jesse Schalken jesseschalken at gmail.com
Tue Dec 20 11:40:44 CET 2011


On Tue, Dec 20, 2011 at 9:34 PM, Gregory Crosswhite
<gcrosswhite at gmail.com>wrote:

>
> On Dec 20, 2011, at 8:30 PM, Jesse Schalken wrote:
>
>
>
> On Tue, Dec 20, 2011 at 8:46 PM, Ben Lippmeier <benl at ouroborus.net> wrote:
>
>>
>> On 20/12/2011, at 6:06 PM, Roman Cheplyaka wrote:
>>
>> > In denotational semantics, every well-formed term in the language must
>> > have a value. So, what is a value of "fix id"?
>>
>> There isn't one!
>>
>> Bottoms will be the null pointers of the 2010's, you watch.
>>
>
> This ×1000. Errors go in an error monad.
>
>
> Including all possible manifestations of infinite loops?
>

Definitely.

If you think a value might not reduce, return an error in an error monad.
Then the caller is forced to handle the case of an error, or propagate the
error upwards. The error can also be handled in pure code this way, whereas
bottom can only be handled within the IO monad.


> Cheers,
> Greg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111220/7af2daa3/attachment.htm>


More information about the Haskell-Cafe mailing list