Skip to content

Monomorphic and/or #14

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

Closed
hdgarrood opened this issue May 2, 2015 · 7 comments
Closed

Monomorphic and/or #14

hdgarrood opened this issue May 2, 2015 · 7 comments

Comments

@hdgarrood
Copy link
Contributor

Lattice does look really nice, but the absence of and / or functions specialized to Boolean does worry me a little. Given that it could make error messages harder to understand, and also given that Boolean and / or are arguably common enough that they deserve their own operators, would you consider specializing (&&) and (||) to Boolean values, and finding some other symbols for sup and inf?

@paf31
Copy link
Contributor

paf31 commented May 2, 2015

I think that sounds like a good idea. I'm fine keeping sup and inf as the more generic names.

@garyb
Copy link
Member

garyb commented May 2, 2015

I don't think there are any monomorphic operators now, so why would Boolean be special in that?

I guess I don't mind though, we could use \/ and /\ for sup and inf operators, although this would unfortunately collide with the nested Tuple operator. I'd probably rather rename that though.

@hdgarrood
Copy link
Contributor Author

True - in particular, given (&&) and (||) work for any BoolLike now, perhaps I'm imagining a problem that doesn't really exist. Have you ever encountered people confused by it? If not I suppose there isn't really sufficient evidence to justify action.

@hdgarrood
Copy link
Contributor Author

Looks like it has confused at least one person before: http://ircbrowse.net/browse/purescript?events_page=103

@garyb
Copy link
Member

garyb commented May 2, 2015

That's down to not rather than the operators actually...

@garyb
Copy link
Member

garyb commented May 2, 2015

And really it's a problem because of not inferring constraints 😉

@hdgarrood
Copy link
Contributor Author

Ah, of course. Ok - never mind then.

turlando pushed a commit to purescm/purescript-prelude that referenced this issue Sep 4, 2021
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

No branches or pull requests

3 participants