Does haskell-mode or some alternative package offer something akin to the wonderful inferior-haskell-type
inside a where
clause?
For example, suppose I have
foo = undefined where
bar = complicated
...
it would be super-awesome to be able to place the marker at bar
and inspect its type.
This is possible with Scion in combination with Emacs.
C-c C-t
shows type of identifier at point. This only works if the current file typechecks, but then it also works for local identifiers. For polymorphic function it will show the type to which they are instantiated, e.g.,f x = x + (1::Int)
Calling this command on
+
will printInt -> Int -> Int
instead ofNum a => a -> a -> a
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With