Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started