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

Add example for newtype parameter in routes #57

Merged

Conversation

brodeuralexis
Copy link
Contributor

Also add parens to previous examples that failed compilation.

Also add parens to previous examples that failed compilation.
@CLAassistant
Copy link

CLAassistant commented May 1, 2018

CLA assistant check
All committers have signed the CLA.

GUIDE.md Outdated
Using the following routes with a `newtype`:
```purescript
newtype PostId = PostID Int
derive instance newtypePostID :: Newtype PostId _
Copy link
Collaborator

Choose a reason for hiding this comment

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

Some inconsistent casing (PostId vs PostID).

GUIDE.md Outdated
| PostBrowse String String
```

It is possible to warp an `int` route parameter into a `PostId` using the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo "warp"

GUIDE.md Outdated
following function:
```purescript
postId :: forall f. MatchClass f => f PostId
postId = pure wrap <*> int
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is wrap <$> int, but I would prefer PostId <$> int.

GUIDE.md Outdated
postId = pure wrap <*> int
```

The created `postId` function can then be used like the `str` function.
Copy link
Collaborator

Choose a reason for hiding this comment

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

str isn't a function. I would say "parser" instead.

@thomashoneyman thomashoneyman changed the base branch from master to main October 6, 2020 03:04
@JordanMartinez
Copy link
Contributor

I've addressed Nate's feedback above, but we still need a changelog entry file, which can't be added in this PR AFAIK unless the original author adds that change.

@thomashoneyman thomashoneyman merged commit 14cc938 into purescript-contrib:main Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants