Get expected type of expression using GHC API?

1 Jan
2014
1 Jan
'14
12:02 a.m.
Using the GHC API, you can get the inferred type of an `LHsExpr Id` via a `TypecheckedModule`, as hdevtools does[1]. Is there any way to get the expected type? This would be useful for cases where the expected type is much more polymorphic than the inferred type (or possibly for debugging type errors with -fdefer-type-errors, depending on what GHC does in that case). [1] https://github.com/bennofs/hdevtools/blob/master/src/Info.hs#L133
4157
Age (days ago)
4157
Last active (days ago)
0 comments
1 participants
participants (1)
-
Patrick Hurst