[Haskell-cafe] Python is lazier than Haskell

Jason Dusek jason.dusek at gmail.com
Fri Apr 29 07:22:47 CEST 2011


On Thu, Apr 28, 2011 at 07:19, Gracjan Polak <gracjanpolak at gmail.com> wrote:
> Sometimes I wish for a -fphp flag that would turn some type
> errors into warnings.
> [...]
> GHC could substitute 'y = error "Couldn't match expected type
> `[a]' against inferred type `()'"' and compile anyway.

  PHP doesn't really do dynamic type errors, though. To be more
  like PHP, the -fphp flag should surely coerce y to a list,
  using read and show if possible and otherwise using
  unsafeCoerce.

--
Jason Dusek
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments



More information about the Haskell-Cafe mailing list