capabilities of GHC API

Frederik Eaton frederik at a5.repetae.net
Sat May 19 13:09:45 EDT 2007


> This is pretty much that the GHCi debugger does expect it restores 
> the
> environment at the end of a breakpoint.

I can't make any sense of what you wrote. Did you mean "what" instead
of "that", and "except" instead of "expect"? In that case, it is good
news to hear that it has already been done.

> 
> If you have GHC-6.6 or greater, try: let n = 2 in GHC.Base.breakpoint 
> ()

Interesting, apparently that statement also contains the word 'print':  :)

$ ghci                                                          fly:~
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.6.20070420, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.
> let n = 2 in GHC.Base.breakpoint 

<interactive>:1:0:
    No instance for (Show (a -> a))
      arising from use of `print' at <interactive>:1:0-31
    Possible fix: add an instance declaration for (Show (a -> a))
    In the expression: print it
    In a 'do' expression: print it

--------
Frederik


More information about the Glasgow-haskell-users mailing list