Undocumented(?) magic "this" package-id in PackageImports

Simon Marlow marlowsd at gmail.com
Tue Nov 13 13:34:34 CET 2012


Please submit a bug (ideally with a patch!).  It should be documented.

However, note that we don't really like people to use PackageImports.
It's not a carefully designed feature, we only hacked it in so we could 
build the base-3 wrapper package a while ago. It could well change in 
the future.

Cheers,
	Simon

On 13/11/2012 12:30, Herbert Valerio Riedel wrote:
> Hello Simon,
>
> I just found out that in combination with the PackageImports extension
> there's a special module name "this" which according to [1] always
> refers to the current package. But I couldn't find this rather useful
> feature mentioned in the GHC 7.6.1 Manual PackageImports section[2]. Has
> this been omitted on purpose from the documentation?
>
> Cheers,
>    hvr
>
>   [1]: https://github.com/ghc/ghc/commit/436a5fdbe0c9a466569abf1d501a6018aaa3e49e
>   [2]: http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#package-imports




More information about the Glasgow-haskell-users mailing list