1. 22 Feb, 2001 6 commits
  2. 21 Feb, 2001 8 commits
  3. 20 Feb, 2001 20 commits
    • qrczak's avatar
      [project @ 2001-02-20 18:40:54 by qrczak] · 8c2df3ea
      qrczak authored
      Apply tweaks needed to let this compile: remove syn_map argument from
      typecheckExpr in HscMain, import PrelNum.fromInt to modules which
      use integer literals with -fno-implicit-prelude flag.
      
      It crashes later, on Directory.hs:
      ghc: panic! (the `impossible' happened):
              srtExpr
      
      I'm not sure if resolving numeric literals to top-level definitions
      of fromInt/fromInteger with -fno-implicit-prelude is a good idea.
      Using names from whatever module is called Prelude would be IMHO
      better, probably when -fglasgow-exts is given. Prel* modules themselves
      would import PrelNum as Prelude.
      
      Both schemes break for fromInt, which is non-standard and by default
      it's visible neither at the top level nor in the Prelude module. My
      proposal for dealing with it is as follows (assuming that fromInteger
      is taken from the module locally called Prelude instead of the top
      level): when the standard Prelude is used, take fromInt from PrelNum;
      when a Prelude replacement is used, use fromInt from it if available,
      otherwise use its fromInteger instead. That way Prelude replacements
      can ignore this non-standard extension and get the expected behavior,
      or they can also choose to use this extension (in a way compatible
      with Haskell implementations which allow to replace Prelude but don't
      have fromInt).
      8c2df3ea
    • simonmar's avatar
      [project @ 2001-02-20 18:05:23 by simonmar] · 29920fbc
      simonmar authored
      More doc hacking.
      
      Call for Release Notes (CFRN): the 5-00-notes.sgml file is currently a
      skeleton only; PLEASE add or expand entries for things you've done.
      29920fbc
    • simonpj's avatar
      [project @ 2001-02-20 15:44:26 by simonpj] · 1703fe03
      simonpj authored
      Eta expansion wibbles
      ~~~~~~~~~~~~~~~~~~~~~
      * Don't eta reduce, and do eta expand,
        data con workers and primops
      
        Reason: they don't have bindings, so they aren't really
        ordinary variables.
      
      This is a bit of a swamp, provoked by moving CoreSat later,
      something I'm beginning to wonder about...
      
      Not are things settled yet -- I think some rules may
      not fire that should because of constructor worker/wrapper
      issues.  E.g when you have   foldr (:) [] xs = xs
      1703fe03
    • simonpj's avatar
      [project @ 2001-02-20 15:38:45 by simonpj] · 48d9dabf
      simonpj authored
      Import wibble
      48d9dabf
    • simonpj's avatar
      [project @ 2001-02-20 15:38:27 by simonpj] · dfe1fa3a
      simonpj authored
      Layout wibble
      dfe1fa3a
    • simonpj's avatar
      [project @ 2001-02-20 15:37:42 by simonpj] · e3873a5e
      simonpj authored
      Add another assert
      e3873a5e
    • simonpj's avatar
      [project @ 2001-02-20 15:36:55 by simonpj] · db7041f7
      simonpj authored
      Remove IPName altogether
      db7041f7
    • simonpj's avatar
      [project @ 2001-02-20 15:35:28 by simonpj] · 0aa61e36
      simonpj authored
      Use tcIfaceType
      0aa61e36
    • simonpj's avatar
      [project @ 2001-02-20 13:15:11 by simonpj] · dc41be9f
      simonpj authored
      Fix top level float
      dc41be9f
    • simonmar's avatar
      [project @ 2001-02-20 11:04:42 by simonmar] · 89e1f4af
      simonmar authored
      Make the warning package options (-W, -w, -Wall) dynamic.
      89e1f4af
    • simonpj's avatar
      [project @ 2001-02-20 09:55:12 by simonpj] · 17de8ea2
      simonpj authored
      Wibble
      17de8ea2
    • simonpj's avatar
      [project @ 2001-02-20 09:45:57 by simonpj] · f1e064a8
      simonpj authored
      Import wibbles
      f1e064a8
    • simonpj's avatar
      [project @ 2001-02-20 09:45:30 by simonpj] · ee0b0cae
      simonpj authored
      A bit more on deprecations
      ee0b0cae
    • simonpj's avatar
      [project @ 2001-02-20 09:45:12 by simonpj] · 73c9f352
      simonpj authored
      A bit more on decoupling the prelude
      73c9f352
    • simonpj's avatar
      [project @ 2001-02-20 09:42:50 by simonpj] · 22ffc06a
      simonpj authored
      Typechecking [TcModule, TcBinds, TcHsSyn, TcInstDcls, TcSimplify]
      ~~~~~~~~~~~~
      * Fix a bug in TcSimplify that broke functional dependencies.
        Interleaving unification and context reduction is trickier 
        than I thought.  Comments in the code amplify.  
      
      * Fix a functional-dependency bug, that meant that this pgm:
      	class C a b | a -> b where f :: a -> b
      	
      	g :: (C a b, Eq b) => a -> Bool
      	g x = f x == f x
        gave an ambiguity error report.  I'm afraid I've forgotten
        what the problem was.
      
      
      * Correct the implementation of the monomorphism restriction,
        in TcBinds.generalise.  This fixes Marcin's bug report:
      	test1 :: Eq a => a -> b -> b
      	test1 x y = y
      
      	test2 = test1 (3::Int)
        Previously we were erroneously inferring test2 :: () -> ()
      
      * Make the "unf_env" that is looped round in TcModule go round
        in a big loop, not just round tcImports.  This matters when
        we have mutually recursive modules, so that the Ids bound in
        the source code may appear in the imports.  Sigh.  But no big
        deal.
      
        It does mean that you have to be careful not to call isLocalId,
        isDataConId etc, because they consult the IdInfo of an Id, which 
        in turn may be determined by the loop-tied unf_env.
      22ffc06a
    • simonpj's avatar
      [project @ 2001-02-20 09:41:48 by simonpj] · 52eed22d
      simonpj authored
      Deprecations [HscTypes, MkIface, Rename, RnEnv, RnIfaces]
      ~~~~~~~~~~~~
      * Arrange that a change in deprecations is treated as a 
        hi-file difference.
      
      * Warn about deprecations at the usage site.  This entailed
        changing HscTypes.GlobalRdrEnv to include deprecations.
        While I was at it, I changed the range of GlobalRdrEnv 
        to a data type, GlobalRdrElt, instead a of a pair.
      52eed22d
    • simonpj's avatar
      [project @ 2001-02-20 09:40:43 by simonpj] · 5e624292
      simonpj authored
      Decoupling the Prelude [HsExpr, HsLit, HsPat, ParseUtil, Parser.y, PrelNames,
      ~~~~~~~~~~~~~~~~~~~~~~  Rename, RnEnv, RnExpr, RnHsSyn, Inst, TcEnv, TcMonad,
      			TcPat, TcExpr]
      The -fno-implicit-prelude flag is meant to arrange that when you write
      	3
      you get
      	fromInt 3
      where 'fromInt' is whatever fromInt is in scope at the top level of
      the module being compiled.  Similarly for
      	* numeric patterns
      	* n+k patterns
      	* negation
      
      This used to work, but broke when we made the static/dynamic flag distinction.
      It's now tidied up a lot.  Here's the plan:
      
        - PrelNames contains sugarList :: SugarList, which maps built-in names
          to the RdrName that should replace them.  
      
        - The renamer makes a finite map :: SugarMap, which maps the built-in names
          to the Name of the re-mapped thing
      
        - The typechecker consults this map via tcLookupSyntaxId when it is doing
          numeric things
      
      At present I've only decoupled numeric syntax, since that is the main demand,
      but the scheme is much more robustly extensible than the previous method.
      
      As a result some HsSyn constructors don't need to carry names in them
      (notably HsOverLit, NegApp, NPlusKPatIn)
      5e624292
    • simonpj's avatar
      [project @ 2001-02-20 09:38:59 by simonpj] · d5c7622a
      simonpj authored
      Back end changes [CgExpr, ClosureInfo, CoreSat, CoreUtils,
      ~~~~~~~~~~~~~~~~  CmdLineOpts, HscMain, CoreToStg, StgSyn]
      * Move CoreTidy and interface-file dumping *before* CoreSat.
        In this way interface files are not in A-normal form, so
        they are less bulky, and a bit easier to use as input to
        the optimiser.  
      
        So now CoreSat is regarded as a pre-pass to CoreToStg.
        Since CoreTidy pins on utterly-final IdInfo, CoreSat has to
        be very careful not to change the arity of any function.
      
      * CoreSat uses OrdList instead of lists to collect floating binds
        This in turn meant I could simplify the FloatingBind type a bit
      
      * Greatly simplfy the StgBinderInfo data type.  It was 
        gathering far more information than we needed.
      
      * Add a flag -fkeep-stg-types, which keeps type abstractions
        and applications in STG code, for the benefit of code generators
        that are typed; notably the .NET ILX code generator.
      d5c7622a
    • simonpj's avatar
      [project @ 2001-02-20 08:57:46 by simonpj] · d79c57bb
      simonpj authored
      Add fundeps tests
      d79c57bb
    • qrczak's avatar
      [project @ 2001-02-20 03:41:31 by qrczak] · d9ab3ccf
      qrczak authored
      Remove unbalanced #endif.
      d9ab3ccf
  4. 19 Feb, 2001 6 commits