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

Maciej Marcin Piechotka uzytkownik2 at gmail.com
Fri Dec 23 01:06:30 CET 2011


On Fri, 2011-12-23 at 01:29 +0400, MigMit wrote:
> Отправлено с iPad
> 
> 22.12.2011, в 23:56, Conor McBride <conor at strictlypositive.org>
> написал(а):
> 
> > I'd be glad if "pure" meant "total", but
> > partiality were an effect supported by the run-time system. Then we
> > could choose to restrict ourselves, but we wouldn't be restricted by
> the
> > language.
> 
> I second that. Having a special "partiality" monad would be nice.
> However, I'm not certain as to how it would interact with recursion —
> if f is a total function, fix f could be (and almost certainly would
> be) a possibly undiefined value. So, fix should have type "(a -> a) ->
> Partial a"; that's OK, but implicit uses of fix (I mean let
> statements) would be quite different. 

IIRC in ML-derived languages there is difference between let and let
rec. All implicit fix can be changed into explicit so I imagine that:

let rec f x = x -- a -> Partial a
let g x = x -- a -> a

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111223/5d527a75/attachment.pgp>


More information about the Haskell-Cafe mailing list