|
Re: the impossible happened: msg#00107lang.haskell.glasgow.bugs
bulatz: > also it will be cool to have ability to add such annotations to my own > functions, smthg like: > > head (x:xs) = x > head [] = superError "head []" > > which will print: "Error: head [] in Module.hs:155" You can do this already with GHC.Base.assert (almost): > import GHC.Base (assert) > > f [] = assert False () > f x = () *Main> f [1,2] () *Main> f [] *** Exception: t.hs:3:7-12: Assertion failed At least you can get the line number. -- Don
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re[2]: the impossible happened, Bulat Ziganshin |
|---|---|
| Next by Date: | [ ghc-Bugs-807249 ] Instance match failure on openTypeKind, SourceForge.net |
| Previous by Thread: | Re[2]: the impossible happened, Bulat Ziganshin |
| Next by Thread: | Re[2]: the impossible happened, Bulat Ziganshin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |