-
Notifications
You must be signed in to change notification settings - Fork 380
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
[refactor] Use multiline strings for better readability #1142
Conversation
There hasn't been a release with multiline strings, so it's too early to introduce them in the compiler as it will break the build with the last release. |
Where is the CI? |
No idea why it can't run. It just shows "Queued" status. |
I guess this can wait and then I will rebase when a release comes out. |
|
As much as everyone is excited about multi-line strings I would hold off on using them in the compiler, there likely will be breaking changes soon-ish, since not all features have been implemented yet. Most notably the changes to typechecking have not been implemented and that is:
Those are tracked here #555 |
By the way, when suggesting such a change, why not to indent the whole multiline literal since it's supported too? Show Metadata where
show (MkMetadata apps names tydecls currentLHS holeLHS) = #"""
Metadata:
lhsApps: \#{ show apps }
names: \#{ show names }
type declarations: \#{ show tydecls }
current LHS: \#{ show currentLHS }
holes: \#{ show holeLHS }
"""# as in the PR, to write it like Show Metadata where
show (MkMetadata apps names tydecls currentLHS holeLHS) = #"""
Metadata:
lhsApps: \#{ show apps }
names: \#{ show names }
type declarations: \#{ show tydecls }
current LHS: \#{ show currentLHS }
holes: \#{ show holeLHS }
"""# or even Show Metadata where
show (MkMetadata apps names tydecls currentLHS holeLHS) = """
Metadata:
lhsApps: \{ show apps }
names: \{ show names }
type declarations: \{ show tydecls }
current LHS: \{ show currentLHS }
holes: \{ show holeLHS }
""" which all the same, but indented versions read better. |
ed97006
to
14bb79f
Compare
4194966
to
43413f9
Compare
43413f9
to
713ba0f
Compare
I think it's no longer be blocked since 0.4 has just been released. |
876baa3
to
8e7a9fb
Compare
Synced with |
8e7a9fb
to
61768f8
Compare
\{ | ||
unlines [" (load-shared-object \"" ++ escapeStringChez lib ++ "\")" | lib <- libs] | ||
}) | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
""" | |
""" |
startChezWinSh chez appDirSh targetSh = #""" | ||
#!/bin/sh | ||
|
||
set -e # exit on any error | ||
|
||
DIR=$(dirname "$(readlink -f -- "$0")") | ||
CHEZ=$(cygpath "\#{ chez }") | ||
|
||
export PATH="$DIR/\#{ appDirSh }":$PATH | ||
|
||
"$CHEZ" --program "$DIR/\#{ targetSh }" "$@" | ||
|
||
"$CHEZ" -q \ | ||
--libdirs "$DIR/\#{ appDirSh }" \ | ||
--program "$DIR/\#{ targetSh }" \ | ||
"$@" | ||
"""# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, the hashtag escape is not necessary because the quote in the multiline string is not considered as an end symbol.
This is marked "blocked" and "do not merge" and has a few conflicts. It loooks like a nice refactoring, but it does seem to have got stale, so I'm going to close it for the sake of tidiness. If that's premature, please feel free to reopen (but also please try to resolve the blockage before doing so!) |
Is it not blocked anymore since 0.5 is released? |
I agree with @andylokandy : the reason it was marked blocked was
I think (1) is now fine, since we've had multiline strings in the previous release (I think?). |
Given that generic interpolation has already been merged, I created a new PR #2044 because I couldn't reopen this one. |
No description provided.