Skip to content

NoPartialFunctions: add Seq.cast to list of partial function identifiers#865

Merged
knocte merged 2 commits into
fsprojects:masterfrom
webwarrior-ws:seq-cast
Jul 7, 2026
Merged

NoPartialFunctions: add Seq.cast to list of partial function identifiers#865
knocte merged 2 commits into
fsprojects:masterfrom
webwarrior-ws:seq-cast

Conversation

@webwarrior-ws

Copy link
Copy Markdown
Contributor

Seq.cast is a partial function because it will raise an exception at runtime if one of the elements can't be cast to specified type.
Seq.choose tryUnbox is proposed as an alternative.

Added test that makes sure that using `Seq.cast` leads to a
warning suggesting using `Seq.choose tryUnbox` instead.
To list of partial function identifiers, because Seq.cast will
raise an exception at runtime if one of the elements can't be
cast to specified type.
@knocte

knocte commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

@webwarrior-ws next time, push the commit of the failing test first, then create PR, then push one by one; otherwise all CI status won't appear here.

@knocte knocte merged commit ba7f99e into fsprojects:master Jul 7, 2026
8 checks passed
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.

2 participants