Skip to content

Define Rel8.Table.Maybe.projectMaybe and export it #364

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JackKelly-Bellroy
Copy link
Contributor

See #360 (reply in thread) for discussion and motivation. Briefly, it's to make it clearer how to turn a MaybeTable into a Maybe.

@JackKelly-Bellroy
Copy link
Contributor Author

@ocharles @sfwc Do either of you have an opinion about this?

@sfwc
Copy link

sfwc commented Mar 11, 2025

@ocharles @sfwc Do either of you have an opinion about this?

My opinion shouldn't carry any weight, but for what it's worth: now that I see it written up, I'm not sure that having this predefined really adds any value over id $?. I think I'd just vote for adding a note to the documentation. Unless projectMaybe can be defined in some other way that leads to better SQL in some cases? (I don't know whether there's ever any important difference between id $? and maybeTable null nullify, for instance.)

@JackKelly-Bellroy
Copy link
Contributor Author

While I agree that it's understandable once you understand it, having it as a documented function that includes its implementation in the haddock means that hopefully the reader will find it in the documentation or via Hoogle, notice notice that it's a really simple function, and make a considered decision whether to bother using it.

@JackKelly-Bellroy
Copy link
Contributor Author

Has anyone had a chance to look at this, and should we consider other ADT-esque tables like EitherTable for symmetry?

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