
16 May
2008
16 May
'08
12:13 a.m.
On 15 May 2008, at 4:29 AM, Conor McBride wrote:
Replying slap-foreheadedly to own post...
On 15 May 2008, at 11:56, Conor McBride wrote:
Folks
I'm also wondering whether it makes sense to have a "bottomless Top" type, with constructor _ and lazy pattern _ (with (undefined :: Top) equal to _). Then the constant-time shape operator makes the same sort of sense as the constant-time
inflate :: Functor f => f Zero -> f a
We've got it already.
data One
would do, with smart constructor
only :: One only = undefined
As I've mentioned before, my favorite data type newtype One = One One does the same, and stays in Haskell 98. (And has the same weakness to seq: (`seq` ()) is perfectly strict (it's const undefined)). jcc