1. 11 Dec, 2006 1 commit
  2. 10 Dec, 2006 2 commits
  3. 09 Dec, 2006 1 commit
  4. 01 Dec, 2006 1 commit
    • wolfgang.thaller@gmx.net's avatar
      Decouple -O from -fvia-C · 8971f720
      wolfgang.thaller@gmx.net authored
      Nowadays, there are situations where -fvia-C is definitely unwanted, such
      as when -fPIC is used on some platforms, so we do not want implicit -fvia-C
      any more.
      8971f720
  5. 29 Nov, 2006 1 commit
    • andy@galois.com's avatar
      TickBox representation change · 8100cd43
      andy@galois.com authored
      This changes the internal representation of TickBoxes,
      from
              Note (TickBox "module" n)  <expr>
      into
      
              case tick<module,n> of
                _ -> <expr>
      
      tick has type :: #State #World, when the module and tick numbe
      are stored inside IdInfo.
      
      Binary tick boxes change from
      
               Note (BinaryTickBox "module" t f) <expr>
      
      into
      
                btick<module,t,f> <expr>
      
      btick has type :: Bool -> Bool, with the module and tick number
      stored inside IdInfo.
      8100cd43
  6. 20 Nov, 2006 1 commit
  7. 24 Oct, 2006 1 commit
    • andy@galois.com's avatar
      Haskell Program Coverage · d5934bbb
      andy@galois.com authored
      This large checkin is the new ghc version of Haskell
      Program Coverage, an expression-level coverage tool for Haskell.
      
      Parts:
      
       - Hpc.[ch] - small runtime support for Hpc; reading/writing *.tix files.
       - Coverage.lhs - Annotates the HsSyn with coverage tickboxes.
        - New Note's in Core,
            - TickBox      -- ticked on entry to sub-expression
            - BinaryTickBox  -- ticked on exit to sub-expression, depending
      	       	     -- on the boolean result.
      
        - New Stg level TickBox (no BinaryTickBoxes, though) 
      
      You can run the coverage tool with -fhpc at compile time. 
      Main must be compiled with -fhpc. 
      				      
      d5934bbb
  8. 11 Oct, 2006 1 commit
  9. 05 Oct, 2006 1 commit
  10. 04 Oct, 2006 1 commit
  11. 27 Sep, 2006 2 commits
  12. 20 Sep, 2006 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Option -findexed-types · 284d83ee
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:42:48 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Option -findexed-types
        Fri Sep  8 21:35:37 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Option -findexed-types
          - Introduced the switch -findexed-types to activate the indexed type family 
            framework.
          - The switch enables the special 'family' and allows kind signatures (which are
            currently compulsory for associated families).
      284d83ee
  13. 19 Sep, 2006 1 commit
    • Simon Marlow's avatar
      Packages cleanup, and allow new packages to be loaded with :set again · ee565d46
      Simon Marlow authored
      This cleans up the package subsystem a little.  There are some
      changes to the GHC API as a result.
      
        - GHC.init and GHC.initFromArgs are no longer necessary.
      
        - GHC.newSession takes the root of the GHC tree as an argument
          (previously passed to GHC.init).
      
        - You *must* do GHC.setSessionDynFlags after GHC.newSession,
          this is what loads the package database.
      
        - Several global vars removed from SysTools
      
        - The :set command in GHCi can now cause new packages to be loaded,
          or can hide/ignore existing packages.
      ee565d46
  14. 01 Sep, 2006 1 commit
  15. 07 Aug, 2006 1 commit
    • simonpj@microsoft.com's avatar
      Add -fextended-default-rules and -fmono-pat-binds · 6e0c3f50
      simonpj@microsoft.com authored
      Add -fextended-deafult-rules (in response to Don Stewart's message below),
      and document them.
      
      Also doucument -fmono-pat-binds/-fno-mono-pat-binds, which has been in 
      GHC a few weeks now. 
      
      (The two are in one patch because the diffs were so close together
      that Darcs combined them.)
      
      Simon
      
      
      From: Donald Bruce Stewart [mailto:dons@cse.unsw.edu.au] 
      Sent: 07 August 2006 10:52
      
      While we're thinking about defaulting, I have a question..
      
      ghci uses an extended defaulting system, to allow things like:
              Prelude> reverse []
              []
      to work, and to have the right instance of Show found. The manual says:
      
          "..it is tiresome for the user to have to specify the type, so GHCi extends
          Haskell's type-defaulting rules (Section 4.3.4 of the Haskell 98 Report
          (Revised)) as follows. If the expression yields a set of type constraints
          that are all from standard classes (Num, Eq etc.), and at least one is
          either a numeric class or the Show, Eq, or Ord class, GHCi will try to use
          one of the default types, just as described in the Report. The standard
          defaulting rules require that one of the classes is numeric; the difference
          here is that defaulting is also triggered at least one is Show, Eq, or Ord."
      
      Currently, there is no way to get at this "extended" defaulting for compiled
      modules. However, I have a use case for in fact doing this.
      
      With runtime evaluated Haskell, embedding 'interpreters' (over hs-plugins) is
      easy. lambdabot, for example, implements a sandboxed haskell eval system. But
      it doesn't have access to the defaulting mechanism of ghci, so we have:
      
          dons:: > reverse []
          lambdabot:: Add a type signature
          dons:: > reverse [] :: [()]
          lambdabot:: []
      
      Which is annoying -- newbies wonder why they have to add these extra
      constraints to get a Show instance.
      
      I'm wondering, since the extended defaulting mechanisms are already
      implemented, could they be made available to compiled modules as well,
      perhaps using a flag, -fextended-defaulting? 
      6e0c3f50
  16. 27 Jul, 2006 2 commits
  17. 25 Jul, 2006 1 commit
    • Simon Marlow's avatar
      Generalise Package Support · 61d2625a
      Simon Marlow authored
      This patch pushes through one fundamental change: a module is now
      identified by the pair of its package and module name, whereas
      previously it was identified by its module name alone.  This means
      that now a program can contain multiple modules with the same name, as
      long as they belong to different packages.
      
      This is a language change - the Haskell report says nothing about
      packages, but it is now necessary to understand packages in order to
      understand GHC's module system.  For example, a type T from module M
      in package P is different from a type T from module M in package Q.
      Previously this wasn't an issue because there could only be a single
      module M in the program.
      
      The "module restriction" on combining packages has therefore been
      lifted, and a program can contain multiple versions of the same
      package.
      
      Note that none of the proposed syntax changes have yet been
      implemented, but the architecture is geared towards supporting import
      declarations qualified by package name, and that is probably the next
      step.
      
      It is now necessary to specify the package name when compiling a
      package, using the -package-name flag (which has been un-deprecated).
      Fortunately Cabal still uses -package-name.
      
      Certain packages are "wired in".  Currently the wired-in packages are:
      base, haskell98, template-haskell and rts, and are always referred to
      by these versionless names.  Other packages are referred to with full
      package IDs (eg. "network-1.0").  This is because the compiler needs
      to refer to entities in the wired-in packages, and we didn't want to
      bake the version of these packages into the comiler.  It's conceivable
      that someone might want to upgrade the base package independently of
      GHC.
      
      Internal changes:
      
        - There are two module-related types:
      
              ModuleName      just a FastString, the name of a module
              Module          a pair of a PackageId and ModuleName
      
          A mapping from ModuleName can be a UniqFM, but a mapping from Module
          must be a FiniteMap (we provide it as ModuleEnv).
      
        - The "HomeModules" type that was passed around the compiler is now
          gone, replaced in most cases by the current package name which is
          contained in DynFlags.  We can tell whether a Module comes from the
          current package by comparing its package name against the current
          package.
      
        - While I was here, I changed PrintUnqual to be a little more useful:
          it now returns the ModuleName that the identifier should be qualified
          with according to the current scope, rather than its original
          module.  Also, PrintUnqual tells whether to qualify module names with
          package names (currently unused).
      
      Docs to follow.
      61d2625a
  18. 22 Jul, 2006 1 commit
    • simonpj@microsoft.com's avatar
      Add -fmono-pat-binds, and make it the default · 10ffe4f7
      simonpj@microsoft.com authored
      In Haskell 98, pattern bindings are generalised.  Thus in
      	(f,g) = (\x->x, \y->y)
      both f and g will get polymorphic types.  I have become convinced
      that generalisation for pattern-bound variables is just a bridge
      toof far. It is (I claim) almost never needed, and it adds significant
      complication.  (All the more so if we add bang patterns.)
      
      So the flag -fmono-pat-binds switches off generalisation for pattern
      bindings.  (A single variable is treated as a degnerate funtction
      binding.)  
      
      Furthremore, as an experiment, I'm making it the default.  I want
      to see how many progarms fail with monomorphic pattern bindings.
      
      You can recover the standard behaviour with -fno-mono-pa-binds.
      10ffe4f7
  19. 12 Jul, 2006 1 commit
    • simonpj@microsoft.com's avatar
      Experimental flag -fdicts-cheap · e1231b2b
      simonpj@microsoft.com authored
      This experimental flag, -fdicts-cheap, makes a let-binding that bind a
      value of dictionary type look cheap.  That in turn leads to more
      eta expansion.  Instead of
      	f = /\a. \(d1:Ord a). let d2:Ord [a] = dfOrd a d1 in
                       \(x:a). <stuff>
      which has arity 1, you get
      	f = /\a. \(d1:Ord a). \(x:a).
      	         let d2:Ord [a] = dfOrd a d1 in <stuff>
      Now f has arity 2.
      
      This can cretainly waste dictionary-construction work, if f is
      partially applied to its dictionary argument.  However it has knock-on
      effects.  Because f has arity 2, we won't float (f Int d) out of
      	\x. h (f Int d)
      Floating f out of this lambda makes it impossible for an h/f fusion
      rule to fire; and this unexpected loss of RULE application was the
      immediate reason for implementing this flag. (Roman Leshchinskiy came
      across this when working on array fusion.)
      
      
      I've implemented the change only in CoreUtils.arityType, which
      only affects eta expansion.  I thought of putting the change in
      exprIsCheap, which is a more systematic place (the former calls
      the latter) but
      
      	a) I wanted this under flag control, and the flags 
      	are not readily available to all callers of exprIsCheap
      
      	b) I'm not 100% convinced that this change is a good
      	idea, so it's reasonable to do the narrowest change
      	that solves the immediate problem.
      e1231b2b
  20. 04 Jul, 2006 1 commit
  21. 23 May, 2006 2 commits
  22. 18 May, 2006 1 commit
  23. 03 May, 2006 1 commit
  24. 26 Apr, 2006 1 commit
  25. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
      0065d5ab
  26. 06 Apr, 2006 1 commit
  27. 18 Mar, 2006 2 commits
    • David Himmelstrup's avatar
      -fno-code shouldn't be a mode. · 851154f0
      David Himmelstrup authored
      I've removed -fno-code from Main to make it work
      equally well with --make and -c.
      I've also allowed it not to write hi files unless
      -fwrite-iface is given.
      851154f0
    • David Himmelstrup's avatar
      -fno-code shouldn't be a mode. · 4a3042fc
      David Himmelstrup authored
      I've removed -fno-code from Main to make it work
      equally well with --make and -c.
      I've also allowed it not to write hi files unless
      -fwrite-iface is given.
      4a3042fc
  28. 07 Mar, 2006 1 commit
  29. 10 Feb, 2006 1 commit
  30. 08 Feb, 2006 1 commit
  31. 03 Feb, 2006 1 commit
  32. 25 Nov, 2005 1 commit
  33. 31 Oct, 2005 1 commit
  34. 28 Oct, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-10-28 15:22:39 by simonmar] · f2e730f3
      simonmar authored
      Add -stubdir option to control location of generated stub files.  Also
      do some clean up while I'm here - remove hscStubCOut/hscStubHOut from
      DynFlags, and add
      
        mkStubPaths :: DynFlags -> Module -> ModLocation -> (FilePath,FilePath)
      
      to Finder.  (this seemed better than caching the stub paths in every
      ModLocation, because they are rarely needed and only present in home
      modules, and are easily calculated from other available information).
      
      -stubdir behaves in exactly the same way as -odir and -hidir.
      f2e730f3
    • simonmar's avatar
      [project @ 2005-10-28 11:35:35 by simonmar] · 55495951
      simonmar authored
      Change the default executable name to match the basename of the source
      file containing the Main module (or the module specified by -main-is),
      if there is one.  On Windows, the .exe extension is added.
      
      As requested on the ghc-users list, and as implemented by Tomasz
      Zielonka <tomasz.zielonka at gmail.com>, with modifications by me.
      
      I changed the type of the mainModIs field of DynFlags from Maybe
      String to Module, which removed some duplicate code.
      55495951