1. 21 Aug, 2001 9 commits
  2. 20 Aug, 2001 21 commits
    • simonpj's avatar
      [project @ 2001-08-20 16:50:13 by simonpj] · 0c190d9e
      simonpj authored
      	Make NOINLINE zap the strictness info
      Make a NOINLINE pragma zap strictness information.
      Reasons given in the WorkWrap comment:
      	-- Furthermore, zap the strictess info in the Id.  Why?  Because
      	-- the NOINLINE says "don't expose any of the inner workings at the call
      	-- site" and the strictness is certainly an inner working.
      	-- More concretely, the demand analyser discovers the following strictness
      	-- for unsafePerformIO:  C(U(AV))
      	-- But then consider
      	--	unsafePerformIO (\s -> let r = f x in
      	--			       case writeIORef v r s of (# s1, _ #) ->
      	--			       (# s1, r #)
      	-- The strictness analyser will find that the binding for r is strict,
      	-- (becuase of uPIO's strictness sig), and so it'll evaluate it before
      	-- doing the writeIORef.  This actually makes tests/lib/should_run/memo002
      	-- get a deadlock!
      	-- Solution: don't expose the strictness of unsafePerformIO.
      This fixes the memo002 deadlock.
    • simonpj's avatar
      [project @ 2001-08-20 16:48:50 by simonpj] · 01417029
      simonpj authored
      Add assertion
    • simonmar's avatar
      [project @ 2001-08-20 16:17:17 by simonmar] · 9035ad45
      simonmar authored
      - be more informative about primitive types: they are identified as
        such, and a declaration is printed out as if the thing was an
        abstract data type (this at least tells you what the arity of the
        tycon is).
      - print 'infix 4 elem' as 'infix 4 `elem`'.
    • simonmar's avatar
      [project @ 2001-08-20 16:15:34 by simonmar] · 5cd52635
      simonmar authored
      Do something vaguely useful in ifaceTyCls when presented with a
      primitive type constructor.  We pretend it's an abstract data type for
    • sof's avatar
      [project @ 2001-08-20 14:57:42 by sof] · 63ea1af6
      sof authored
      sigemptyset: may be implemented as a macro on some plats,
      so wrap it up in an inline function to get the C types
      right. (Thomas Nordin, using OpenBSD, spotted this one).
    • simonmar's avatar
      [project @ 2001-08-20 14:44:05 by simonmar] · 136e0eee
      simonmar authored
      This StablePtr test is old, most of the features it uses are
      deprecated and have been replaced by newer mechanisms (eg. foreign
      export) which is tested elsewhere.
    • simonpj's avatar
      [project @ 2001-08-20 14:18:30 by simonpj] · 6184716f
      simonpj authored
      Amplify comment on mkMachInt a little
    • simonmar's avatar
      [project @ 2001-08-20 14:10:02 by simonmar] · cc7aac1f
      simonmar authored
      Remove the in-range assertions on mkMachInt/mkMachWord.  They clearly
      aren't true, because there's nothing stopping you from writing an
      out-of-range Int# literal (although that's the only way I can see for
      these to arise).
      The wider issue is what should be done about out-of-range Int#
      literals; I vaguely remember that at some point we disallowed them,
      but I can't find anything in the logs.  The case which triggered the
      assertion, namely "intToWord# 0xffff0000" would appear to be a
      legitimate use for an out-of-range Int# literal though, given that
      you can't write Word# literals directly.
    • sewardj's avatar
      [project @ 2001-08-20 13:43:18 by sewardj] · 130f6b84
      sewardj authored
      I have braved the insanity of the Sparc calling conventions and lived
      to tell the tale.  This commit adds support for foreign import
      {static,dynamic} for Sparc in GHCi.
    • simonmar's avatar
      [project @ 2001-08-20 13:18:17 by simonmar] · 354050a3
      simonmar authored
      Commit a new autoheader-generated version of this file.
    • simonmar's avatar
      [project @ 2001-08-20 13:17:06 by simonmar] · 2649f0fc
      simonmar authored
      It isn't necessary to put HAVE_DLOPEN in here, autoheader can figure
      that out for itself.
    • simonmar's avatar
      [project @ 2001-08-20 13:15:52 by simonmar] · ab04639e
      simonmar authored
      dunno what DATA_SECTION_WIBBLE is supposed to be, but it doesn't
      appear anywhere else in the source tree so I'm removing it.
    • simonmar's avatar
      [project @ 2001-08-20 13:15:04 by simonmar] · 018a827a
      simonmar authored
      check for lstat()
    • chak's avatar
      [project @ 2001-08-20 12:36:10 by chak] · d1ba9036
      chak authored
      Added two links to CVS
    • simonpj's avatar
      [project @ 2001-08-20 11:00:18 by simonpj] · e80b5e1a
      simonpj authored
      Remove the identity-substitution "optimisation" from zip_ty_env.
      	-- There used to be a special case for when
      	--	ty == TyVarTy tv
      	-- (a not-uncommon case) in which case the substitution was dropped.
      	-- But the type-tidier changes the print-name of a type variable without
      	-- changing the unique, and that led to a bug.   Why?  Pre-tidying, we had
      	-- a type {Foo t}, where Foo is a one-method class.  So Foo is really a newtype.
      	-- And it happened that t was the type variable of the class.  Post-tiding,
      	-- it got turned into {Foo t2}.  The ext-core printer expanded this using
      	-- sourceTypeRep, but that said "Oh, t == t2" because they have the same unique,
      	-- and so generated a rep type mentioning t not t2.
      	-- Simplest fix is to nuke the "optimisation"
    • simonmar's avatar
      [project @ 2001-08-20 10:20:34 by simonmar] · 72e0e2a8
      simonmar authored
      Now copes with more forms of identifiers, as suggested by Marcin.
    • simonmar's avatar
      [project @ 2001-08-20 10:19:47 by simonmar] · e20dee90
      simonmar authored
      Add a new entry point: parseIdentifier, which parses a qualified or
      non-qualified operator or variable, including parenthesised and
      backquoted forms, and the special identifiers [], (), (,), (,,) etc.
    • simonpj's avatar
      [project @ 2001-08-20 08:17:38 by simonpj] · 95c1df87
      simonpj authored
      Fix (another) "missing instnace" bug in the renamer.
      This one interacted with the interactive loop in ghci.
    • simonpj's avatar
      [project @ 2001-08-20 07:54:33 by simonpj] · 27f289f3
      simonpj authored
      Improve error messages from the typechecker,
      after a suggestion from Alastair Reid.
    • simonpj's avatar
      [project @ 2001-08-20 07:48:36 by simonpj] · ba464c6a
      simonpj authored
      Trim import lists
    • simonpj's avatar
      [project @ 2001-08-20 07:48:05 by simonpj] · 76138d21
      simonpj authored
      Print implicit-parameter bindings properly
  3. 19 Aug, 2001 1 commit
  4. 18 Aug, 2001 2 commits
  5. 17 Aug, 2001 7 commits
    • sof's avatar
      [project @ 2001-08-17 22:29:06 by sof] · 9db4c813
      sof authored
      needs this since 'mkdependHS' also chases #includes.
      Not an issue with ghc-5.xx's dep-generator, since it invokes
      CPP prior to gathering up the imports.
      This should bring ghc-4.08-based nightly builds back to life.
    • apt's avatar
      [project @ 2001-08-17 17:18:51 by apt] · 1dfaee31
      apt authored
      How I spent my summer vacation.
      The format of the primops.txt.pp file has been enhanced to allow
      (latex-style) primop descriptions to be included.  There is a new flag
      to genprimopcode that generates documentation including these
      descriptions. A first cut at descriptions of the more interesting
      primops has been made, and the file has been reordered a bit.
      31-bit words
      The front end now can cope with the possibility of 31-bit (or even 30-bit)
      Int# and Word# types.  The only current use of this is to generate
      external .core files that can be translated into OCAML source files
      (OCAML uses a one-bit tag to distinguish integers from pointers).
      The only way to get this right now is by hand-defining the preprocessor
      symbol WORD_SIZE_IN_BITS, which is normally set automatically from
      the familiar WORD_SIZE_IN_BYTES.
      Just in case 31-bit words are used, we now have Int32# and Word32# primitive types
      and an associated family of operators, paralleling the existing 64-bit
      stuff.  Of course, none of the operators actually need to be implemented
      in the absence of a 31-bit backend.
      There has also been some minor re-jigging of the 32 vs. 64 bit stuff.
      See the description at the top of primops.txt.pp file for more details.
      Note that, for the first time, the *type* of a primop can now depend
      on the target word size.
      Also, the family of primops intToInt8#, intToInt16#, etc.
      have been renamed narrow8Int#, narrow16Int#, etc., to emphasize
      that they work on Int#'s and don't actually convert between types.
      As another part of coping with the possibility of 31-bit ints,
      the addr2Int# and int2Addr# primops are now thoroughly deprecated
      (and not even defined in the 31-bit case) and all uses
      of them have been removed except from the (deprecated) module
      Addr# should now be treated as a proper abstract type, and has these suitable operators:
      nullAddr# : Int# -> Addr# (ignores its argument; nullary primops cause problems at various places)
      plusAddr# :  Addr# -> Int# -> Addr#
      minusAddr : Addr# -> Addr# -> Int#
      remAddr# : Addr# -> Int# -> Int#
      Obviously, these don't allow completely arbitrary offsets if 31-bit ints are
      in use, but they should do for all practical purposes.
      It is also still possible to generate an address constant, and there is a built-in rule
      that makes use of this to remove the nullAddr# calls.
      There is a new compile flag -fno-code that causes GHC to quit after generating .hi files
      and .core files (if requested) but before generating STG.
      Z-encoded names for tuples have been rationalized; e.g.,
      Z3H now means an unboxed 3-tuple, rather than an unboxed
      tuple with 3 commas (i.e., a 4-tuple)!
      Removed misc. litlits in hslibs/lang
      Misc. small changes to external core format.  The external core description
      has also been substantially updated, and incorporates the automatically-generated
      primop documentation; its in the repository at /papers/ext-core/core.tex.
      A little make-system addition to allow passing CPP options to compiler and
      library builds.
    • sof's avatar
      [project @ 2001-08-17 16:06:30 by sof] · d30f8fc1
      sof authored
      - have SysTools.FileOption take a prefix that is not to be transformed
        (this is to accommodate MS-style cmd-line options of the kind: "/out=foo.obj")
      - have users of Finder.mkHomeModuleLocn catch up with recent change to its type.
    • simonmar's avatar
      [project @ 2001-08-17 15:46:54 by simonmar] · 150d5559
      simonmar authored
      bugfix for -G1
    • simonmar's avatar
      [project @ 2001-08-17 14:44:54 by simonmar] · 25f71699
      simonmar authored
      fix a profiling bug: the cost centre stack in a raise_closure wasn't
      being initialised.
    • simonmar's avatar
      [project @ 2001-08-17 12:56:55 by simonmar] · 7f12c16a
      simonmar authored
      The .hi file wasn't tracking the module name (my fault).  Fix it.
    • sewardj's avatar
      [project @ 2001-08-17 12:43:24 by sewardj] · 0e3ae44d
      sewardj authored
      On 4.08.X compilers, just make rawSystem be System.system.  This is
      so we can still build stage1s with 4.08.X.  It won't work on Win32
      but the minimum compiler to build a stage1 for Win32 is 5.01 AFAICS.