[GHC] #960: Lexical call site string
GHC
trac at galois.com
Tue Jul 3 08:16:20 EDT 2007
#960: Lexical call site string
-----------------------------------+----------------------------------------
Reporter: paul at cogito.org.uk | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: _|_
Component: Compiler | Version: 6.6
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase: N/A
Architecture: Unknown |
-----------------------------------+----------------------------------------
Changes (by claus):
* cc: ndmitchell at gmail.com => claus.reinke at talk21.com
ndmitchell at gmail.com
Comment:
since hpc and ghci debugger are now live, does that help with the src->src
transformations discussed above? see also
http://hackage.haskell.org/trac/ghc/wiki/ExplicitCallStack
btw, i think the call-stack problems are rooted in the haskell report's
translation of function definitions into case without regard to
exhaustiveness of the patterns: the translation converts partial functions
(which should fail at the call site) into pseudo-exhaustive functions
(which can now fail in the callee's code, due to the translation of case).
in spite of these more involved considerations, i'd also like to have a
simple way to get at the lexical call site, eg when simulating here-docs,
i currently use a hack like this to avoid hard-coding the current file
name:
{{{
thisFile = catchJust assertions (assert False undefined) getName
where getName msg = let (_:_:x:_) = reverse $ findIndices (==':') msg
in return $ take x msg
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/960>
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