summaryrefslogtreecommitdiff
path: root/src/haddock/haddock-check.perl
diff options
context:
space:
mode:
authorpeb <unknown>2005-02-18 18:21:06 +0000
committerpeb <unknown>2005-02-18 18:21:06 +0000
commit9568d7a844ba6a1872a8e8f6ef002860057e62ab (patch)
tree9e25c6ed62e48101a2782d5fb8dcba68462dc613 /src/haddock/haddock-check.perl
parent1c4f025320900897ae3acdab6982f7d595b98dd1 (diff)
"Committed_by_peb"
Diffstat (limited to 'src/haddock/haddock-check.perl')
-rw-r--r--src/haddock/haddock-check.perl13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/haddock/haddock-check.perl b/src/haddock/haddock-check.perl
index b65fbcc68..81901fa52 100644
--- a/src/haddock/haddock-check.perl
+++ b/src/haddock/haddock-check.perl
@@ -8,8 +8,10 @@
# - transforming hard space to ordinary space
# limitations:
-# - does not check that type aliases are put in the export list
# - there might be some problems with nested comments
+# - cannot handle type signatures for several functions
+# (i.e. "a, b, c :: t")
+# but on the other hand -- haddock has some problems with these too...
$operSym = qr/[\!\#\$\%\&\*\+\.\/\<\=\>\?\@\\\^\|\-\~\:]+/;
$funSym = qr/[a-z]\w*\'*/;
@@ -34,6 +36,15 @@ for $file (@ARGV) {
print "-- $file\n";
+ # substituting hard spaces for ordinary spaces
+ $nchars = tr/\240/ /;
+ if ($nchars > 0) {
+ print " ! Substituted $nchars hard spaces\n";
+ open F, ">$file.hs";
+ print F $_;
+ close F;
+ }
+
# the module header
s/^(--+\s*\n)+//s;
unless (s/^-- \|\s*\n//s) {