Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hindley-Milner Algorithm Say I have the letters A, B representing type variables which are initially unbound and a,b,c representing type constructors. I need then to

Hindley-Milner Algorithm

Say I have the letters A, B representing type variables which are initially unbound and a,b,c representing type constructors. I need then to show the bindings of type variables obtained through unification (or explain why if it fails).

I'm given the following pair of types:

a(A,b(c)) and a(B,A) 

I have two questions:

1) What do they mean by type constructor? to me this; a(A,b(c)), looks like a is the type constructor here which is a function taking two parameters.

2) Can someone show me what approach they would take? I looked here to understand the concept: http://www.cs.cornell.edu/courses/cs3110/2011sp/Lectures/lec26-type-inference/type-inference.htm

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions

Question

Why are annual accounts fi led and published?

Answered: 1 week ago