Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HdevtoolsType cannot give types in files with errors #30

Open
Cypher1 opened this issue Mar 15, 2017 · 1 comment
Open

HdevtoolsType cannot give types in files with errors #30

Cypher1 opened this issue Mar 15, 2017 · 1 comment

Comments

@Cypher1
Copy link

Cypher1 commented Mar 15, 2017

I feel that, at least for some code, Hdevtools should be able to work out the type of the relevant value/variable without all of the code needing to be able to be compiled.

e.g.

main = print 2*3

It would be great if we could verify that the type of print was Show a => a -> IO ()

For this simple case there is little value in this but for more complex cases (e.g. where type errors do not allow the program to be executed) it would be great to be able to see types of parts of the broken code.

p.s. Thanks for the extension, I use it all the time

@jamesdbrock
Copy link
Contributor

Try passing the -fdefter-type-errors flag to the GHC invoked by hdevtools.

With vim-hdevtools, that would be, in .vimrc,

let g:hdevtools_options = '-g-fdefer-type-errors'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants