cvs commit: fptools/libraries/Cabal/Distribution Compiler.hs Make.hs Setup.hs Simple.hs fptools/libraries/Cabal/Distribution/Simple Build.hs Configure.hs Install.hs LocalBuildInfo.hs Register.hs SrcDist.hs Utils.hs fptools/libraries/Cabal/Language/Haskell ...

Isaac Jones ijones at syntaxpolice.org
Mon Jan 16 01:52:53 EST 2006


ijones      2006/01/15 22:52:53 PST

  Modified files:
    libraries/Cabal/Distribution Compiler.hs Make.hs Setup.hs 
                                 Simple.hs 
    libraries/Cabal/Distribution/Simple Build.hs Configure.hs 
                                        Install.hs 
                                        LocalBuildInfo.hs 
                                        Register.hs SrcDist.hs 
                                        Utils.hs 
    libraries/Cabal/Language/Haskell Extension.hs 
    libraries/Cabal/tests/withHooks Setup.lhs 
  Log:
  I modified the hooks interface quite a bit, again.  There's good news
  and bad news about this.  The good news is that it's cleaned up and
  should be easier to maintain and to avoid future modifications.  The
  bad news is that this change itself will break stuff, of course.
  
  If you have any trouble building your Setup scripts, please let me
  know.  I really think that it was best to bite the bullet right now in
  one big go instead of down the road with lots of little changes.  I
  have a lot more confidence in the hooks interface, and I don't
  actually expect that it'll change as often.
  
  I made the types more consistent, and made sure there are accessor
  functions on each of the Flags types so that if the flags types change
  in the future, it shouldn't break lots of code.
  
  Another piece of good / bad news is that I decided not to get rid of
  the pre & post hooks.  They are nice for convenience and it wouldn't
  be nearly so easy to write hooks without them.
  
  That's bad because the interface to hooks is still pretty big, which
  means that there's more likelihood that it'll change in the future.
  
  Another weakness in the Hooks interface is that with command hooks
  (like sDistHook) it's tempting to add parameters to them; basically
  the stuff that we compute between the preSDist and sDist hook.  I
  removed such params and have their values computed elsewhere.
  
  Cabal hackers, please avoid adding parameters to these command hooks
  if at all possible in order to keep the interface steady.  If you need
  to compute a value to pass to these functions, compute it in the
  function and / or make it available as a function that someone
  crafting hooks can use as well, or consider whether it belongs in one
  of the parameters already being passed to the hooks,
  PackageDescription, LocalBuildInfo, UserHooks, Flags.
  
  Revision  Changes    Path
  1.6       +1 -0      fptools/libraries/Cabal/Distribution/Compiler.hs
  1.24      +4 -4      fptools/libraries/Cabal/Distribution/Make.hs
  1.50      +112 -85   fptools/libraries/Cabal/Distribution/Setup.hs
  1.92      +80 -104   fptools/libraries/Cabal/Distribution/Simple.hs
  1.77      +3 -3      fptools/libraries/Cabal/Distribution/Simple/Build.hs
  1.61      +1 -1      fptools/libraries/Cabal/Distribution/Simple/Configure.hs
  1.55      +3 -2      fptools/libraries/Cabal/Distribution/Simple/Install.hs
  1.20      +1 -0      fptools/libraries/Cabal/Distribution/Simple/LocalBuildInfo.hs
  1.39      +3 -4      fptools/libraries/Cabal/Distribution/Simple/Register.hs
  1.30      +5 -5      fptools/libraries/Cabal/Distribution/Simple/SrcDist.hs
  1.48      +14 -2     fptools/libraries/Cabal/Distribution/Simple/Utils.hs
  1.3       +1 -0      fptools/libraries/Cabal/Language/Haskell/Extension.hs
  1.7       +5 -4      fptools/libraries/Cabal/tests/withHooks/Setup.lhs


More information about the Cvs-libraries mailing list