haskell - tyConPackage changed from ghc-7.8 to ghc-7.10? -
this ghci session
import data.map import data.typeable tyconpackage $ typereptycon $ typeof $ fromlist [(1,2)]
gives
in ghc-7.8.4: "containers-0.5.5.1" in ghc-7.10.1: "conta_47ajk3tbda43dfwyef3ohq"
the new behaviour breaks application, use string programmatically construct documentation urls (pointing html built standalone-haddock)
is there way old behaviour? work-around?
--
i did more research , found (ghc/compiler/basictypes/module.lhs):
7.8.4 (compiler/typecheck/tcgenderiv builds instance and) uses
-- | string identifying package, including version: e.g. parsec-1.0 newtype packageid = pid faststring deriving( eq, typeable )
7.10.1 (compiler/desugar/dsbinds constructs evidence(?) and) uses
-- | string uniquely identifies package. wired-in packages, -- package name, user compiled packages, hash. newtype packagekey = pid faststring deriving( eq, typeable )
well, "uniquely identify" nice, ...
--
on other hand, ghci somehow knows (ungarbled) package name:
import data.map ; :i map data map k = containers-0.5.5.1:data.map.base.bin ...
but that's @ compile time - still hope info available @ runtime someplace.
Comments
Post a Comment