Herbert Valerio Riedel | 13 Nov 13:30 2012
Picon

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

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
Simon Marlow | 13 Nov 13:34 2012
Picon

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

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
Herbert Valerio Riedel | 13 Nov 13:54 2012
Picon

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

Simon Marlow <marlowsd <at> gmail.com> writes:

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

done -> http://hackage.haskell.org/trac/ghc/ticket/7409

Gmane