layout rule infelicity
Two very similar programmmes:
possible_int = do skip_blanks fmap Just int +++ (literal "-" `as` Nothing)
possible_int = do skip_blanks fmap Just int +++ (literal "-" `as` Nothing)
I think this is extremely bad language design! In general I like having layout rules, but I've often thought that they ought to take note of expressions, not just things in {...} and that there ought to be "dead zones" where no programme text is allowed, so that everything starting with the second example and ending with
possible_int = do skip_blanks fmap Just int +++ (literal "-" `as` Nothing)
should be rejected. This example clinches it for me. Can anyone more au fait with the layout rule figure out how to do it? (My past irritation was that ... if p then q else r is acceptable in some circumstances, but one has to use ... if p then q else r in others. Having programmes rejected I don't mind, but having them accepted when they are too close to right but still wrong, I really do mind) -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk
participants (1)
-
Jon Fairbairn