1. 04 Feb, 2007 1 commit
  2. 21 Dec, 2006 1 commit
    • lennart@augustsson.net's avatar
      Add support for overloaded string literals. · 90dc9026
      lennart@augustsson.net authored
      The class is named IsString with the single method fromString.
      Overloaded strings work the same way as overloaded numeric literals.
      In expressions a string literals gets a fromString applied to it.
      In a pattern there will be an equality comparison with the fromString:ed literal.
      
      Use -foverloaded-strings to enable this extension.
       
      90dc9026
  3. 05 Jan, 2007 1 commit
  4. 02 Jan, 2007 2 commits
    • simonpj@microsoft.com's avatar
    • simonpj@microsoft.com's avatar
      Big tidy-up of deriving code · 84923cc7
      simonpj@microsoft.com authored
      This tidy-up, triggered by Trac #1068, re-factors the way that 'deriving' 
      happens.  It took me way longer than I had intended.  The main changes,
      by far are to TcDeriv; everyting else is a minor consequence.
      
      While I was at it, I changed the syntax for standalone deriving, so that
      it goes
      	derive instance Show (T a)
      
      (instead of "derive Show for T").  However, there's still an implicit
      context, generated by the deriving code, and I wonder if it shouldn't really
      be
      	derive instance (..) => Show (T a)
      but I have left it simple for now.
      
      I also added a function Type.substTyVars, and used it here and there, which
      led to some one-line changes otherwise unrelated (sorry).
      
      Loose ends:
        * 'deriving Typeable' for indexed data types is still not right
        * standalone deriving should be documented
      84923cc7
  5. 29 Dec, 2006 2 commits
  6. 28 Dec, 2006 1 commit
  7. 08 Dec, 2006 1 commit
  8. 06 Dec, 2006 1 commit
  9. 10 Nov, 2006 1 commit
  10. 11 Oct, 2006 1 commit
  11. 05 Oct, 2006 1 commit
  12. 21 Sep, 2006 1 commit
  13. 20 Sep, 2006 1 commit
  14. 18 Sep, 2006 1 commit
  15. 17 Sep, 2006 1 commit
  16. 29 Sep, 2006 1 commit
  17. 20 Sep, 2006 2 commits
    • chak@cse.unsw.edu.au.'s avatar
      Kind sig for toplevel family decls is optional · 7ab880e6
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:13:47 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Kind sig for toplevel family decls is optional
        Sat Aug 26 19:03:50 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Kind sig for toplevel family decls is optional
          - Kind sigs are still compulsory for AT family decls.  Changing this is more 
            tricky, as AT decls don't have the family keyword and hence look like empty 
            data decls.  That impacts reduce/reduce conflicts and/or the criteria for 
            checking whether a TyData variant is a family signature.
          - Also removed iso from the syntax (it's still in the lexer in case we want to
            resurrect it). 
      7ab880e6
    • chak@cse.unsw.edu.au.'s avatar
      Extend Class.Class to include the TyCons of ATs · bb106f28
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 18:58:51 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Extend Class.Class to include the TyCons of ATs
        Wed Aug 16 16:15:31 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Extend Class.Class to include the TyCons of ATs
      bb106f28
  18. 18 Sep, 2006 3 commits
  19. 15 Sep, 2006 5 commits
  20. 02 Aug, 2006 1 commit
  21. 18 Sep, 2006 1 commit
  22. 12 Sep, 2006 1 commit
  23. 21 Aug, 2006 2 commits
  24. 09 Aug, 2006 1 commit
  25. 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
  26. 23 Jun, 2006 1 commit
  27. 19 May, 2006 1 commit
  28. 14 Apr, 2006 1 commit
    • simonpj@microsoft.com's avatar
      Allow $x, as well as $(x), at top level in TH · 6b2cf62b
      simonpj@microsoft.com authored
      Bulat pointed out that in Template Haskell
         $x
      is allowed instead of 
         $(x)
      in expressions, but not at the top level of modules.
      
      This commit fixes the omission.  Now you can say
      
      	f x = x
       	$h
      	data T = T
      
      and the $h will run Template Haskell just as you'd expect.
      6b2cf62b
  29. 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
  30. 05 Mar, 2006 1 commit