Skip to content

Conversation

vdukhovni
Copy link
Contributor

thLiteral    :: Quote m => String -> Code m ByteString
thHexLiteral :: Quote m => String -> Code m ByteString

The former rejects inputs with non-octet code points above 0xFF. The latter rejects odd-length inputs or inputs with characters other than non-hexadecimal digits.

    thLiteral    :: Quote m => String -> Code m ByteString
    thHexLiteral :: Quote m => String -> Code m ByteString

The former rejects inputs with non-octet code points above 0xFF.
The latter rejects odd-length inputs or inputs with characters
other than non-hexadecimal digits.
@vdukhovni vdukhovni force-pushed the th-splices branch 2 times, most recently from 70f1a6a to b53c921 Compare August 16, 2025 08:26
@vdukhovni
Copy link
Contributor Author

@Bodigrim I don't understand what's going on with CI. Any help appreciated.

@Bodigrim
Copy link
Contributor

@vdukhovni no idea tbh. Maybe something changed under the hood, either in runner images or in the haskell action.

@vdukhovni
Copy link
Contributor Author

I have very little experience tuning GitHub CI. Any chance someone can help?

@Bodigrim
Copy link
Contributor

It seems it was an intermittent failure with https://github.com/haskell-actions/setup. I don't think you need to touch CI setup in this PR.

@vdukhovni
Copy link
Contributor Author

Thanks, indeed most of the problems appear to have been transient. I reverted the CI changes, and the only failure so far is with OpenBSD, which reports:
⚠️ Not enough compute credits to prioritize tasks!

Otherwise, no issues. So I think I'm done, unless you'd prefer to name the two functions differently. The names thLiteral and thHexLiteral were a best effort choice at the time, but one can probably make a case for other choices if these don't appeal.

@vdukhovni
Copy link
Contributor Author

Review request: @hsyl20 @Bodigrim @clyring

Copy link
Contributor

@hsyl20 hsyl20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I would prefer more explicit names: something like literalFromAscii (or literalFromChar8) and literalFromHex

@vdukhovni
Copy link
Contributor Author

LGTM

I would prefer more explicit names: something like literalFromAscii (or literalFromChar8) and literalFromHex

Many thanks for the prompt review! I'm about to push a fixup for all the nits, and what remains then is to reach consensus on the splice names. Of the above I prefer literalFromChar8 over literalFromAscii and have no objections to literalFromHex. I take it you don't see any benefit from including a th prefix to make it clear these are splices rather than directly usable functions?

@hsyl20
Copy link
Contributor

hsyl20 commented Aug 21, 2025

I take it you don't see any benefit from including a th prefix to make it clear these are splices rather than directly usable functions?

Yes the type and literal already convey that imo.

@Bodigrim Bodigrim requested a review from clyring August 24, 2025 10:28
@vdukhovni
Copy link
Contributor Author

@hsyl20, @Bodigrim Many thanks for the reviews, much appreciated. If at some point you find some more review cycles, I've revived, rebased and improved #569, so reviews there would also be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants