Re: GMP.framework
Christian Maeder schrieb: It seems our GMP.framework is only suited for Powerpc. I'll look after it. Thanks for your hints and sorry for the inconveniences. (Meanwhile you could try to get the GMP.framework for intel macs from elsewhere.) http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/mac/GMP.framework.zip http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/mac/GMP-framework.zip is a working framework for Intel and Powerpc. C. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: GNUreadline.framework and GMP.framework
Christian Maeder schrieb: P.S. There is also a problem with the GNUreadline.framework in your home directory on Powerpcs only. When you link your own binaries you have to add -optl-F$(HOME)/Library/Frameworks -optl-framework -optlGNUreadline to ghc's command line. It's best to install the frameworks globally under /Library/Frameworks. If the are installed locally in your home directory, they are not found (without additional options like above) during link time. And this applies to Intel and Powerpc. (Frameworks in your home directory are found during execution, though.) Maybe someone else knows how to set the Framework Search Path locally for linking? Cheers C. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
capabilities of GHC API
Hello, I think what I'm trying to do is too ambitious, but I thought I would ask to see if it is possible. It seems like there is no easy way to do it, given what I've seen of the GHC API. I would like to have a function, say it is called this, which has the following effect in ghci let n = 2 in this n 2 In other words, it captures all the variables which are in scope, and adds them to the GHCi environment. Somebody helpful will probably say But you can just write 'let n = 2'!, but that is not the aim. There are several aims. One is to be able to look at the variables inside a function which one is trying to debug, then inserting 'this' will cause them to be in scope, I think that would be useful. A more important aim is to be able to use existentially quantified variables easily. Currently I can do: reifyIntegral 5 (\n - print $ reflectNum n) 5 but how can I get GHCi to have an 'n' binding which is inside the function? Clearly just returning 'n' will not work: reifyIntegral 5 id interactive:1:0: Inferred type is less polymorphic than expected ... This is what I am thinking of doing, but as I said it seems ambitious. There are several easier things one could think of: let n = 2 in bind n n n 2 If it were possible to add bindings to the GHCi bindings list, then this would be easy. Is it possible? The documentation doesn't seem to mention such a capability. Also, probably another useful feature would be to combine 'this' with something in the IO monad: withProgName blah thisIO getProgName blah So, are these things currently possible? Planned? Have the functions I describe been implemented already? I think there is a GHCi debugger in the works, so maybe functionality like this will be part of it, I didn't want to start something on my own if that is the case... Many thanks, Frederik -- http://ofb.net/~frederik/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: capabilities of GHC API
On 5/19/07, Frederik Eaton [EMAIL PROTECTED] wrote: Hello, I think what I'm trying to do is too ambitious, but I thought I would ask to see if it is possible. It seems like there is no easy way to do it, given what I've seen of the GHC API. I would like to have a function, say it is called this, which has the following effect in ghci let n = 2 in this n 2 In other words, it captures all the variables which are in scope, and adds them to the GHCi environment. Somebody helpful will probably say But you can just write 'let n = 2'!, but that is not the aim. There are several aims. One is to be able to look at the variables inside a function which one is trying to debug, then inserting 'this' will cause them to be in scope, I think that would be useful. A more important aim is to be able to use existentially quantified variables easily. Currently I can do: reifyIntegral 5 (\n - print $ reflectNum n) 5 but how can I get GHCi to have an 'n' binding which is inside the function? Clearly just returning 'n' will not work: reifyIntegral 5 id interactive:1:0: Inferred type is less polymorphic than expected ... This is what I am thinking of doing, but as I said it seems ambitious. There are several easier things one could think of: let n = 2 in bind n n n 2 If it were possible to add bindings to the GHCi bindings list, then this would be easy. Is it possible? The documentation doesn't seem to mention such a capability. Also, probably another useful feature would be to combine 'this' with something in the IO monad: withProgName blah thisIO getProgName blah So, are these things currently possible? Planned? Have the functions I describe been implemented already? I think there is a GHCi debugger in the works, so maybe functionality like this will be part of it, I didn't want to start something on my own if that is the case... This is pretty much that the GHCi debugger does expect it restores the environment at the end of a breakpoint. If you have GHC-6.6 or greater, try: let n = 2 in GHC.Base.breakpoint () -- Cheers, Lemmih ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: Wanted: warning option for usages of unary minus
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John Meacham wrote: another option would be to only count it as a negative if there is a non-identifier character preceeding it. A little ugly. but still better than the current situation IMHO. I think Ghc's lexer Alex can do this although this functionality is not used anywhere else... it seems a little out of character. I don't really like that (3-2)-1 would be parsed differently because it's a parenthesized expression; consider 3^2-1 vs. (3^2)-1 ... Isaac -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGTwMCHgcxvIWYTTURAkzHAKCdekuA6rUw4QcnIV3Qq9WJ8ZkljQCfTH5G c0jDDrAGLtBVZ4WVRdTDJu8= =1BDf -END PGP SIGNATURE- ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: capabilities of GHC API
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 ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: capabilities of GHC API
On Sat, May 19, 2007 at 06:09:45PM +0100, Frederik Eaton wrote: 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 You forgot the () at the end. (And btw, ghci's autoprinting works by wrapping your code in print) Stefan ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
integrating ghc as editor's code tools
I´m trying to integrated ghc and Crimson editor (Windows), to get a small and efficient package. I found how to integrate ghc and JCreator, but the package has more than 100MB. I configured Crimson's Tools - Preferences-User Tools with this values: Menu text: GHC Command: C:\ghc\ghc-6.6.1\bin\ghc.exe (or C:\ghc\ghc-6.6.1\bin\ghci).exe Argument: $(FileName) Initial Dir: $[FileDir] Hot Key: no one and I have choose Capture Output. After wite and save a test file, I called the ghc tool. the answe I get was: -with ghc: -- Capture Output -- C:\ghc\ghc-6.6.1\bin\ghc.exe FirstTeste.hs Terminated with exit code 0. with ghci: -- Capture Output -- C:\ghc\ghc-6.6.1\bin\ghci.exe FirstTeste.hs Terminated with exit code 0. How can I solve this problem? If anyone has a better solution (another editor), I would like to know it. thanks in advance, Paulo Henrique ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: capabilities of GHC API
On 5/19/07, Frederik Eaton [EMAIL PROTECTED] wrote: 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? Ah, yes. I should really pay more attention. -- Cheers, Lemmih ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users