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

Lets.Lens: Types for setP and getP incorrect? #10

Open
endgame opened this issue May 10, 2018 · 1 comment
Open

Lets.Lens: Types for setP and getP incorrect? #10

endgame opened this issue May 10, 2018 · 1 comment

Comments

@endgame
Copy link

endgame commented May 10, 2018

From here:

setP :: Prism s t a b -> s -> Either t a
getP :: Prism s t a b -> b -> t

This seems backwards.

@endgame
Copy link
Author

endgame commented May 10, 2018

Further, the first function should probably have type Prism s s a a -> s -> Either s a (no type-changing) and the second should probably have type Prism s t a b -> s -> b -> t (needs a structure to set).

@endgame endgame changed the title Lets.Lens: Types for setP and getP reversed? Lets.Lens: Types for setP and getP incorrect? May 10, 2018
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

1 participant