#960: Lexical call site string
-----------------------------------+----------------------------------------
    Reporter:  [EMAIL PROTECTED]  |        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:  [EMAIL PROTECTED] => [EMAIL PROTECTED]
         [EMAIL PROTECTED]

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
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to