Skip to content

Link to documentation repo as docs for non-Prim built-in types/kinds - #3460

Merged
LiamGoodacre merged 5 commits into
purescript:masterfrom
JordanMartinez:improvePrimDocs
Dec 2, 2018
Merged

Link to documentation repo as docs for non-Prim built-in types/kinds#3460
LiamGoodacre merged 5 commits into
purescript:masterfrom
JordanMartinez:improvePrimDocs

Conversation

@JordanMartinez

Copy link
Copy Markdown
Contributor

Fixes #3459

- put row's kind signature (# Type) before its example.
- lowercase Row to row to not risk implying that it's a name of 
something in the language
- change `functionTypeSignature` to `f` since the meta-language function 
name is unneeded
- change "click here" link text to more appropriate "purescript language 
reference"
@hdgarrood

Copy link
Copy Markdown
Contributor

This is pretty close to being mergeable now imo, but one last nitpick: I think we should have

For example, row kinds (e.g. # Type, which is the kind of types such as (name :: String, age :: Int))

instead of

For example, the row kind (i.e. # Type, which is the kind of types such as (name :: String, age :: Int))

since I think the latter, by using the article the together with i.e. (= that is), implies that # Type is the unique row kind, when # Type is just one of many kinds involving #.

@JordanMartinez

Copy link
Copy Markdown
Contributor Author

Nitpicks are fine, especially on docs. I'll fix it.

@JordanMartinez

Copy link
Copy Markdown
Contributor Author

I believe you asked someone in another PR to add their names to the list of contributors. Will that be required of me as well before this gets merged?

@hdgarrood

Copy link
Copy Markdown
Contributor

Yes please :)

@JordanMartinez

Copy link
Copy Markdown
Contributor Author

Pushed. Just need to wait on CI then.

@hdgarrood

Copy link
Copy Markdown
Contributor

Sorry, I should have been a little clearer: I think it would be best to replace the i.e. with an e.g. in addition to pluralising 'row kinds', since I would argue that (even though you've already pluralised 'row kinds') the i.e. still implies that # Type could be the only row kind.

@JordanMartinez

Copy link
Copy Markdown
Contributor Author

Oh. No, that's my bad for misreading your feedback. I'll push another commit with that change.

@hdgarrood hdgarrood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@JordanMartinez

Copy link
Copy Markdown
Contributor Author

Unrelated to this PR, but I always thought that the row kind was # Type. However, it seems it's actually # that gets applied to some other kind, such as Type or perhaps BooleanKind. For example, # Type or # BooleanKind are both examples of row kinds being used.

Is that correct? I never see other examples of row kinds, so that's why I've thought that for so long.

@hdgarrood

Copy link
Copy Markdown
Contributor

Yeah, that is correct. For any kind k, there is also a kind # k, which is the kind of rows with labels of kind k. So for example, you could have

( greeting :: "Hello, World", favouriteColor :: "Blue" )

which has kind # Symbol, or even

( foo :: ( bar :: "Baz" ) )

which has kind # (# Symbol). You can verify the kinds of these types in the repl with :k (although there does seem to be a bug where the parentheses aren't being printed properly in kinds like # (# Symbol) at the moment).

@LiamGoodacre

Copy link
Copy Markdown
Member

Thanks!

@JordanMartinez
JordanMartinez deleted the improvePrimDocs branch December 3, 2018 17:01
@garyb garyb mentioned this pull request Jan 12, 2019
3 tasks
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.

3 participants