[project @ 1998-07-20 16:10:42 by sof]
authorsof <unknown>
Mon, 20 Jul 1998 16:10:42 +0000 (16:10 +0000)
committersof <unknown>
Mon, 20 Jul 1998 16:10:42 +0000 (16:10 +0000)
- turn on cloning in first simplifier pass to ensure
  that the output from desugarer&TC gets unique binders
  before the Simplifier TransformFest really gets going.
- Solaris specific: include -lsocket in the linker
  command line when using -syslib misc.
- pipe through to compiler the new option -funfold-casms-in-hi-file.

ghc/driver/ghc.lprl

index 9f96736..3a1e23c 100644 (file)
@@ -704,6 +704,17 @@ sub setupOptimiseFlags {
 #        '-fsimpl-uf-use-threshold0',
 #        '-fessential-unfoldings-only',
 
+         #
+         # The presence of -fclone-binds is *temporary* to work around
+          # the fact that the desugarer in 3.0{2.3} does generate
+         # bindings with identical ids, and the type checker doesn't perform
+         # properly cloned type substitutions. Instead, we make sure that all 
+         # binders are cloned first time through the simplifier.
+          #
+         # Will be properly fixed in the `new compiler` I hear, at which point
+         # the cloning can be turned off here.
+          '-fclone-binds',
+
          $Oopt_MaxSimplifierIterations,
          $Oopt_ShowSimplifierProgress,
          ']',
@@ -739,6 +750,9 @@ sub setupOptimiseFlags {
 #        '-fessential-unfoldings-only',
 #        '-fsimpl-uf-use-threshold0',
 
+         # See remark re: cloning in defn of minusnotO
+         '-fclone-binds',
+
          '-fmax-simplifier-iterations1',
          $Oopt_PedanticBottoms,
          ']',
@@ -2833,7 +2847,7 @@ arg: while($_ = $Args[0]) {
                            } elsif ( $syslib eq 'misc' && 
                                      $TargetPlatform =~ /-solaris2$/ ) {
                                # needed for Berkeley socket/nwork stuff.
-                               push(@SysLibrary, '-lnsl');
+                               push(@SysLibrary, '-lnsl -lsocket');
                            } elsif ( $syslib eq 'win32' && 
                                      $TargetPlatform =~ /-cygwin32$/ ) {
                                # need to get at UI/Graphics functionality.
@@ -2983,6 +2997,9 @@ arg: while($_ = $Args[0]) {
     /^-funfolding-.*$/
                    && do { push(@HsC_flags, $_); next arg };
 
+    /^-funfold-casms-in-hi-file$/
+                   && do { push(@HsC_flags, $_); next arg };
+
     /^(-fmax-simplifier-iterations)(.*)$/
                    && do { $Oopt_MaxSimplifierIterations = $1 . &grab_arg_arg(*Args,$1, $2);
                            next arg; };