Re:Defer Haskell type errors to runtime: new GHC 7.6 develop...
by olalonde on Saturday May 19, 2012 @02:20PM
(#3996591)
Sorry for the stupid question but how is this even possible for a compiled language? Will the program simply crash without an error message?
[ Parent
| on HN ]
Re:Defer Haskell type errors to runtime: new GHC 7.6 develop...
by gtani on Saturday May 19, 2012 @04:26PM
(#3996969)
Perfectly valid question. This explains the practice in incremental dev or refactoring of using "undefined" in stub/placeholder functions to get the type signatures but not function bodies in:
http://www.fatvat.co.uk/2009/09/generating-text-in-haskell.h...
Also: 2 longish threads about this
http://www.reddit.com/r/programming/duplicates/tjeg3/haskell...
Re:Defer Haskell type errors to runtime: new GHC 7.6 develop...
by Chirono on Saturday May 19, 2012 @02:34PM
(#3996629)
Instead of failing with an error at compile time, it will emit code that, if run, will fail with a 'type error' at run time.
Re:Defer Haskell type errors to runtime: new GHC 7.6 develop...
by strager on Saturday May 19, 2012 @02:35PM
(#3996631)
In short, compiled type errors are replaced with `assert(0);` (which doesn't return).
Re:Defer Haskell type errors to runtime: new GHC 7.6 develop...
by IsTom on Saturday May 19, 2012 @02:31PM
(#3996620)
It will simply crash with an error message.