1. 11 Apr, 2007 3 commits
    • Simon Marlow's avatar
      Rationalise GhcMode, HscTarget and GhcLink · 3c22606b
      Simon Marlow authored
      This patch cleans up the GHC API, and adds some functionality: we can
      now compile to object code inside GHCi.
      
      Previously we had:
      
        data GhcMode
          = BatchCompile
          | Interactive
          | OneShot
          | JustTypecheck
          | MkDepend
        
        data HscTarget
          = HscC
          | HscAsm
          | HscJava
          | HscInterpreted
          | HscNothing
      
      There was redundancy here; if GhcMode is Interactive, then only
      HscInterpreted makes sense, and JustTypecheck required HscNothing.
      Now we have:
      
        data GhcMode
          = CompManager       -- ^ --make, GHCi, etc.
          | OneShot           -- ^ ghc -c Foo.hs
          | MkDepend          -- ^ ghc -M, see Finder for why we need this
      
      and HscTarget remains as before.
      
      Previously GhcLink looked like this:
      
        data GhcLink = NoLink | StaticLink
      
      Now we have:
      
        data GhcLink = NoLink | LinkBinary | LinkInMemory
      
      The idea being that you can have an HscTarget of HscAsm (for example)
      and still link in memory.
      
      There are two new flags:
      
        -fobject-code selects object code as the target (selects
                      either -fasm or -fvia-C, whichever is the default)
                      This can be usd with ':set' in GHCi, or on the command line.
      
        -fbyte-code   sets byte-code as the target.  Only works in GHCi.
                      One day maybe this could save the byte code in a file
                      when used outside GHCi.
      
        (names chosen for consistency with -fno-code).
      
      Changes to the GHC API: newSession no longer takes the GhcMode
      argument.  The GhcMode defaults to CompManager, which is usually what
      you want.  To do JustTypecheck now, just set hscTarget to HscNothing.
      3c22606b
    • Ian Lynagh's avatar
      d55443e6
    • Ian Lynagh's avatar
      Build library Setup.hs's with -Wall · 6c30dba4
      Ian Lynagh authored
      6c30dba4
  2. 10 Apr, 2007 4 commits
  3. 09 Apr, 2007 2 commits
  4. 06 Apr, 2007 2 commits
  5. 13 Nov, 2006 1 commit
    • Aaron Tomb's avatar
      Fix external core syntax (though not full compilation) · de777ba4
      Aaron Tomb authored
      This patch updates the External Core creator, pretty-printer, and parser to
      agree on a concrete syntax for External Core, including the constructs
      required by the change to System FC. Code to create valid ASTs from External
      Core files will come later, as will bits for renaming, typechecking, and
      desugaring.
      de777ba4
  6. 06 Apr, 2007 1 commit
  7. 16 Mar, 2007 2 commits
  8. 10 Mar, 2007 1 commit
  9. 08 Mar, 2007 1 commit
  10. 01 Apr, 2007 1 commit
    • red5_2@hotmail.com's avatar
      fix adjustor generation on ia64 (test case ffi009) · b321da7d
      red5_2@hotmail.com authored
      Some fixes to adjustor functions.  The 8-byte address returned by the 
      allocator is adjusted to be aligned to 16-byte boundaries.  Fixed a typo 
      in inserting an immediate address into an instruction.
      
      This fixes the calls to 5-argument and 6-argument functions in ffi009.  
      Some functions still break.  I suspect it's related to passing arguments on 
      the stack.
      b321da7d
  11. 27 Mar, 2007 1 commit
  12. 04 Apr, 2007 7 commits
  13. 03 Apr, 2007 1 commit
  14. 02 Apr, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Make type-tidying work for coercion variables · f2b02ce8
      simonpj@microsoft.com authored
      When tidying a TyVar binder, we must tidy its kind if it's a coercion
      variable!  I had forgotten to do this, which is a serious bug.  As a
      result some more complicated programs were getting a Lint error when
      reading in interface files.  Score one for Core Lint!
      
      f2b02ce8
  15. 01 Apr, 2007 1 commit
  16. 06 Mar, 2007 1 commit
  17. 02 Apr, 2007 1 commit
  18. 30 Mar, 2007 2 commits
    • simonpj@microsoft.com's avatar
      The ru_local field of a CoreRule is False for implicit Ids · ec81fdde
      simonpj@microsoft.com authored
      	MERGE to 6.6.1
      
      For class-ops, record selectors, data constructors, we want the ru_local
      field of the Rule to be False.  We do not attach the rule to the binding
      for the Id, because there simply isn't a binding until the code gen stage.
      
      (NB: the ru_local field is different to the orphan-hood of the rule.)
      
      This fixes a bug that meant that RULES on class ops were never exported.
      ec81fdde
    • simonpj@microsoft.com's avatar
      Match the type of an Id during rule matching · 206b7529
      simonpj@microsoft.com authored
      	Please MERGE to 6.6.1
      
      Consider this RULE
          forall (c::Char->Int) (x::Char). 
      	f (c x) = "RULE FIRED"
      
      Well, this should only match on arguments of the specified type
      But we simply weren't checking this condition before.  Now we are.
      
      Test is simplrun008
      
      206b7529
  19. 28 Mar, 2007 1 commit
  20. 29 Mar, 2007 2 commits
  21. 28 Mar, 2007 3 commits
  22. 27 Mar, 2007 1 commit