[GHC] #1441: Evaluating undefined should return line number and
module of location of undefined
GHC
trac at galois.com
Sun Jun 24 17:29:45 EDT 2007
#1441: Evaluating undefined should return line number and module of location of
undefined
----------------------------------+-----------------------------------------
Reporter: iampure at gmail.com | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 6.8
Component: Compiler | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase:
Architecture: Unknown |
----------------------------------+-----------------------------------------
Changes (by igloo):
* milestone: => 6.8
Comment:
The problem is that it's hard to do in a non-adhoc fashion. You can't just
define
{{{
undefined :: a
undefined = "Undefined in " ++ magicIn ++ " at " ++ magicLocation
}}}
as that will just tell you something like "Undefined in undefined at
GHC.Base line 15".
You can hack it up with CPP's __LINE__, but that's a bit nasty.
It would be possible to have a Template Haskell function that you'd use
like
{{{
foo _ = $mkUndefined
}}}
except it doesn't look like we currently have a TH primitive to get the
splice lication.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1441>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list