-
Notifications
You must be signed in to change notification settings - Fork 139
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
Towards a direct (non plugin-based) API #2388
Towards a direct (non plugin-based) API #2388
Conversation
everything is done as late as possible, i.e. explicitly showing which steps require re-typechecking and which steps require re-desugaring.
The title of the PR intrigues me, but the changes in the last commit look ok. |
Regarding the When I remove it, many failures seem to be related to the fact that module LocalSpec() where
import Language.Haskell.Liquid.Prelude (choose)
prop = if x > 0 then bar x else x
where x = choose 0
{-@ bar :: Nat -> Nat @-}
bar :: Int -> Int
bar x = x
{-@ bar :: a -> {v:Int | v = 9} @-}
bar :: a -> Int
bar _ = 9 but if I open the export list, then verification passes again -module LocalSpec() where
+module LocalSpec where Fixing this might require building LH environment from names in scope rather than Update: Looking up for TyThings for everything in |
Basically, I'm thinking of a "bring-your-own- For example, in that setting, "the" parsed module as seen by a plugin (LH or otherwise) might not actually be the right module if the API client needs to do some postprocessing on it. |
Indeed, the only part of |
Could you point me to where exactly this is? Do you mean Whether you should use Also, if you need all this so you can match user-written occurrences in LH specs to the GHC side, you shouldn't need to build anything from the |
That's the place. |
For users that need to do custom steps on the way to a full
TypecheckedModule
, it'd make sense to provide an API that directly consumes theTypecheckedModule
.