-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misuse of withDelayedSucceeding
#72
Comments
Ein möglicher Name für die Funktion inklusive |
Zum Beispiel würde damit all dies überflüssig: https://github.com/fmidue/ba-katharina-braasch/blob/21fb239477b708e358b9076c08852e55c5d5d7ec/src/findliar.txt#L181-L196 |
Auch dies hier: flex-tasks/tasks/proplogic.txt Lines 311 to 316 in b50ab20
Delayed ).
Ich vermute, da ist irgendwas in dieser Art möglich: parsingWithFallback complainAboutMissingParenthesesIfNotFailingOn allSymbolParser (stringList $ map fst xs)
(parsingWithFallback complainAboutMissingParenthesesIfNotFailingOn formulaSymbolParser formula . checkSyntax' names)
where parsingWithFallback messaging fallBackParser s f = parseDelayedWithAndThen parser messaging fallBackParser f (delayed s) wobei die |
Also already closed by #77 now. |
Eigentlich ist
withDelayedSucceeding
für Situationen gedacht, wo von Autotool aus einDelayed
ankommt und keine weitere Kontrolle darüber besteht. Wenn man selbst dasdelayed
erst einführt wie inflex-tasks/tasks/proplogic.txt
Lines 345 to 348 in b50ab20
Spezifischer ist
äquivalent zu:
whatToDo (fromRight' (parse (fully parser) "" answer))
Vielleicht wäre es sinnvoller, für
fromRight' (parse (fully parser) "" answer)
oder fürparse (fully parser) "" answer
eine Hilfsfunktion einzuführen (ggfs. inlogic-tasks
, wo es schon diverse ähnliche Funktionen mit spezielleren Typen gibt, etwaTrees.Parsing.formulaParse
), wodurch sich obiger Code dann schreiben ließe als:checkSemantics' nSol columns names $ newFunction (stringTuple (stringList headers) formula))
Bzw. sogar:
The text was updated successfully, but these errors were encountered: