Coder Social home page Coder Social logo

old-site's People

Contributors

splintersuidman avatar

Watchers

 avatar

old-site's Issues

Confused about constFlip

I hope you don't mind if I ask you a question.
On your page at:
https://splintah.github.io/posts/2020-05-27-Polymorphic-lambda.html

you define:

type of const : \/ A. \/ B. A -> B -> A
Further down the page you say: "The first step is:"

then in your definition of T-TyApp you have:

in context Gamma we know : type of const : \/ A. \/ B. A -> B -> B
------------------------------------------------------------------
in context Gamma we know : type of const B : (\/ B. A -> B -> A)[A:=B]

Now I'm confused. Don't you mean?

in context Gamma we know : type of constFlip : \/ A. \/ B. B -> A -> B
------------------------------------------------------------------
in context Gamma we know : type of constFlip B : (\/ B. B -> A -> B)[A:=B]


you still get: subst gives: \/ B. B -> B -> B

or do you mean?

in context Gamma we know : type of const : \/ A. \/ B. A -> B -> A
------------------------------------------------------------------
in context Gamma we know : type of const B : (\/ B. A -> B -> A)[A:=B]

and you still get: subst gives: \/ B. B -> B -> B

I don't see how

const : \/ A. \/ B. A -> B -> B
became
const B : (\/ B. A -> B -> A)[A:=B]

By the way, I'm really enjoying reading your posts about types. This
is really the first time I think I understand why Haskell has those
implicit foralls everywhere. Thanks so much for taking the time to
write this.

Best wishes,
Henry Laxen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.