1. 16 Oct, 2001 8 commits
    • simonmar's avatar
      [project @ 2001-10-16 13:31:56 by simonmar] · a5977a45
      simonmar authored
      Format some comments to 80 columns.
      a5977a45
    • simonmar's avatar
      [project @ 2001-10-16 13:29:35 by simonmar] · d7051036
      simonmar authored
      Don't print the 'Loading package...' message for packages which don't
      require any loading (gmp & rts in particular).
      d7051036
    • simonmar's avatar
      [project @ 2001-10-16 13:25:00 by simonmar] · 5c3ea6ed
      simonmar authored
      - set the buffering mode on stdout & stderr to unbuffered in
        interactive mode
      
      - fix some bugs in package linking: loading a package using the :set
        command wasn't using the same mechanism as the command-line package
        loading to avoid linking in dynamic libraries that are already
        linked into the GHCi binary.
      
      - fix a compile error.
      
      MERGE TO STABLE
      5c3ea6ed
    • simonmar's avatar
      [project @ 2001-10-16 11:29:08 by simonmar] · 16e131e6
      simonmar authored
      mention that you might need to add -lHSrts before any other libraries
      on the linker command line, if another library has its own main() function.
      16e131e6
    • rrt's avatar
      [project @ 2001-10-16 11:20:58 by rrt] · 35d7d23c
      rrt authored
      Strip out \r on Windows. This should not be necessary as Perl should
      read in text mode on a text mounted volume (under Cygwin).
      35d7d23c
    • simonmar's avatar
      [project @ 2001-10-16 10:50:11 by simonmar] · b8d0c391
      simonmar authored
      mention that identifiers beginning with a double underscore are to be
      avoided in -fglasgow-exts mode.
      b8d0c391
    • simonpj's avatar
      [project @ 2001-10-16 10:37:32 by simonpj] · 30e84fce
      simonpj authored
      Fix the default-expansion code for HEAD; fixes cg050
      30e84fce
    • simonmar's avatar
      [project @ 2001-10-16 10:01:13 by simonmar] · 43d343ab
      simonmar authored
      Explicitly sign- or zero-extend the result of a ccall up to the word
      size if necessary.  Recent discussion on
      glasgow-haskell-users@haskell.org suggests that this is the
      responsibility of the caller rather than the callee.
      
      We do it by wrapping the result in narrow{8,16,32}{Int,Word}# as
      appropriate, at desugaring time, because this way we only have to do
      it once instead of once per backend.  Furthermore the narrowing is
      exposed to the simplifier which is generally a good thing.
      43d343ab
  2. 15 Oct, 2001 5 commits
    • simonpj's avatar
      [project @ 2001-10-15 16:03:04 by simonpj] · 5e65c9fe
      simonpj authored
      --------------------------
      	Tidy up arity propagation (the saga continues)
      	--------------------------
      
      Turns out that it's not as easy as I thought.
      
      The code generator was assuming that (not . isLocalName) was enough to
      identify an imported thing (whose CgInfo should be right), but that's
      not true.  Needs more thought.
      
      Meanwhile, I've made the code generator a bit more sensible about how
      it looks things up.  But there's still a problem for GHCi: the
      unfoldings in the TypeEnv won't have CgIdInfo stuff.  Sigh.  Thinks.
      5e65c9fe
    • simonpj's avatar
      [project @ 2001-10-15 15:06:01 by simonpj] · 713b32a5
      simonpj authored
      --------------------------
      	Tidy up arity propagation
      	--------------------------
      
      Due to excessive complexity, correct arity information was getting
      lost on the way to interface files.  As a result, a function that had
      CPR info __S SLm (say), was getting arity 0, and this confused the (old)
      CPR analyser ("lub of function and HasCPR").
      
      I hope this fixes the above error (which showed up somewhere in
      compiling Edison), but I'm going to commit it right now anyway.
      Meanwhile I'll recompile Edison too.
      
      
      Details
      ~~~~~~~
      Digging out the rather obscure cause made me tidy up the CgInfo stuff.
      The story is now
      
      * The CgInfo field of an Id gets attached to the Id *only* in
        the TypeEnv of the ModuleDetails, during CoreTidy.
      
        This ModuleDetails stuff is used
      	a) to generate the interface file
      	b) to import into other modules in GHCi
      
      * No CgInfo field is in the CoreBindings which are passed
        downsteam to CorePrep and thence CodeGen.  Quite right too...
        it's the downstream stuff that *generates* the CgInfo.
      
      * But the Arity field *is* now passed on through CoreTidy
        (like strictness info) since it is usefully used by CorePrep.
      
      * On the way I simplified the ArityInfo field of an IdInfo
        to simply
      		Arity
        instead of
      		Maybe Arity
      713b32a5
    • simonpj's avatar
      [project @ 2001-10-15 15:05:17 by simonpj] · c4854c78
      simonpj authored
      Rename ifaceTyCls to ifaceTyThing (more consistent)
      c4854c78
    • simonpj's avatar
      [project @ 2001-10-15 15:03:48 by simonpj] · 3d5a3720
      simonpj authored
      Add comments re eta expansion
      3d5a3720
    • simonpj's avatar
      [project @ 2001-10-15 15:03:24 by simonpj] · 97bef2ce
      simonpj authored
      Add comment for type of unsafeCoerce#
      97bef2ce
  3. 13 Oct, 2001 5 commits
  4. 12 Oct, 2001 3 commits
  5. 11 Oct, 2001 4 commits
    • sof's avatar
      [project @ 2001-10-11 23:52:51 by sof] · 41d3a213
      sof authored
      Robustified handling of paths, allowing both / and \ to be recognised
      as path separators under Win32 -- ghc-5.02-win32 has a bug where
      it will barf when invoked as follows:
      
         c:\dot\net> ghc -c c:\dot\net\foo.hs -odir c:\dot\net\output
      
      i.e., a DOS-style input filename together with the use of -odir. (5.02
      constructs an illegal path for the -o argument to the assembler).
      
      Branch mergers: go wild
      41d3a213
    • sof's avatar
      [project @ 2001-10-11 22:27:04 by sof] · cbaf5d63
      sof authored
      - removed Win32-only IOErrorType.ComError
      - added IOErrorType.(DynIOError Dynamic.Dynamic)
      
        Propagating dynamically-typed exceptions as Exception.DynException
        isn't always the right thing to do
        [ why? You cannot catch them with IO.catch & you don't get the
          'infrastructure' that IOError offers, so you're forced to
          reinvent that wheel for each dynamic exception.
        ]
      - removed IOExts.isComError  :: IOError -> Bool
      - added IOExts.isDynIOError  :: IOError -> Bool
      - added IOExts.getDynIOError :: IOError -> Dynamic.Dynamic
      - documented IOExts changes.
      cbaf5d63
    • simonpj's avatar
      [project @ 2001-10-11 16:44:10 by simonpj] · b5bab055
      simonpj authored
      Add special ILX case for Coerce
      b5bab055
    • sewardj's avatar
      [project @ 2001-10-11 14:31:45 by sewardj] · e55df039
      sewardj authored
      Correctly handle unboxed tuples when converting DEFAULT alts to
        unboxed tuple constructors in case args.  (I'm sure this could
        be worded better).  Branch and HEAD have drifted too far apart
        for easy common commit for this, so is committed seperately for
        ghc-5-02-branch.
      e55df039
  6. 10 Oct, 2001 4 commits
    • sof's avatar
      [project @ 2001-10-10 23:18:43 by sof] · 6baa39f9
      sof authored
      Remove HDirect/COM package.
      6baa39f9
    • sof's avatar
      [project @ 2001-10-10 23:17:14 by sof] · 3f1b7ac4
      sof authored
      savePackageConfig: Robustified - remove existing .old file before saving
      away new. In case of failure, print out a msg detailing what files were
      involved.
      3f1b7ac4
    • sof's avatar
      [project @ 2001-10-10 17:25:15 by sof] · 46e21424
      sof authored
      - fixed awfully bad bug in allocation of new argv vector, it
        did:
      
            malloc(sizeof(char) * (argc + 1 + 1));
      
        where it should have done:
      
            malloc(sizeof(char*) * (argc + 1 + 1));
      
        [ This one is the cause of one or two 5.02 bug reports
          that are now starting to trickle in. As a stopgap
          measure (and since I'm to blame for this one, really),
          I've put up a replacement ghci.exe wrapper at
      
            http://www.galconn.com/~sof/ghci.zip
        ]
      
      - added some (currently disabled) debug print code.
      46e21424
    • ken's avatar
      [project @ 2001-10-10 17:17:44 by ken] · 9508d01a
      ken authored
      Pass the "-mieee" flag to gcc, so that we get IEEE floating-point.
      (Fixed: pass the flag all the time, not just when compiling HC files.)
      MERGE TO STABLE
      9508d01a
  7. 09 Oct, 2001 1 commit
  8. 08 Oct, 2001 2 commits
  9. 04 Oct, 2001 4 commits
  10. 03 Oct, 2001 4 commits
    • simonpj's avatar
      [project @ 2001-10-03 16:20:57 by simonpj] · a1b59a18
      simonpj authored
      Add comments, and nuke strictness info in CoreTidy if totally boring
      a1b59a18
    • rrt's avatar
      [project @ 2001-10-03 15:30:57 by rrt] · d1bf2fc3
      rrt authored
      Dear Sigbjorn,
      
      next time you turn an
      
      if...endif
      
      into an
      
      if...else..endif
      
      remember to check the sense of the test. Sometimes, it needs to be reversed
      (there was in this case a hint in the surrounding code).
      
      Love,
      
      Reuben.
      d1bf2fc3
    • simonpj's avatar
      [project @ 2001-10-03 13:59:22 by simonpj] · ea00738b
      simonpj authored
      wibbles only
      ea00738b
    • simonpj's avatar
      [project @ 2001-10-03 13:58:50 by simonpj] · f659cb97
      simonpj authored
      ---------------------
      	Clear up infelicities
      	---------------------
      	CorePrep, CoreUtils, SimplUtils
      	LiberateCase (wibbles only)
      
      * Previously CorePrep was floating LocalIds to top level, which
        breaks the invariant that after CorePrep all top level Ids are
        GlobalIds.  But it didn't really need to, and this pass makes it
        so.  It's much tidier now.
      
      * Make CorePrep do eta expansion on partial applications
      	x = foldr f y  ==>   x = \ys -> foldr f y ys
        (This used to be done in the simplifier, but now the
        simplifier only eta expands where there is at least one
        lambda already.)
      
      * Omit CoreUtils.etaReduce.  (Never called.)
      
      * Improve CoreUtils.etaExpand, so that it doesn't add gratuitous
        beta redexes.
      f659cb97