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

Cons typed implementation #1

Open
booch opened this issue May 8, 2015 · 1 comment
Open

Cons typed implementation #1

booch opened this issue May 8, 2015 · 1 comment

Comments

@booch
Copy link

booch commented May 8, 2015

I couldn't find the definition for Cons in either file. I was curious how it could be implemented in typed lambda. Is it just overloaded for each type?

@soumyadsanyal
Copy link
Owner

Hi Craig,

Sorry it took me a while to write back!

The 'Cons' constructor is in the 'lambda_lounge_typed.hs' file (lines 205 -
213) but not in the 'lambda_lounge_untyped.hs' file.

I mainly used it as an example of parametric polymorphism in Haskell; lists
are not actually implemented in our lambda calculus (yet).

As far as a definition goes, it's simply one of the (Haskell) value
constructors for the List' data constructor that I defined on line 205, and
as such is just a two-place/binary value constructor, but has no other
semantics than that. Just for reference there's a nice discussion of
Haskell data constructors here [
https://wiki.haskell.org/Constructor#Data_constructor].

I hope that clarifies things!

With bests,

Soumya


Soumya D. Sanyal

Postdoctoral Fellow
Center for High Assurance Computing
University of Missouri

http://soumyadsanyal.com

On Fri, May 8, 2015 at 12:33 AM, Craig Buchek notifications@github.com
wrote:

I couldn't find the definition for Cons in either file. I was curious how
it could be implemented in typed lambda. Is it just overloaded for each
type?


Reply to this email directly or view it on GitHub
#1.

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