[Haskell-cafe] Re: Type question in instance of a class

Peter Hercek phercek at gmail.com
Tue Nov 18 13:05:05 EST 2008

David Menendez wrote:
> On Sun, Nov 16, 2008 at 7:09 PM, Luke Palmer <lrpalmer at gmail.com> wrote:
>> On Sun, Nov 16, 2008 at 5:06 PM, Peter Hercek <phercek at gmail.com> wrote:
>>> ... and the only value the function can return is bottom.
>>> Is there any type system which would have more than
>>>  one value which inhabits all types?
>> Well something like lazy C# might; i.e. every value has a _|_
>> (nontermination) and null (termination but undefined).
> For that matter, Control.Exception allows you to distinguish
> exceptional values from each other.

OK, thanks for responses. I'm not sure I understand it well
  so I try to summarize:

Control.Exception is an extension, also it probably cannot
  catch "error :: String -> a" since the report says so:
  So Haskell'98 has only one value of all types (the bottom).

But Haskell with Control.Exception extension has more values
  of all types since they can be thrown and later caught and
  investigated at that place.

Maybe the last sentence of section 2.1 (_|_ Bottom) of
  "Haskell/Denotational semantics" should be clarified better.


So when trying to use Curry-Howard isomorphism for something
  in Haskell, one sould be pretty carefull what features of are
  being used.


More information about the Haskell-Cafe mailing list