-eval "exec perl -S $0 $*"
- if $running_under_some_random_shell;
+#
+#eval "exec perl -S $0 $*"
+# if $running_under_some_random_shell;
#
# reads CPP output and turns #line things into appropriate Haskell
# pragmas
#
# considered to be GHC-project specific
#
-#
# OPTIONALLY processes GENERATE_SPECS pragmas
# when give flag -genSPECS
#
#
# Note: There must be no white space between { }s
# Use ( )s around type names when separation is required
+#
+#
+# NOTE: this script needs RAWCPP set in order to do something
+# useful:
+#
+#$RAWCPP='';
+#
$Verbose = 0;
}
#ToDo: print a version number ?
-$OrigCpp = '$(RAWCPP)';
+$OrigCpp = ${RAWCPP};
if ( $OrigCpp =~ /(\S+)\s+(.*)/ ) {
$cmd = $1;
if ($#tospec >= 0) {
$specty = shift(@tospec);
- print ($data_or_inst ? "{-# SPECIALIZE $data_inst_str $specty #-}" : "$space{-# SPECIALIZE $fun :: $specty");
+ print ($data_or_inst ? "\{-# SPECIALIZE $data_inst_str $specty #-\}" : "$space\{-# SPECIALIZE $fun :: $specty");
while ($#tospec >= 0) {
$specty = shift(@tospec);
- print ($data_or_inst ? "; {-# SPECIALIZE $data_inst_str $specty #-}" : ", $specty");
+ print ($data_or_inst ? "; \{-# SPECIALIZE $data_inst_str $specty #-\}" : ", $specty");
}
print ($data_or_inst ? "\n" : " #-}\n");
} else {
- print "{- NO_SPECS_GENERATED ", $data_or_inst ? $specty : $fun, " -}\n";
+ print "\{- NO_SPECS_GENERATED ", $data_or_inst ? $specty : $fun, " -\}\n";
print STDERR "Warning: No specs for GENERATE_SPECS pre-processing pragma:\n $_";
}
print $tysig if ! $data_or_inst;