Fix Closure Type table
authorJoachim Breitner <mail@joachim-breitner.de>
Tue, 7 Oct 2014 11:11:34 +0000 (11:11 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Tue, 7 Oct 2014 11:11:34 +0000 (11:11 +0000)
cbits/HeapView.c
ghc-heap-view.cabal
src/GHC/HeapView.hs

index 24cfaa3..ccfb122 100644 (file)
@@ -62,8 +62,7 @@ char *gtc_heap_view_closure_type_names[] = {
  [RET_BCO]               = "RET_BCO",
  [RET_SMALL]             = "RET_SMALL",
  [RET_BIG]               = "RET_BIG",
-#ifdef GHC_7_7
-#else
+#ifndef GHC_7_7
  [RET_DYN]               = "RET_DYN",
 #endif
  [RET_FUN]               = "RET_FUN",
@@ -75,6 +74,9 @@ char *gtc_heap_view_closure_type_names[] = {
  [BLOCKING_QUEUE]        = "BLOCKING_QUEUE",
  [MVAR_CLEAN]            = "MVAR_CLEAN",
  [MVAR_DIRTY]            = "MVAR_DIRTY",
+#ifdef GHC_7_7
+ [TVAR]                  = "TVAR",
+#endif
  [ARR_WORDS]             = "ARR_WORDS",
  [MUT_ARR_PTRS_CLEAN]    = "MUT_ARR_PTRS_CLEAN",
  [MUT_ARR_PTRS_DIRTY]    = "MUT_ARR_PTRS_DIRTY",
index cebb4d8..e545a61 100644 (file)
@@ -72,11 +72,12 @@ Library
   if flag(ghc_7_7)
     build-depends: ghc >= 7.7
     cc-options: -DGHC_7_7
+    cpp-options: -DGHC_7_7
   else
     build-depends: ghc < 7.7
   C-Sources: cbits/HeapView.c cbits/HeapViewPrim.cmm
   Hs-source-dirs: src/
-  Ghc-options: -Wall
+  Ghc-options: -Wall -dcmm-lint
 
   if flag(prim-supports-any)
     cpp-options: -DPRIM_SUPPORTS_ANY
index b7055e6..0e9ef44 100644 (file)
@@ -241,7 +241,9 @@ data ClosureType =
        | RET_BCO
        | RET_SMALL
        | RET_BIG
+#ifndef GHC_7_7
        | RET_DYN
+#endif
        | RET_FUN
        | UPDATE_FRAME
        | CATCH_FRAME
@@ -251,6 +253,9 @@ data ClosureType =
        | BLACKHOLE
        | MVAR_CLEAN
        | MVAR_DIRTY
+#ifdef GHC_7_7
+       | TVAR
+#endif
        | ARR_WORDS
        | MUT_ARR_PTRS_CLEAN
        | MUT_ARR_PTRS_DIRTY