1. 13 Jun, 2012 7 commits
    • Simon Peyton Jones's avatar
      Simplify the implementation of Implicit Parameters · 5a8ac0f8
      Simon Peyton Jones authored
      This patch re-implements implicit parameters via a class
      with a functional dependency:
      
          class IP (n::Symbol) a | n -> a where
            ip :: a
      
      This definition is in the library module GHC.IP. Notice
      how it use a type-literal, so we can have constraints like
         IP "x" Int
      Now all the functional dependency machinery works right to make
      implicit parameters behave as they should.
      
      Much special-case processing for implicit parameters can be removed
      entirely. One particularly nice thing is not having a dedicated
      "original-name cache" for implicit parameters (the nsNames field of
      NameCache).  But many other cases disappear:
      
        * BasicTypes.IPName
        * IPTyCon constructor in Tycon.TyCon
        * CIPCan constructor  in TcRnTypes.Ct
        * IPPred constructor  in Types.PredTree
      
      Implicit parameters remain special in a few ways:
      
       * Special syntax.  Eg the constraint (IP "x" Int) is parsed
         and printed as (?x::Int).  And we still have local bindings
         for implicit parameters, and occurrences thereof.
      
       * A implicit-parameter binding  (let ?x = True in e) amounts
         to a local instance declaration, which we have not had before.
         It just generates an implication contraint (easy), but when
         going under it we must purge any existing bindings for
         ?x in the inert set.  See Note [Shadowing of Implicit Parameters]
         in TcSimplify
      
       * TcMType.sizePred classifies implicit parameter constraints as size-0,
         as before the change
      
      There are accompanying patches to libraries 'base' and 'haddock'
      
      All the work was done by Iavor Diatchki
      5a8ac0f8
    • Ian Lynagh's avatar
      Add missing file · 03f78f06
      Ian Lynagh authored
      03f78f06
    • Ian Lynagh's avatar
      Follow spelling fixes · 0cba443f
      Ian Lynagh authored
      0cba443f
    • Ian Lynagh's avatar
      Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc · c3cf0419
      Ian Lynagh authored
      Fix conflicts in:
      	compiler/main/DynFlags.hs
      c3cf0419
    • Ian Lynagh's avatar
      Remove lots of commented out 'in' keywords · bfe94012
      Ian Lynagh authored
      bfe94012
    • Ian Lynagh's avatar
      Tweak the way UsageErrors are constructed · d2bb4777
      Ian Lynagh authored
      Using 'unlines' meant that we get a trailing newline, which gave
      different output.
      d2bb4777
    • Ian Lynagh's avatar
      Remove PlatformOutputable · d06edb8e
      Ian Lynagh authored
      We can now get the Platform from the DynFlags inside an SDoc, so we
      no longer need to pass the Platform in.
      d06edb8e
  2. 12 Jun, 2012 29 commits
  3. 11 Jun, 2012 4 commits