-
Notifications
You must be signed in to change notification settings - Fork 72
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
Type level programming consistency #135
Comments
Thanks! I'm restating my understanding of your point. Please correct me where I'm misunderstanding you.
Specifically, in this line, I define a 'custom' Boolean type so that it appears similar to the That's a good point. I originally only used
I agree with you here. It's not until the Would you mind submitting a PR that fixes those things? |
So yes, you got that right. I can do the PR, actually I was working on it and I came across an "issue". If you want to try out the example in the REPL to say check I think it might be confusing to have As a side note, when I first started looking at purescript this edit |
Mm... I'm fine with you adding a Show constraint to make that work. I've already taken the
Good point. Well, the whole point of the folder is to teach the syntax. It's not really meant for 'real-world' examples. That's what the Hello World folder is for (and even that is lacking right now in such examples because I'm not sure what problems TLP specifically solve when we don't have backtracking). Somewhat related to this, there are actually two versions of a type-level Boolean: one that uses kinds and one that uses
That's actually another issue worth discussing separately from this as it does break one's intuition. I think that should also be clarified. Mind opening a new issue for it? |
Context
Indicate the affected section (i.e. top-level folder)
Syntax
Indicate what kind of issue this is
Bug
If it applies, indicate the file to which you are referring using non-numerical-ordering names
Body
Hello there. First of all thanks for writing this, I have to say, it's probably one of the best documents on functional programming and especially purescript out there. One of the very few as well.
Now to the point, it's not a bug per session, more of an inconsistency and especially for beginners like myself it's hard enough to keep track of these things.
So in explaining type level programming, in the specified files you use
Boolean
as an example case. But in Reflection you usedata Boolean_ = True_Value | False_Value
which you end up not using, the implementation actually usesBoolean
directly. I personally thinkBoolean_
is much better for beginners and it's in line with the used language so far. So this goes for Reification file as well. In the Reification file you end up usingBoolean
to begin with.Another thing in Reflection is that some comments talk about
BProxy
but the implementation is withBooleanProxy
. And even though it's longer, I think it's better to sayBooleanProxy
andBooleanProxyInstance
instead ofBProxy
&BProxyInstance
. The better consistency, the less confusing it becomes.Thanks again!
The text was updated successfully, but these errors were encountered: