-
Notifications
You must be signed in to change notification settings - Fork 42
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
Allow getting type errors without having to kill the interpreter #48
Conversation
If it's "similar to typeChecks, but gives more information", perhaps name it something similar? Also, what is the string that may be returned if there isn't an error - the same as If it only ever returned an error, you could call it Also please squash your commits when you're done. |
Yes, |
Sure, makes sense. My Haskell/GHC fu is simply not good enough to realise whether this kind of optimization makes sense here. Perhaps GHC is smart enough to deduplicate part of the work if it's split into two separate expressions. In any case, this just needs a better name to be merged. |
Yes, I like the direction of your suggestion of I just had the idea of |
Exporting the latter to make it more possible for others to catch errors too Also added a relevant note on `-fdefer-type-errors`
Travis was down yesterday, so I restarted the CI builds to get it green. By the way, why are you exporting |
My thinking on that export was multi-fold:
Any thoughts on the above? |
Whoops, missed that. GitHub doesn't tell you when someone updates the commits in a pull request, and it's really annoying.
Let's do that. Not because it could be unstable or break in the future, but rather because it means we don't have to think too hard about the API just yet. We can change the name or signature at a later time without worry. |
Ping, @Wizek? |
I'm giving this another go and wrestling with haddock at the moment. For some reason -- | In this module we intend to export some internal functions.
--
-- __Important note__: the authors of this library imply no assurance whatsoever
-- of the stability or functionality of the API exposed here, and compatibility
-- may break even by minor version changes. Rely on these at your
-- own risk.
--
-- The reason for showing them here is to aid discoverability
-- of already written code and prevent having to reinvent the wheel from
-- scratch if said wheel is already invented.
--
-- Some [to be finished...]
module Hint.Internal (module ReExport) where
import Hint.Typecheck as ReExport (onCompilationError) Any ideas? p.s. this may be relevant: haskell/haddock#563 |
That issue does seem very relevant; try listing the functions individually
instead of re-exporting the entire module.
…On Jan 26, 2018 7:25 PM, "Milán Nagy" ***@***.***> wrote:
I'm giving this another go and wrestling with haddock at the moment.
For some reason onCompilationError doesn't show up in the docs when I try
this:
-- | In this module we intend to export some internal functions.---- __Important note__: the authors of this library imply no assurance whatsoever-- of the stability or functionality of the API exposed here, and compatibility-- may break even by minor version changes. Rely on these at your-- own risk.---- The reason for showing them here is to aid discoverability-- of already written code and prevent having to reinvent the wheel from-- scratch if said wheel is already invented.---- Some [to be finished...]
module Hint.Internal (module ReExport) where
import Hint.Typecheck as ReExport (onCompilationError)
Any ideas?
p.s. this may be relevant: haskell/haddock#563
<haskell/haddock#563>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#48 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAC_aPcjU-WDa3HngkubEZQXu88Z3VS7ks5tOm0AgaJpZM4RfDs->
.
|
That did the trick, thanks @gelisam! |
and export onCompilationError through it instead
Pushed. Thanks again @gelisam for the rapid response. I've also been wondering if there was a simple/easy way of exporting the whole of And at any rate that question is quite tangential to this PR, so I wouldn't want to hold this up longer for that. Can be done separately at any time. |
Fixes #24
Also, can anyone think of a better name for the
getType
function?