#5469: Reorganisation of exports in template-haskell library
---------------------------------+------------------------------------------
Reporter: reinerp | Owner:
Type: task | Status: new
Priority: normal | Component: Template Haskell
Version: 7.2.1 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
When working on documentation for the template-haskell library (see
#4429), I noticed a few inconveniences with the library. Here are some
changes I would suggest:
* I think {{{runQ}}} should not be exported from
{{{Language.Haskell.TH}}} -- rather, it should only be exported from
{{{Language.Haskell.TH.Syntax.Internals}}}. It should only be used by GHC
internals or debugging, and not for ordinary use of template haskell
* I think the "Internal functions" in {{{Language.Haskell.TH.Syntax}}}
should be moved to {{{Language.Haskell.TH.Syntax.Internals}}}.
* it is quite annoying that {{{Language.Haskell.TH}}} manually reexports
almost all functions from {{{Language.Haskell.TH.Syntax}}} and indeed all
functions from {{{Language.Haskell.TH.Lib}}}. I would like to turn these
name-by-name exports into module exports like so:
{{{
module Language.Haskell.TH(
module Language.Haskell.TH.Syntax,
module Language.Haskell.TH.Lib,
-- * Pretty-printing
...
)
}}}
There are a few reasons I would like to do this last change:
* it is a constant effort to keep the export list of
{{{Language.Haskell.TH}}} synchronised with those of
{{{Language.Haskell.TH.Syntax}}} and {{{Language.Haskell.TH.Lib}}}
* I've added a number of notes (like the {{{$unresolvedinfix}}} note I
added earlier) to {{{Language.Haskell.TH.Syntax}}}, and it is not possible
to also export these from {{{Language.Haskell.TH}}} without copy-pasting
the notes. This means that the documentation of
{{{Language.Haskell.TH.Syntax}}} is ''better'' than the documentation for
{{{Language.Haskell.TH}}}, so users will eventually have to look there.
Why not just link them there directly?
I'm not sure what the correct place is for a discussion like this of
library design, so I posted here.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5469>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs