Re: [Haskell-cafe] how to check thunk

2012-07-02 Thread Chaddaï Fouché
On Mon, Jul 2, 2012 at 7:54 AM, Kazu Yamamoto k...@iij.ad.jp wrote: Hello, vacuum allow that and much more though I don't know if it still works correctly on GHC 7.4. Anyway your isThunk is isThunk a = fmap GHC.Vacuum.ClosureType.isThunk GHC.Vacuum.closureType Great. I confirmed that this

Re: [Haskell-cafe] how to check thunk

2012-07-02 Thread Erik Hesselink
There is also the 'isevaluated' package (which depends on vacuum, but seems to do something more involved than your code). Erik On Mon, Jul 2, 2012 at 7:40 AM, Chaddaï Fouché chaddai.fou...@gmail.com wrote: On Mon, Jul 2, 2012 at 5:29 AM, Kazu Yamamoto k...@iij.ad.jp wrote: Hello, Are there

Re: [Haskell-cafe] how to check thunk

2012-07-02 Thread Austin Seipp
Hi, Just a word of note: a while back, I decided to take up maintainership of Vacuum and some associated stuff. In the process of doing this, I realized that the ClosureType code in vacuum may not accurately model reality depending on the GHC version. In particular, the definition of ClosureType

Re: [Haskell-cafe] how to check thunk

2012-07-02 Thread Rico Moorman
Dear Austin, Wouldn't it be a good idea to link the Vacuum version-number to the related ghc version number directly as it's functionality is directly tied to the ghc version anyway. vacuum 7.4 for ghc 7.4; vacuum 7.2 for ghc 7.2 aso. Best regards, Rico Moorman On Mon, Jul 2, 2012 at 12:04

Re: [Haskell-cafe] how to check thunk

2012-07-02 Thread Ivan Lazar Miljenovic
On 2 July 2012 20:04, Austin Seipp mad@gmail.com wrote: Hi, Just a word of note: a while back, I decided to take up maintainership of Vacuum and some associated stuff. In the process of doing this, I realized that the ClosureType code in vacuum may not accurately model reality depending

Re: [Haskell-cafe] how to check thunk

2012-07-02 Thread Austin Seipp
Hi Rico, This is certainly a possibility I have not considered. However, I still think the Right Way Forward is to ultimately deprecate the current package as quickly as possible and move its outstanding functionality into GHC. Vacuum is still undeniably useful for older GHCs, so I would be

Re: [Haskell-cafe] how to check thunk

2012-07-02 Thread Austin Seipp
On Mon, Jul 2, 2012 at 6:56 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: If you've taken over maintainership, should we remove it from haskell-pkg-janitors? I haven't removed it from haskell-pkg-janitors because I haven't made a release and the current package points there as the

Re: [Haskell-cafe] how to check thunk

2012-07-02 Thread Ivan Lazar Miljenovic
On 2 July 2012 22:17, Austin Seipp mad@gmail.com wrote: On Mon, Jul 2, 2012 at 6:56 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: If you've taken over maintainership, should we remove it from haskell-pkg-janitors? I haven't removed it from haskell-pkg-janitors because I

Re: [Haskell-cafe] how to check thunk

2012-07-02 Thread Austin Seipp
On Mon, Jul 2, 2012 at 7:33 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: I'm OK with BSD for this.  And I understand that copy-pasting boilerplate could mess things up ;-) I think I'll change it then, thanks :) There is a 2999.13.* series of graphviz out, I haven't actually

Re: [Haskell-cafe] how to check thunk

2012-07-02 Thread Joachim Breitner
Hi, another related package seems to be my ghc-heap-view package, which is a bit lower level than vaccuum, as it does not try to build a consistent graph image but rather be more verbose about the heap objects, in particular about closures referenced by thunks:

[Haskell-cafe] how to check thunk

2012-07-01 Thread 山本和彦
Hello, Are there any ways to see if a value is a thunk or memorized? I would like to have a function like: isThunk :: a - IO Bool I'm implementing some data structures described in Purely Functional Data Structures and want to check my implementation is correct. E.g.

Re: [Haskell-cafe] how to check thunk

2012-07-01 Thread Chaddaï Fouché
On Mon, Jul 2, 2012 at 5:29 AM, Kazu Yamamoto k...@iij.ad.jp wrote: Hello, Are there any ways to see if a value is a thunk or memorized? I would like to have a function like: isThunk :: a - IO Bool vacuum allow that and much more though I don't know if it still works correctly on GHC 7.4.

Re: [Haskell-cafe] how to check thunk

2012-07-01 Thread 山本和彦
Hello, vacuum allow that and much more though I don't know if it still works correctly on GHC 7.4. Anyway your isThunk is isThunk a = fmap GHC.Vacuum.ClosureType.isThunk GHC.Vacuum.closureType Great. I confirmed that this works with GHC 7.4. # I removed the a parameter. Thank you very