1. 18 Oct, 2005 1 commit
    • panne's avatar
      [project @ 2005-10-18 11:04:28 by panne] · c30b7a08
      panne authored
      For the 100th time: Fixed the DocBook XML. >:-( Please, please, please:
      Everybody should do a "make validate" before checking in any XML stuff!
  2. 17 Oct, 2005 7 commits
    • simonpj's avatar
      [project @ 2005-10-17 11:11:15 by simonpj] · 9137abfe
      simonpj authored
      Buglets in GADT record-syntax stuff, which killed the weekend builds
    • simonpj's avatar
      [project @ 2005-10-17 11:10:36 by simonpj] · b16992d6
      simonpj authored
      Small simplifier bug in case optimisation
      The simplifier eliminates redundant case branches, and panics if there
      are no case alternatives.  But due to a slightly delayed instantiation
      of a type constructor variable 'p' by a type constructor 'P', it turned
      out that an inner case had no alternatives at all, becuase an outer case
      had not pruned a branch as quickly as it should have.
      This commit fixes both problems:
      a) SimplUtils.mkCase1 now returns a call to 'error' (instead of panicing)
         when it gets an empty list of alternatives.   Somewhat analogous to
         the inaccessible GADT case in Simplify.simplifyAlt
      b) In SimplUtils.prepareDefault, use the up-to-date scrutinee, rather than
         the less up-to-date case_bndr, to get the case type constructor.  That
         leads to slightly earlier pruning of inaccessible branches.
      Fixes a bug reported by Ian Lynagh.
      Test is simplCore/should_compile/simpl013
    • simonpj's avatar
      [project @ 2005-10-17 11:09:51 by simonpj] · e8883060
      simonpj authored
      Comments only
    • simonmar's avatar
      [project @ 2005-10-17 10:47:10 by simonmar] · 97850bac
      simonmar authored
      merge rev. from ghc-6-4-branch
    • simonmar's avatar
      [project @ 2005-10-17 10:01:35 by simonmar] · 666d1369
      simonmar authored
      Fix a comment
    • simonmar's avatar
      [project @ 2005-10-17 09:42:56 by simonmar] · 7bffe7e8
      simonmar authored
      note about watching for/preventing overwrites of critical files in the
      bootstrap process.
    • simonmar's avatar
      [project @ 2005-10-17 09:36:39 by simonmar] · 97ab9c1b
      simonmar authored
      if TARGETPLATFORM differs from HOSTPLATFORM, don't attempt to build
      DerivedConstants,h, ghcautoconf.h and GHCConstants.h.  If these aren't
      present, emit a message to remind the user to copy them from the
      target system.  Hopefully this should make bootstrapping slightly less
      error prone.
  3. 14 Oct, 2005 4 commits
    • simonmar's avatar
      [project @ 2005-10-14 13:11:21 by simonmar] · 676f9567
      simonmar authored
      StrHash doesn't appear to be used; remove it.  I think it was an
      earlier version of the string hashing code in Hash.c.
    • simonmar's avatar
      [project @ 2005-10-14 12:29:53 by simonmar] · 1c7854b5
      simonmar authored
      Some more informative diagnostics for ghc -v about what the package
      system is doing.  This should help when diagnosing strange-looking
      errors from GHC:
      Using package config file: /home/simonmar/fp/lib/i386-unknown-linux/ghc-6.4.1/package.conf
      package posix-1.0 will be ignored due to missing dependencies:
      package util-1.0 will be ignored due to missing dependencies:
      package data-1.0 will be ignored due to missing dependencies:
      package text-1.0 will be ignored due to missing dependencies:
      package Cabal-1.1.4 will be ignored due to missing dependencies:
      *** Deleting temp files
      ghc-6.4.1: unknown package: Cabal-1.1.4
    • simonmar's avatar
      [project @ 2005-10-14 11:48:56 by simonmar] · a004ae5a
      simonmar authored
      Fix a couple of problems with the "unknown package" error message
    • simonpj's avatar
      [project @ 2005-10-14 11:22:41 by simonpj] · 36436bc6
      simonpj authored
      Add record syntax for GADTs
      Atrijus Tang wanted to add record syntax for GADTs and existential
      types, so he and I worked on it a bit at ICFP.  This commit is the
      result.  Now you can say
       data T a where
        T1 { x :: a }           	 :: T [a]
        T2 { x :: a, y :: Int } 	 :: T [a]
        forall b. Show b =>
       	T3 { naughty :: b, ok :: Int } :: T Int
        T4 :: Eq a => a -> b -> T (a,b)
      Here the constructors are declared using record syntax.
      Still to come after this commit:
        - User manual documentation
        - More regression tests
        - Some missing cases in the parser (e.g. T3 won't parse)
      Autrijus is going to do these.
      Here's a quick summary of the rules.  (Atrijus is going to write
      proper documentation shortly.)
      Defnition: a 'vanilla' constructor has a type of the form
      	forall a1..an. t1 -> ... -> tm -> T a1 ... an
      No existentials, no context, nothing.  A constructor declared with
      Haskell-98 syntax is vanilla by construction.  A constructor declared
      with GADT-style syntax is vanilla iff its type looks like the above.
      (In the latter case, the order of the type variables does not matter.)
      * You can mix record syntax and non-record syntax in a single decl
      * All constructors that share a common field 'x' must have the
        same result type (T [a] in the example).
      * You can use field names without restriction in record construction
        and record pattern matching.
      * Record *update* only works for data types that only have 'vanilla'
      * Consider the field 'naughty', which uses a type variable that does
        not appear in the result type ('b' in the example).  You can use the
        field 'naughty' in pattern matching and construction, but NO
        SELECTOR function is generated for 'naughty'.  [An attempt to use
        'naughty' as a selector function will elicit a helpful error
      * Data types declared in GADT syntax cannot have a context. So this
      is illegal:
      	data (Monad m) => T a where
      * Constructors in GADT syntax can have a context (t.g. T3, T4 above)
        and that context is stored in the constructor and made available
        when the constructor is pattern-matched on.  WARNING: not competely
        implemented yet, but that's the plan.
      Implementation notes
      - Data constructors (even vanilla ones) no longer share the type
        variables of their parent type constructor.
      - HsDecls.ConDecl has changed quite a bit
      - TyCons don't record the field labels and type any more (doesn't
        make sense for existential fields)
      - GlobalIdDetails records which selectors are 'naughty', and hence
        don't have real code.
  4. 13 Oct, 2005 1 commit
  5. 12 Oct, 2005 8 commits
  6. 11 Oct, 2005 1 commit
  7. 10 Oct, 2005 3 commits
  8. 07 Oct, 2005 1 commit
  9. 06 Oct, 2005 6 commits
  10. 05 Oct, 2005 3 commits
  11. 24 Sep, 2005 4 commits
  12. 23 Sep, 2005 1 commit