Skip to content
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

Use Proxy type for type info? #1

Closed
paf31 opened this issue Apr 3, 2015 · 4 comments
Closed

Use Proxy type for type info? #1

paf31 opened this issue Apr 3, 2015 · 4 comments

Comments

@paf31
Copy link

paf31 commented Apr 3, 2015

First off, this looks fantastic.

I just noticed you're using things like an unused m a in the Bind check, to infer the type info. Maybe a set of Proxy types would be an improvement, since you might not even be able to produce a value of type m a easily.

@garyb
Copy link
Member

garyb commented Apr 3, 2015

Ah, you noticed this :) I was going to open an issue asking for review anyway.

Yeah, I was thinking of something like that too. Where would be a good place for the Proxy type to live? I made one in affjax too, but having an entire library for it perhaps seems overkill? Maybe not.

I wasn't sure about the utility of the tests for Semigroupoid and Category too, seems it might be a little hard to produce values for those that are testable due to the Eq (a b e) constraint, as obviously that won't work for (->), for example.

@paf31
Copy link
Author

paf31 commented Apr 3, 2015

The issue is that Proxy is naturally poly-kinded, which we can't do right now. Some kind of purescript-proxy library wouldn't be a bad idea though.

I was wondering if it would be possible to introduce some fake types to take the place of the a, b, c, etc. in tests. For Monad, for example, you don't care what a is, just m. So we could make an enum type with say, 20 inhabitants or something, and just use that every time.

@garyb
Copy link
Member

garyb commented Apr 3, 2015

Yeah, maybe I'll do that for now then, make a tiny library and include Proxy2, Proxy3 etc.

Agreed on the Monad stuff too. Could just use unit for that I guess?

@garyb
Copy link
Member

garyb commented Apr 3, 2015

Actually I guess unit isn't good enough, it could easily hide problems.

@garyb garyb closed this as completed Apr 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants