Haskell 1.4 Prelude bug

1997-07-23 Thread Justin Cormack

Is there an official place to send bug reports to?

There are several bugs in the lex function specified in the PreludeText
section of the Standard Prelude for Haskell 1.4. To start with the subsidiary
function lexLitChar is not defined. Also there is a typo isAlphaNum instead
of isAlphanum (this typo also appears on page 34 of the Standard Libraries
report). There are I suspect some further bugs too. Also Hugs does not lex
the backquote character as specified in the definition.

More generally, I wonder why this is in the Prelude rather than a library
where it would seem more appropriate?

Justin Cormack






Re: Native Mode on Linux i386?

1997-07-23 Thread David Barton

I haven't had time to download his binary distribution and try to
recompile 2.04 yet.  When I do, I'll let you know how it went.

Sometimes I just don't get the time to do the things I *want* to do.

Dave Barton *
[EMAIL PROTECTED] )0(
http://www.intermetrics.com/~dlb



Re: Compiling 2.04 with 2.02, problems

1997-07-23 Thread Simon L Peyton Jones


Peter,  

Sorry for the long silence about your bug report.

2.02 wasn't advertised as strong enough to boot GHC itself.  If you want
to compile 2.04, use 0.29.  Even 2.04 can't boot itself.  2.05 will be able
to I have an optimised build going right now!

Simon

| From: Peter Liljenberg [EMAIL PROTECTED]
| Date: 06 Jul 1997 16:13:31 +0200
| Hello!
| 
| I'm trying to compile 2.04 using 2.02 for solaris2, but I get this
| error message:
| 
| 
| ==fptools== make all;
|  in /home/petli/ghc-2.04/build/solaris2.4/ghc/compiler
| 
| ghc -cpp -fhaskell-1.3 -fglasgow-exts -DCOMPILING_GHC -Rghc-timing -I. -IcodeGe
|  n -InativeGen -Iparser -iutils -ibasicTypes -itypes -ihsSyn -iprelude -irename
|   -itypecheck -ideSugar -icoreSyn -ispecialise -isimplCore -istranal -istgSyn -
|  isimplStg -icodeGen -iabsCSyn -imain -ireader -iprofiling -iparser -inativeGen
|   -recomp -DOMIT_DEFORESTER   -K2m  -c hsSyn/HsExpr.lhs -o hsSyn/HsExpr.o -osuf
|   o
|  
| hsSyn/HsExpr.lhs:9: A group of type signatures have mismatched contexts
| HsExpr.pprExpr :: 
| (Name.NamedThing id{-a2gF-}, Outputable.Outputable 
|  id{-a2gF-}, Outputable.Outputable pat{-a2gG-}, PrelBase.Eq tyvar{-a2gH-}, Outp
|  utable.Outputable tyvar{-a2gH-}, PrelBase.Eq uvar{-a2gI-}, Outputable.Outputab
|  le uvar{-a2gI-}) = ...
| HsExpr.pprParendExpr :: 
| (Name.NamedThing id{-a2gJ-}, Outputable.Outputable 
|  id{-a2gJ-}, Outputable.Outputable pat{-a2gK-}, PrelBase.Eq tyvar{-a2gL-}, Outp
|  utable.Outputable tyvar{-a2gL-}, PrelBase.Eq uvar{-a2gM-}, Outputable.Outputab
|  le uvar{-a2gM-}) = ...
|  
|  
|  
| Compilation had errors
| make[2]: *** [hsSyn/HsExpr.o] Error 1
| 
| 
| I could probably make do with 2.02, but as has been noted before here,
| it doesn't like solaris2.4, so I figured that this (in build.mk)
| should fix this (after recompiling the 2.04 with itself, of course...):
| 
|  BUILD_LD_OPTS += -lc -L/usr/ucblib -lucb
| 
| Or is there an easier way to patch the compiler, preferably in a
| binary dist?



Re: Mysterious DEC utterances.

1997-07-23 Thread Sven Panne

Alex Ferguson wrote:
 [...]
 I'm using OSF 3.2, however, so your kilometerage may vary considerably...
 [...]
 ghc-0.29 -o hsc [ridiculously long argument list removed]
 /bin/ld:
 Warning: Linking some objects which contain exception information sections
 and some which do not. This may cause fatal runtime exception handling
 problems (last obj encountered without exceptions was main/LoopHack.o).

I don't speak DECish too fluently, but here's my humble guess:
Under arcane circumstances, linking gcc-compiled code on DEC-Unix 3.2
produces the above warning. It's annoying, but it doesn't hurt (at least
apart from aesthetics :-) .  Anyway, I digged up an old gcc patch from
long forgotten sources and appended it to this mail.

BTW, stripping executables with the GNU-strip makes some trouble
on our DECs. Wise comments from a DEC-grandmaster would be greatly
appreciated...

Much fun recompiling gcc!  :-]


(My first mailing attempt failed because vanuata.dcs.gla.ac.uk and my
 Netscape apparently didn't like each other, having a dispute about
 their MIME-dialects. So here's good ol' ASCII... :-(

-- SNIP -- SNIP -- gcc-2.7.2/config/alpha/osf32.h -- SNIP -- SNIP
/* Definitions of target machine for GNU compiler, for DEC Alpha.
   Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
   Contributed by Richard Kenner ([EMAIL PROTECTED])

This file is part of GNU CC.

GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */


#include "alpha/osf2.h"

/* In OSF 3.2, the loader issues warnings about possible exception handling
   problems in object files which do not define a .text section and
   which define the symbols `gcc2_compiled.' and `__gnu_compiled_c'
   without any section specification. The following is a work around
   and I do not know if it really works right! But at least it
   suppresses the nasty loader warnings. */

#if defined (EXTRA_SECTIONS)
#undef  EXTRA_SECTIONS
#endif
#define EXTRA_SECTIONS  readonly_data, local_readonly_const_data

#if defined (EXTRA_SECTION_FUNCTIONS)
#undef EXTRA_SECTION_FUNCTIONS
#endif
#define EXTRA_SECTION_FUNCTIONS \
void\
literal_section ()  \
{   \
  if (in_section != readonly_data)  \
{   \
  static int firsttime = 1; \
\
  fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \
  if (firsttime)\
{   \
  firsttime = 0;\
  ASM_OUTPUT_DOUBLE_INT (asm_out_file, const0_rtx); \
}   \
\
  in_section = readonly_data;   \
}   \
}   \
void\
rconst_section ()   \
{   \
  if (in_section != local_readonly_const_data)  \
{   \
  fprintf (asm_out_file, ".rconst\n");  \
  in_section = local_readonly_const_data;   \
}   \
}   \

#if defined (ASM_IDENTIFY_GCC)
#undef  ASM_IDENTIFY_GCC
#endif
#define ASM_IDENTIFY_GCC(FILE)  \
   do { rconst_section ();  \
fprintf(FILE, "gcc2_compiled.:\n");} while(0)

#if defined (ASM_IDENTIFY_GCC)
#undef  ASM_IDENTIFY_LANGUAGE
#endif
#define ASM_IDENTIFY_LANGUAGE(FILE) \
   do { rconst_section ();  \
fprintf (FILE, "__gnu_compiled_%s:\n", lang_identify ());} while(0)


-- SNIP -- SNIP --