dump-core 0.1.3.1 → 0.1.3.2
raw patch · 3 files changed
+18/−6 lines, 3 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- ChangeLog.md +3/−0
- DumpCore.hs +13/−3
- dump-core.cabal +2/−3
ChangeLog.md view
@@ -1,5 +1,8 @@ # Revision history for dump-core +## 0.1.3.2+ * Changes to work with more recent GHC+ ## 0.1.3.0 * First version. Released on an unsuspecting world.
DumpCore.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE CPP #-} module DumpCore(plugin) where import GhcPlugins hiding (TB)@@ -30,8 +31,7 @@ install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo] install opts todo =- do reinitializeGlobals- return (todo ++ [ CoreDoPluginPass "DumpCore" (liftIO . dumpIn opts) ])+ return (todo ++ [ CoreDoPluginPass "DumpCore" (liftIO . dumpIn opts) ]) dumpIn :: [CommandLineOption] -> ModGuts -> IO ModGuts dumpIn opts guts =@@ -360,14 +360,24 @@ MachChar c -> mk "char" (show c) MachStr bs -> mk "string" (show bs) MachNullAddr -> mk "null" ""+#if __GLASGOW_HASKELL__ < 806 MachInt i -> mk "int" (show i) MachInt64 i -> mk "int64" (show i) MachWord i -> mk "word" (show i) MachWord64 i -> mk "word64" (show i)+ LitInteger i _t -> mk "integer" (show i)+#else+ LitNumber num_type i _t ->+ case num_type of+ LitNumInteger -> mk "integer" (show i)+ LitNumNatural -> mk "natural" (show i)+ LitNumInt -> mk "int" (show i)+ LitNumInt64 -> mk "int64" (show i)+ LitNumWord -> mk "word" (show i)+#endif MachFloat r -> mk "float" (show r) MachDouble r -> mk "double" (show r) MachLabel fs _ _ -> mk "label" (show fs)- LitInteger i _t -> mk "integer" (show i) where mk :: Text -> String -> JS.Value
dump-core.cabal view
@@ -1,5 +1,5 @@ name: dump-core-version: 0.1.3.1+version: 0.1.3.2 synopsis: A plug-in for rendering GHC core description: This is a GHC plugin that renders the Core generated by GHC into JSON and also HTML, for easy inspection.@@ -26,11 +26,10 @@ library exposed-modules: DumpCore other-modules: Paths_dump_core- build-depends: base >=4.9 && <4.11, ghc, text, aeson, bytestring,+ build-depends: base >=4.9 && <4.13, ghc, text, aeson, bytestring, containers, monadLib, directory, filepath default-language: Haskell2010 source-repository head type: git location: git://github.com/yav/dump-core-