ocaml / merlin

Context sensitive completion for OCaml in Vim and Emacs
https://ocaml.github.io/merlin/
MIT License
1.57k stars 233 forks source link

Instantiate polymorphic types and show the resulting monomorphized type #213

Closed roshanjames closed 10 years ago

roshanjames commented 10 years ago

Polymorphic functions like List.map can be given monomorphized types in specific contexts based on the type of the arguments they are supplied with. It would be nice if merlin could have a function to display such monomorphised types. ocaml-spot used to show monomorphized types in this way.

I think the current behavior of merlin-type-enclosing where it shows the polymorphic type is the right default. Maybe you could add another function to display the concrete type in a specific context.

let-def commented 10 years ago

After executing merlin-type-enclosing, you can use merlin-type-enclosing-go-up (conversely, merlin-type-enclosing-go-down) to see more-or-less generalized types.

roshanjames commented 10 years ago

That is perfect. Thanks. You can close this issue.

On Jun 20, 2014, at 3:29 PM, def-lkb notifications@github.com wrote:

After executing merlin-type-enclosing, you can use merlin-type-enclosing-go-up (conversely, merlin-type-enclosing-go-down) to see more-or-less generalized types.

— Reply to this email directly or view it on GitHub.