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

Strong #276

Open
puffnfresh opened this issue Oct 25, 2017 · 6 comments
Open

Strong #276

puffnfresh opened this issue Oct 25, 2017 · 6 comments

Comments

@puffnfresh
Copy link
Member

Instead of Arrow (#273) we should have Strong Profunctor. It probably makes sense to do Choice Profunctor with this.

The occurrences of Tuple and Either should be Scott-encoded so we don't have to directly specify data types.

@safareli
Copy link
Member

Is Scott encoding same as Church encoding? if not what's the difference

@CrossEye
Copy link

I'm an atheist and not involved in Church encoding.

-- Scott

@puffnfresh
Copy link
Member Author

@safareli there's an awesome paper on this:

https://ifl2014.github.io/submissions/ifl2014_submission_13.pdf

Church:

2017-10-27-070919_391x140_scrot

Scott:

2017-10-27-070926_334x108_scrot

@paldepind
Copy link

The occurrences of Tuple and Either should be Scott-encoded so we don't have to directly specify data types.

I think using an object encoding is more appropriate for JavaScript. See my comment here for a rationale.

@safareli
Copy link
Member

@puffnfresh for non recursive data types both Church and Scott encoding would be same right?

@ivenmarquardt
Copy link

I'd love to see Scott encoded ADTs in FL. Javascript has multi argument functions, so products are for free.

@safareli Yes, both are implemented as continuations. Scott uses functional pattern matching (uncons) to deconstruct recursive types, whereas Church uses a catamorphism (foldr). As a result Scott has explicit recursion (at the type and value level) and Church implicit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants