1. 11 May, 1999 9 commits
    • keithw's avatar
      [project @ 1999-05-11 16:42:54 by keithw] · f54faab0
      keithw authored
      (this is number 6 of 9 commits to be applied together)
      
        It is useful to know the usage of a lambda outside the usage
        inference (specifically, in the simplifier); thus as a temporary
        hack to make this information available without undue modification
        to the rest of the compiler, the information is copied into the
        IdInfo field of the binder.
      
        The new information is LBVarInfo, which can be either NoLBVarInfo or
        IsOneShotLambda, corresponding to __m/no info and __o respectively.
        LBVarInfo is not intended to be printed in interface files; to
        enforce this ppLBVarInfo is defined to print nothing.
      f54faab0
    • keithw's avatar
      [project @ 1999-05-11 16:42:29 by keithw] · 1e23fb08
      keithw authored
      (this is number 5b of 9 commits to be applied together)
      
        The major purpose of this commit is to introduce usage information
        and usage analysis into the compiler, per the paper _Once Upon a
        Polymorphic Type_ (Keith Wansbrough and Simon Peyton Jones, POPL'99,
        and Glasgow TR-1998-19).
      
        An analysis is provided that annotates a Core program with optimal
        usage annotations.  This analysis is performed by -fusagesp
        (=CoreDoUSPInf), and requires -fusagesp-on (=opt_UsageSPOn).  This
        latter performs an analysis in tidyCorePgm, immediately before
        CoreToStg is done.  The driver flag -fusagesp currently provides hsc
        with -fusagesp-on, and if -O is on does a single -fusagesp early on
        in the Core-to-Core sequence.  Please change this as desired.
      
        *NB*: For now, -fusagesp with -O requires -fno-specialise.  Sorry.
      
        The flags -ddump-usagesp (=opt_D_dump_usagesp) and -dusagesp-lint
        (=opt_DoUSPLinting) (also -dnousagesp-lint to the driver) have been
        added and are documented in the User Guide.
      1e23fb08
    • keithw's avatar
      [project @ 1999-05-11 16:41:56 by keithw] · 2a34e381
      keithw authored
      (this is number 5a of 9 commits to be applied together)
      
        The major purpose of this commit is to introduce usage information
        and usage analysis into the compiler, per the paper _Once Upon a
        Polymorphic Type_ (Keith Wansbrough and Simon Peyton Jones, POPL'99,
        and Glasgow TR-1998-19).
      
        An analysis is provided that annotates a Core program with optimal
        usage annotations.  This analysis is performed by -fusagesp
        (=CoreDoUSPInf), and requires -fusagesp-on (=opt_UsageSPOn).  This
        latter performs an analysis in tidyCorePgm, immediately before
        CoreToStg is done.  The driver flag -fusagesp currently provides hsc
        with -fusagesp-on, and if -O is on does a single -fusagesp early on
        in the Core-to-Core sequence.  Please change this as desired.
      
        *NB*: For now, -fusagesp with -O requires -fno-specialise.  Sorry.
      
        The flags -ddump-usagesp (=opt_D_dump_usagesp) and -dusagesp-lint
        (=opt_DoUSPLinting) (also -dnousagesp-lint to the driver) have been
        added and are documented in the User Guide.
      2a34e381
    • keithw's avatar
      [project @ 1999-05-11 16:37:29 by keithw] · d133b73a
      keithw authored
      (this is number 4 of 9 commits to be applied together)
      
        The major purpose of this commit is to introduce usage information
        and usage analysis into the compiler, per the paper _Once Upon a
        Polymorphic Type_ (Keith Wansbrough and Simon Peyton Jones, POPL'99,
        and Glasgow TR-1998-19).
      
        Usage information has been added to types, in the form of a new kind
        of NoteTy: (UsgNote UsageAnn(UsOnce|UsMany|UsVar UVar)).  Usages
        print as __o (once), __m (many, usually omitted), or (not in
        interface files) __uvxxxx.  Usage annotations should only appear at
        certain places in a type (see the paper).  The `default' annotation
        is __m, and so an omitted annotation implies __m.  Utility functions
        for handling usage annotations are provided in Type.
      
        If the compiler is built with -DUSMANY (a flag intended for use in
        debugging by KSW only), __m are *required* and may not be omitted.
      
        The major constraint is that type arguments (eg to mkAppTy) must be
        unannotated on top.  To maintain this invariant, many functions
        required the insertion of Type.unUsgTy (removing annot from top of a
        type) or UsageSPUtils.unannotTy (removing all annotations from a
        type).  A function returning usage-annotated types for primops has
        been added to PrimOp.
      
        A new kind of Note, (TermUsg UsageAnn), has been added to annotate
        Terms.  This note is *not* printed in interface files, and for the
        present does not escape the internals of the usage inference engine.
      d133b73a
    • keithw's avatar
      [project @ 1999-05-11 16:33:35 by keithw] · f83ad713
      keithw authored
      (this is number 3 of 9 commits to be applied together)
      
        Following Haskell 98, if the module declaration is omitted it now
        defaults to "module Main(main) where", rather than the previous
        default of exporting everything.
      
        Furthermore, "module Main where" also defaults to exporting just
        Main.main rather than everything in the module (modules other than
        Main behave as normal).  This permits the usage inference to give
        better results for the Main module, since exported functions get
        worse types than nonexported functions.
      f83ad713
    • keithw's avatar
      [project @ 1999-05-11 16:33:06 by keithw] · 5c18c653
      keithw authored
      (this is number 2 of 9 commits to be applied together)
      
        Type constructors now carry information on the variance (positive
        and/or negative) of each of their type arguments (tyConArgVrcs).
        This information is provided for primitive types and computed for
        others.  If a tycon has been imported abstractly and this variance
        information is subsequently demanded, we make a pessimistic
        assumption and warn that -fno-prune-tydecls should be used.
      5c18c653
    • keithw's avatar
      [project @ 1999-05-11 16:31:33 by keithw] · 39b581ba
      keithw authored
      (this is number 1 of 9 commits to be applied together)
      
        Dictionaries now appear in interface files explicitly, rather than
        as contexts: __forall [a] => {Show a} -> ... rather than __forall
        [a] {Show a} => ... .
      39b581ba
    • sof's avatar
      [project @ 1999-05-11 14:38:47 by sof] · c9674234
      sof authored
      myThreadId doc'ed
      c9674234
    • sof's avatar
      [project @ 1999-05-11 09:15:19 by sof] · 3d2c765b
      sof authored
      couple of fixes (courtesy of MPJ)
      3d2c765b
  2. 10 May, 1999 11 commits
  3. 07 May, 1999 7 commits
  4. 06 May, 1999 2 commits
  5. 05 May, 1999 8 commits
  6. 04 May, 1999 3 commits