API function to check whether one type fits in another

2012-06-24 Thread Philip K. F. Hölzenspies
L.S., I sent this to the cvs-ghc list, but was - correctly - redirected here. We're trying to write an alternative interactive front-end (alternative to ghci). This front-end is very type-driven; terms are composed not as characters on a prompt, but as applications of terms to terms. At every

Re: API function to check whether one type fits in another

2012-06-24 Thread Philip K. F. Hölzenspies
L.S., I've come up with some minor progress myself, but I could still do with a little help. The attached file is the smallest thing I could come up with to replicate my problem. I'm using tcMatchTy now to try and match two types, hoping to find TyVar substitutions when the types unify. Given