1. 15 Feb, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-02-15 16:41:25 by simonmar] · d1f0e6ab
      simonmar authored
      Fix test in findPackages
      d1f0e6ab
    • simonmar's avatar
      [project @ 2005-02-15 10:51:37 by simonmar] · d14916cb
      simonmar authored
      Change in semantics:
        - commands which only inspect the databse (list,describe,field)
          now take into account the user database unless --global is
          given.  This behaviour matches GHC, which also uses the user
          database by default.
        - However, commands which modify the database still use the
          global database, unless --user is given.
      
      Also, allow P-* to be given as a package identifier, which means
      "all versions of package P".
      d14916cb
  2. 14 Feb, 2005 1 commit
  3. 11 Feb, 2005 1 commit
  4. 10 Feb, 2005 1 commit
  5. 28 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-28 12:55:17 by simonmar] · 153b9cb9
      simonmar authored
      Rationalise the BUILD,HOST,TARGET defines.
      
      Recall that:
      
        - build is the platform we're building on
        - host is the platform we're running on
        - target is the platform we're generating code for
      
      The change is that now we take these definitions as applying from the
      point of view of the particular source code being built, rather than
      the point of view of the whole build tree.
      
      For example, in RTS and library code, we were previously testing the
      TARGET platform.  But under the new rule, the platform on which this
      code is going to run is the HOST platform.  TARGET only makes sense in
      the compiler sources.
      
      In practical terms, this means that the values of BUILD, HOST & TARGET
      may vary depending on which part of the build tree we are in.
      
      Actual changes:
      
       - new file: includes/ghcplatform.h contains platform defines for
         the RTS and library code.
      
       - new file: includes/ghcautoconf.h contains the autoconf settings
         only (HAVE_BLAH).  This is so that we can get hold of these
         settings independently of the platform defines when necessary
         (eg. in GHC).
      
       - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.
      
       - MachRegs.h, which is included into both the compiler and the RTS,
         now has to cope with the fact that it might need to test either
         _TARGET_ or _HOST_ depending on the context.
      
       - the compiler's Makefile now generates
           stage{1,2,3}/ghc_boot_platform.h
         which contains platform defines for the compiler.  These differ
         depending on the stage, of course: in stage2, the HOST is the
         TARGET of stage1.  This was wrong before.
      
       - The compiler doesn't get platform info from Config.hs any more.
         Previously it did (sometimes), but unless we want to generate
         a new Config.hs for each stage we can't do this.
      
       - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
         in CPP'd Haskell source.
      
       - ghcplatform.h defines *_TARGET_* for backwards compatibility
         (ghcplatform.h is included by ghcconfig.h, which is included by
         config.h, so code which still #includes config.h will get the TARGET
         settings as before).
      
       - The Users's Guide is updated to mention *_HOST_* rather than
         *_TARGET_*.
      
       - coding-style.html in the commentary now contains a section on
         platform defines.  There are further doc updates to come.
      
      Thanks to Wolfgang Thaller for pointing me in the right direction.
      153b9cb9
  6. 27 Jan, 2005 2 commits
    • simonpj's avatar
      [project @ 2005-01-27 12:16:51 by simonpj] · d1a59a92
      simonpj authored
      Fix handling of dependent packages without a version
      d1a59a92
    • simonpj's avatar
      [project @ 2005-01-27 10:44:00 by simonpj] · 508a505e
      simonpj authored
      --------------------------------------------
                Replace hi-boot files with hs-boot files
        	--------------------------------------------
      
      This major commit completely re-organises the way that recursive modules
      are dealt with.
      
        * It should have NO EFFECT if you do not use recursive modules
      
        * It is a BREAKING CHANGE if you do
      
      ====== Warning: .hi-file format has changed, so if you are
      ======		updating into an existing HEAD build, you'll
      ======		need to make clean and re-make
      
      
      The details:  [documentation still to be done]
      
      * Recursive loops are now broken with Foo.hs-boot (or Foo.lhs-boot),
        not Foo.hi-boot
      
      * An hs-boot files is a proper source file.  It is compiled just like
        a regular Haskell source file:
      	ghc Foo.hs		generates Foo.hi, Foo.o
      	ghc Foo.hs-boot		generates Foo.hi-boot, Foo.o-boot
      
      * hs-boot files are precisely a subset of Haskell. In particular:
      	- they have the same import, export, and scoping rules
      	- errors (such as kind errors) in hs-boot files are checked
        You do *not* need to mention the "original" name of something in
        an hs-boot file, any more than you do in any other Haskell module.
      
      * The Foo.hi-boot file generated by compiling Foo.hs-boot is a machine-
        generated interface file, in precisely the same format as Foo.hi
      
      * When compiling Foo.hs, its exports are checked for compatibility with
        Foo.hi-boot (previously generated by compiling Foo.hs-boot)
      
      * The dependency analyser (ghc -M) knows about Foo.hs-boot files, and
        generates appropriate dependencies.  For regular source files it
        generates
      	Foo.o : Foo.hs
      	Foo.o : Baz.hi		-- Foo.hs imports Baz
      	Foo.o : Bog.hi-boot	-- Foo.hs source-imports Bog
      
        For a hs-boot file it generates similar dependencies
      	Bog.o-boot : Bog.hs-boot
      	Bog.o-boot : Nib.hi	-- Bog.hs-boto imports Nib
      
      * ghc -M is also enhanced to use the compilation manager dependency
        chasing, so that
      	ghc -M Main
        will usually do the job.  No need to enumerate all the source files.
      
      * The -c flag is no longer a "compiler mode". It simply means "omit the
        link step", and synonymous with -no-link.
      508a505e
  7. 26 Jan, 2005 1 commit
  8. 21 Jan, 2005 1 commit
  9. 20 Jan, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-01-20 16:15:02 by simonmar] · f6072cc4
      simonmar authored
      ghc-pkg list: show hidden packages in parentheses
      f6072cc4
    • simonmar's avatar
      [project @ 2005-01-20 14:22:19 by simonmar] · c830ae13
      simonmar authored
      Fill in the haddock-interfaces and haddock-html fields in the
      package.conf files.
      
      To do this I had to make some changes:
      
        - haddock-interfaces requires the value of $(datadir).  We can't
          just plug this in, because $(datadir) might change at install-time
          (eg. a Windows installer can be placed anywhere, as can a Unix
          binary .tar.gz distribution).  The current trick is for the
          compiler to splice in the value of $libdir in package.conf at
          runtime.  So we could extend this mechanism and tell the compiler
          the value of $datadir via a command-line option, but that seems
          ugly.
      
          On Windows, $datadir==$libdir, so we don't need any changes:
          package.conf still uses $libdir, and a Windows installation is
          independent of its absolute location.  Even 'make install' on
          Windows should have this property.
      
          On Unix:
      	- for 'make install' and in-place execution, we just use
                absolute paths in package.conf
      
      	- for a binary dist, we generate a package.conf that refers
      	  to $libdir and $datadir, and splice in the values at
      	  install-time (distrib/Makefile-bin.in).
      
        - Also, I renamed $libdir to $topdir to more closely reflect its
          actual meaning.  This is somewhat malicious in that it will flush
          out all those clients using $libdir when they really shouldn't
          be :-)
      c830ae13
  10. 12 Jan, 2005 1 commit
  11. 10 Jan, 2005 2 commits
    • krasimir's avatar
      [project @ 2005-01-10 23:48:07 by krasimir] · 3410e077
      krasimir authored
      createDirectoryIfMissing is added to Compat.Directory and is used in ghc-pkg.
      The mingw32_HOST_OS is replaced with mingw32_TARGET_OS. I don't know why but
      prior the last commit the tool was working with mingw32_HOST_OS fine but not
      it isn't. Maybe I miss something. Simon, could you check whether the patch is
      fine?
      3410e077
    • simonmar's avatar
      [project @ 2005-01-10 12:34:21 by simonmar] · 038f8bb5
      simonmar authored
      Remove copied definitions for joinFileName, splitFileName:
      System.FilePath is in libghccompat now.
      038f8bb5
  12. 08 Jan, 2005 1 commit
    • krasimir's avatar
      [project @ 2005-01-08 16:37:09 by krasimir] · 2429d1be
      krasimir authored
      system is replaced with rawSystem. This allows to use path names with embeded
      spaces under Windows. This is the same story as with hsc2hs but ghc-pkg is
      used only with GHC, so the change will not affect other compilers.
      Cabal uses "Program Files" as default installation path and this manifests
      the bug.
      2429d1be
  13. 03 Dec, 2004 3 commits
  14. 26 Nov, 2004 2 commits
    • simonmar's avatar
      [project @ 2004-11-26 16:50:56 by simonmar] · 51ec1e6e
      simonmar authored
      unregister/describe: allow the package name to be given without the
      version, as long as it is unambiguous.
      
      Strange, I was sure I'd implemented expose/hide in here, but they're
      stubbed out.  Oh well.
      51ec1e6e
    • simonmar's avatar
      [project @ 2004-11-26 16:19:45 by simonmar] · ef5b4b14
      simonmar authored
      Further integration with the new package story.  GHC now supports
      pretty much everything in the package proposal.
      
        - GHC now works in terms of PackageIds (<pkg>-<version>) rather than
          just package names.  You can still specify package names without
          versions on the command line, as long as the name is unambiguous.
      
        - GHC understands hidden/exposed modules in a package, and will refuse
          to import a hidden module.  Also, the hidden/eposed status of packages
          is taken into account.
      
        - I had to remove the old package syntax from ghc-pkg, backwards
          compatibility isn't really practical.
      
        - All the package.conf.in files have been rewritten in the new syntax,
          and contain a complete list of modules in the package.  I've set all
          the versions to 1.0 for now - please check your package(s) and fix the
          version number & other info appropriately.
      
        - New options:
      
      	-hide-package P    sets the expose flag on package P to False
      	-ignore-package P  unregisters P for this compilation
      
      	For comparison, -package P sets the expose flag on package P
              to True, and also causes P to be linked in eagerly.
      
              -package-name is no longer officially supported.  Unofficially, it's
      	a synonym for -ignore-package, which has more or less the same effect
      	as -package-name used to.
      
      	Note that a package may be hidden and yet still be linked into
      	the program, by virtue of being a dependency of some other package.
      	To completely remove a package from the compiler's internal database,
              use -ignore-package.
      
      	The compiler will complain if any two packages in the
              transitive closure of exposed packages contain the same
              module.
      
      	You *must* use -ignore-package P when compiling modules for
              package P, if package P (or an older version of P) is already
              registered.  The compiler will helpfully complain if you don't.
      	The fptools build system does this.
      
         - Note: the Cabal library won't work yet.  It still thinks GHC uses
           the old package config syntax.
      
      Internal changes/cleanups:
      
         - The ModuleName type has gone away.  Modules are now just (a
           newtype of) FastStrings, and don't contain any package information.
           All the package-related knowledge is in DynFlags, which is passed
           down to where it is needed.
      
         - DynFlags manipulation has been cleaned up somewhat: there are no
           global variables holding DynFlags any more, instead the DynFlags
           are passed around properly.
      
         - There are a few less global variables in GHC.  Lots more are
           scheduled for removal.
      
         - -i is now a dynamic flag, as are all the package-related flags (but
           using them in {-# OPTIONS #-} is Officially Not Recommended).
      
         - make -j now appears to work under fptools/libraries/.  Probably
           wouldn't take much to get it working for a whole build.
      ef5b4b14
  15. 22 Nov, 2004 1 commit
  16. 11 Nov, 2004 2 commits
    • simonmar's avatar
      [project @ 2004-11-11 17:25:59 by simonmar] · c10be2db
      simonmar authored
      Restore compatibility with GHC 6.2
      c10be2db
    • simonmar's avatar
      [project @ 2004-11-11 16:07:14 by simonmar] · 9043701c
      simonmar authored
      The new ghc-pkg tool.
      
      So far, the new syntax is supported, and the format of the package
      definitions has changed to InstalledPackageInfo rather than the old
      PackageConfig type.  The format of the package.conf file is now
      [InstalledPackageInfo] (using show/read).
      
      We still support the old ghc-pkg command line syntax, and the old
      PackageConfig syntax for package definitions.  These are deprecated
      features, of course.
      
      Not much is done with the list of exposed/hidden modules, or versions
      (yet).
      9043701c
  17. 31 Aug, 2004 1 commit
  18. 25 Aug, 2004 1 commit
  19. 13 Aug, 2004 1 commit
  20. 12 Aug, 2004 1 commit
  21. 05 Aug, 2004 1 commit
  22. 05 May, 2004 1 commit
  23. 08 Mar, 2004 1 commit
  24. 11 Jan, 2004 1 commit
    • panne's avatar
      [project @ 2004-01-11 14:43:14 by panne] · e43235be
      panne authored
      Fixed the previous commit: All lists of Strings in package configuration files
      were split at commas to allow list-based variables, but this broke perfectly
      sensible things like
      
         ["-Wl,-rpath,/usr/lib/jvm-bridge/lib/"]
      
      into
      
         ["-Wl","-rpath","/usr/lib/jvm-bridge/lib/"]
      
      which is plainly wrong. Now we do this *only* when a variable occurs on its own,
      like:
      
         ["${deps}","foo"] => ["base","haskell98","network","foo"]
      
      I have slight doubts about this obscure feature, but Sigbjorn seems to want
      it...
      
      Merge to STABLE
      e43235be
  25. 01 Nov, 2003 1 commit
    • sof's avatar
      [project @ 2003-11-01 01:52:01 by sof] · a61ed6ae
      sof authored
      expandEnvVars.expandStrings: flatten the expanded strings so as to
      permit a substitution to expand into multiple elements of the final
      list.
      
      merge to stable.
      a61ed6ae
  26. 09 Sep, 2003 1 commit
  27. 08 Sep, 2003 1 commit
    • sof's avatar
      [project @ 2003-09-08 17:55:40 by sof] · 39ea6a04
      sof authored
      New option, -DNAME=VAL, for adding to the set of
      variables substituted for when processing a package
      description.
      
      (Needed to support Windows installers for GHC packages.)
      39ea6a04
  28. 17 Aug, 2003 1 commit
  29. 30 May, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-05-30 13:32:20 by simonmar] · be5d16a5
      simonmar authored
      Rename --list-packages-local to --list-local-packages, because it
      seems that having one long option which is a prefix of another doesn't
      work too well with GetOpt.
      be5d16a5
  30. 16 May, 2003 1 commit
  31. 25 Mar, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-03-25 16:50:18 by simonmar] · 5b4b4197
      simonmar authored
      Handle multiple config files correctly.  Now it is possible to specify
      a dependency on a package in another config file, and --list-packages
      lists all the packages in each file.
      
      The last file mentioned on the command line is the one to which
      updates are applied, packages are added, etc.
      5b4b4197
  32. 29 Oct, 2002 1 commit