------------------------------------------------------------
-= 1.0 =-

* Write semantic checker for package description file.  start w/
   sanity checker.  give error if buildInfo field given when no
   exposed or hidden modules for a library.  Check for required
   fields.

* Decide on interface
** Which fields are required, which targets required.
** which Distribution.* things won't change?
** document

* add withGreencard=

* Fix up sdist? hide sdist? bdist?
** if there's a flag, --include-preprocessed-sources (or something
   better) run the preprocessing phase and include both the
   unpreprocessed and the preprocessed sources in the source tarball?
** Better way to find 'tar'; is there a library? what does darcs do?

* do we have to run configure before clean?

* Preprocessors
** chain of preprocessors
** what other preprocessors can't unlit?

* Hugs - look for "FIX (HUGS)"

* Haddock
  - should process hidden modules as well as exposed ones.  The hidden
    modules might contain entities that are re-exported by an exposed
    module.  Hidden modules should use the #hide haddock directive.

  - if GHC is present and hscpp is not, we can use 'ghc -E -cpp'.  This
    also unlits.

  - haddock should be passed the names of the interface files for the
    dependent packages (gotten from haddock_interfaces field of the
    dependent packages, query ghc-pkg).

  - we should install the haddock interface, and fill in the location
    in haddock_interfaces.  Similarly for the HTML, and haddock_html.

* grep for "FIX"

* Parsing
** Allow quoting in the options fields, to allow things like
  -f"something with spaces"
** Instead of freaking out on unknown fields, the parser should return
   a list of those unknown fields so a warning can be printed. Or not.

* Doc
** do comments have to start in the first column?
** clarify relationship between exposed-modules and modules, etc.
** add preprocessor explanation (see bottom of this TODO).
** Fix example for angela, expose Data.Set, etc, not A, B, etc.b
** add information about executable stanzas
** elimintate need for cpphs in haddock makefile rule.
** add info about deb packages to web page at least check out the
   manpage for dh_haskell, section "How to package a haskell library"

* Misc
** HC-PKG (see "Depends on HC-PKG" below)
** add more layered tools to appendix?
** make reference to "layered tools" appendix where approprote
** integrate hscpp, use it for preprocessing step.
** SDist for windows machines, or machines without tar.
** add sanity checking command?

* testing
** find a real test case that uses preprocessors
** add a make target or command for tests we know will fail?
** setup test suite to run on --push?
** redirect non-hunit outputs to a file?
** test / port code for Hugs
** error cases for parsing command-line args
** reading & writing configuration-dropping
** use-cases based on SimonPJ's doc
** discovering the location of the given flavor of compiler and pkg tool

------------------------------------------------------------
-= Future Releases =-

* Depends on HC-PKG
** hugs-pkg
** register for hugs
** configure: check for presence of build dependencies

* NHC Support
** look carefully at "rawSystem" and error handing stuff for nhc.
** add install target for nhc
** add information for compiling w/ nhc
** nhc-pkg (see old package manager code)
** register

* Hugs
- no way to tell Hugs to turn packages on or off
- no register / unregister for hugs

* Misc
** ./Setup.lhs bdist
** Reorganize compiler dependent code into Distribution.Compiler.*
** API Versioning? Libtool-style or just a major number?
** Extensions
- complain if their use makes the code non-portable?
-- but what does this mean? ghc & hugs?

** "collections / distributions, etc" multiple cabal packages in one package
** It would be useful to have alternatives in dependencies, e.g. HGL
   could depend on X11 | Win32.

** sanity checking tool for configuration; are all the .hs files
   included, etc.

** create a (native?) zlib library?

** sign flag?

** for fields like allModules, allow user to specify "Foo.Bar.*" or
   something to indicate all haskell modules under that?

** Get function from hmake that creates a directory based on arch.

** ./Setup test
- this may be something that's easy to break off and give to someone
   else.
- give to John Goerzen?

** writePersistBuildConfig robustify + diagnostics
** elaborate command-line help text
** configure should check for 'ar' args + properties (see fptools/aclocal.m4)
** most commands should accept a -v flag to show command lines?
** configure should check version of compiler

** hat support
** per-system source database
** rebuild for new compiler
** helium
** hbc


------------------------------------------------------------

* Orthogonal (layered?) tools

** visual studio support

** hackage

** downloadable public database of packages (wget filename;tar xf
   filename;cd filename;./setup install)

   NOTE: such an interface might be implemented w/ xml-rpc, which is
   there for Haskell now, though in general we'll probabliy want to be
   careful here about dependencies.

** debian package building (boilerplate) tool.  Other debian support
   w/ rebuild-all-packages?

------------------------------------------------------------
[1] Foo.y is a happy grammer which, when processed, will produce Foo.hs.

The description file should include the module Foo.

./setup sdist (source distribution): Include Foo.y, not Foo.hs.  Maybe
we could add a flag to include Foo.hs as well.  This makes sense for
some preprocessors and not for others, but I'm wary of including too
much preprocessor-specific behavior.

./setup clean: Removes Foo.hs if Foo.y exists.

./setup build: Preprocesses Foo.y to Create Foo.hs before any
compilation.

The issue with cpp is that we can't go by extensions as we do with the
rest of the preprocessors... There is a function in HMake which tests
to see if a file needs to be cpp'd, so we can employ that.  I think
we'll probably have to just treat cpp a little differently from the
others, unfortunitely, and I haven't gotten around to it.
