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

Fix docs for defining instances #39

Closed
3noch opened this issue Nov 1, 2016 · 3 comments
Closed

Fix docs for defining instances #39

3noch opened this issue Nov 1, 2016 · 3 comments

Comments

@3noch
Copy link

3noch commented Nov 1, 2016

This example from the docs is off:

data Person = Person
  { name :: String
  , age  :: Int }

instance FromForm Person where
  fromForm (Form m) = Person
    <$> parseUnique "name" m
    <*> parseUnique "age"  m

Form m should just be m.

@fizruk
Copy link
Owner

fizruk commented Nov 7, 2016

Thanks! I wish I could make those code samples to be compiled (like with doctest) while keeping it looking nice (e.g. compared to doctest's multiline input). Do you know of a way?

@fizruk fizruk closed this as completed in 008cbc8 Nov 14, 2016
@fizruk
Copy link
Owner

fizruk commented Nov 14, 2016

I've finally got to it! Sorry it took so long.

@3noch
Copy link
Author

3noch commented Nov 14, 2016

No problem. I have yet to think of a way to do this automatically without messing with appearance...

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

2 participants