Handle breakpoint jumps while splicing TH functions in ghci
authorPepe Iborra <mnislaih@gmail.com>
Sun, 10 Dec 2006 22:24:24 +0000 (22:24 +0000)
committerPepe Iborra <mnislaih@gmail.com>
Sun, 10 Dec 2006 22:24:24 +0000 (22:24 +0000)
commit1df34b328128f4949ef812c8be952ab1f85df7ac
treed9dc828123d537d9ffdc2a2df60115d12f0a26dc
parent376101055fb111ebd52b5ef1fb76e00334b44304
Handle breakpoint jumps while splicing TH functions in ghci

The dynamic linker has been modified so that it won't panic if one of the breakpointJump functions fails to resolve.
Now, if the dynamic linker fails to find a HValue for a Name, before looking for a static symbol it will ask to

Breakpoints.lookupBogusBreakpointVal :: Name -> Maybe HValue

which returns an identity function for the Jump names or Nothing else.

A TH function might contain a call to a breakpoint function. So if it is compiled to bytecodes, the breakpoints will be desugared to 'jumps'. Whenever this code is spliced, the linker will fail to find the jumpfunctions unless there is a default.
compiler/ghci/ByteCodeLink.lhs
compiler/main/Breakpoints.hs