Mantis - Mascot
Erweiterte Problemanzeige
80 general kleinerer Fehler nicht getestet 2011-08-08 16:29 2012-08-29 20:16
sigonnea  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine 1.0  
0000080: Check for whitespace after '.' used to denote polymorphic type
The following definition should be accepted:

    let id: 'a. 'a -> 'a = fun x -> x

(instead of complaining about an extra space after the dot)
Below is a hacky patch that corrects this:

diff --git a/src/checks/typo_spacesAroundPunctuation.ml b/src/checks/typo_spacesAroundPunctuation.ml
index 1762cda..36a9eb2 100644
--- a/src/checks/typo_spacesAroundPunctuation.ml
+++ b/src/checks/typo_spacesAroundPunctuation.ml
@@ -40,6 +40,17 @@ let parameters = Parameter.empty_map
 
 let run _ _ (_, tokens) _ report =
   let rec iter = function
+ | _ :: (_, _, (Camlp4.Sig.SYMBOL "'")) :: tl ->
+ (match tl with
+ | (_, _, (Camlp4.Sig.LIDENT _)) :: (_, _, (Camlp4.Sig.BLANKS _ as prev)) :: (line, column, (Camlp4.Sig.SYMBOL ".")) :: tl'
+ | (_, _, (Camlp4.Sig.LIDENT _ as prev)) :: (line, column, (Camlp4.Sig.SYMBOL ".")) :: tl' ->
+ let s = "." in
+ let err = report.Check.error line (Some column) in
+ Camlp4Utils.check_not_white "sign" s err prev;
+ Camlp4Utils.check_first_white "sign" s err tl';
+ iter tl'
+ | _ -> iter tl
+ )
     | (_, _, prev) :: (line, column, (Camlp4.Sig.SYMBOL s)) :: tl ->
         let err = report.Check.error line (Some column) in
         (match s with
Problem-Historie
2011-08-08 16:29 sigonnea Neues Problem
2012-08-29 20:16 xclerc Status neu => erledigt
2012-08-29 20:16 xclerc Behoben in Version => 1.0
2012-08-29 20:16 xclerc Lösung offen => erledigt
2012-08-29 20:16 xclerc Bearbeitung durch => xclerc

Zu diesem Problem gibt es keine Notizen.