// // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // esskaykay.c -- // // Author : Richard C. Bilson // Created On : Wed May 27 17:56:53 2015 // Last Modified By : Peter A. Buhr // Last Modified On : Fri Jun 10 15:25:12 2016 // Update Count : 4 // // forall (otype A, otype B, otype C) C ess (C (*f) (A,B), B (*g) (A), A x) { return f(x,g(x)); } forall (otype A, otype B, otype C) C ess (C (*(*f)(A))(B), B (*g)(A), A x) { return f(x)(g(x)); } // forall (otype A, otype B) A kay (A a, B b) { return a; } forall (otype A, otype B) A (*kay(A a))(B b); // Now is the following function well-typed, or not? forall (otype A) A esskaykay (A x) { ess (kay, kay, x); } // Local Variables: // // tab-width: 4 // // compile-command: "cfa esskaykay.c" // // End: //