anonym | Anmelden | Neues Konto anmelden | 2022-07-01 13:18 UTC |
Startseite | Übersicht | Probleme anzeigen | Änderungsprotokoll | Roadmap | Dokumentation | Konto |
Einfache Problemansicht anzeigen [ Zu Notizen wechseln ] | [ erweiterte Anzeige ] [ Problem-Historie ] [ Drucken ] | ||||||
ID | Kategorie | Auswirkung | Reproduzierbar | Meldungsdatum | Letzte Aktualisierung | ||
0000080 | [Mascot] general | kleinerer Fehler | nicht getestet | 2011-08-08 16:29 | 2012-08-29 20:16 | ||
Reporter | sigonnea | Anzeigestatus | öffentlich | ||||
Bearbeitung durch | xclerc | ||||||
Priorität | normal | Lösung | erledigt | ||||
Status | erledigt | Produktversion | 1.0-beta | ||||
Zusammenfassung | 0000080: Check for whitespace after '.' used to denote polymorphic type | ||||||
Beschreibung |
The following definition should be accepted: let id: 'a. 'a -> 'a = fun x -> x (instead of complaining about an extra space after the dot) |
||||||
Zusätzliche Information |
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 |
||||||
Tags | Keine Tags zugeordnet. | ||||||
Angehängte Dateien | |||||||
|
Zu diesem Problem gibt es keine Notizen. |
Mantis 1.1.7[^] Copyright © 2000 - 2008 Mantis Group |