Dear Haskell community,
the GHC Steering committee is seeking nominations for one or more new
members.
The committee scrutinizes, nitpicks, improves, weighs and eventually
accepts or rejects proposals that extend or change the language
supported by GHC and other (public-facing) aspects of GHC.
Our processes are described at
https://github.com/ghc-proposals/ghc-proposals
which is also the GitHub repository where proposals are proposed. In
particular, please have a look at the bylaws at
https://github.com/ghc-proposals/ghc-proposals/blob/master/committee.rst
We are looking for a member who has the ability
* to understand such language extension proposals,
* to find holes and missing corner cases in the specifications,
* foresee the interaction with other language features and
specifications,
* comment constructively and improve the proposals,
* judge the cost/benefit ratio and
* finally come to a justifiable conclusion.
We look for committee members who have some of these properties:
* have substantial experience in writing Haskell applications or
libraries, which they can use to inform judgements about the
utility or otherwise of proposed features,
* have made active contributions to the Haskell community, for
some time,
* have expertise in language design and implementation, in either
Haskell or related languages, which they can share with us.
There is no shortage of people who are eager to get fancy new features
into the language, both in the committee and the wider community. But
each new feature imposes a cost, to implement, to maintain in
perpetuity in GHC's code base, to learn, and to deal with its
unexpected interaction with other features. We need to strike a
balance, one that encourages innovation (as GHC always has) while still
making Haskell attractive for real-world production use and for
teaching. We therefore seek a balance of background, expertise, and
views on the committee.
Membership of the committee gives you the chance to influence the
future direction of Haskell, and to serve the Haskell community. The
committee’s work requires a small, but non-trivial amount of time,
especially when you are assigned a proposal for shepherding. We
estimate the workload to be around 2 hours per week, and our process
works best if members usually respond to technical emails within 1-2
weeks (within days is even better). Please keep that in mind if your
email inbox is already overflowing.
To nominate yourself, please send an email to me (as the committee
secretary) at mail(a)joachim-breitner.de until February 11th. I will
distribute the nominations among the committee, and we will keep the
nominations and our deliberations private.
On behalf of the committee,
Joachim Breitner
--
Joachim Breitner
mail(a)joachim-breitner.de
http://www.joachim-breitner.de/
PUBLIC
Hi,
I'm writing a type checker plugin that should do things whenever used in the context of a module that already has some definitions loaded. I've hacked together the following function using internal details that I feel I should not be using:
lookupOrigMaybe :: Module -> OccName -> TcPluginM (Maybe Name)
lookupOrigMaybe mod occ = do
hsc_env <- getTopEnv
unsafeTcPluginTcM $ liftIO $ updateNameCache (hsc_NC hsc_env) mod occ $ \cache0 -> do
let name = lookupOrigNameCache cache0 mod occ
return (cache0, name)
I would like to do this in a nicer way instead. It should be enough to check that the given module is already loaded, since for my use case, if the module is there but the name isn't, then all bets are off and my plugin might as well just error out. So I was hoping I could use `findImportedModule` followed by `lookupOrig`, but alas, `findImportedModule` fails me in one of two ways:
1. If I don't specify the package (i.e. use `NoPkgQual`), `findImportedModule` seems to return a `Found{}` result even when the module isn't actually loaded yet, leading to `lookupOrig` failing:
attempting to use module 'main:Cortex.Stem.Relation.Types' (Cortex.Stem.Relation.Types) which is not loaded
1. If I do specify the package (using `ThisPkg`), then `findImportedModule` chokes in situations when the given unit would come "later" in the dependency graph than the currenty processed one:
ghc-mu-core-to-exp: panic! (the 'impossible' happened)
GHC version 9.5.20220830:
findImportModule
Cortex.Stem.Relation.Types
"main"
Just ghc-bignum
main
[ghc-bignum, cortex-prim]
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/GHC/Utils/Panic.hs:188:37 in ghc-lib-0.20220830-FvKByKwp6ri5ICk6wiQO8W:GHC.Utils.Panic
pprPanic, called at compiler/GHC/Unit/Finder.hs:160:32 in ghc-lib-0.20220830-FvKByKwp6ri5ICk6wiQO8W:GHC.Unit.Finder
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
So my question then, is what is the recommended way of looking up a loaded definition opportunistically from a type checker plugin?
Thanks,
Gergo
This email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please delete all copies and notify the sender immediately. You may wish to refer to the incorporation details of Standard Chartered PLC, Standard Chartered Bank and their subsidiaries at https: //www.sc.com/en/our-locations
Where you have a Financial Markets relationship with Standard Chartered PLC, Standard Chartered Bank and their subsidiaries (the "Group"), information on the regulatory standards we adhere to and how it may affect you can be found in our Regulatory Compliance Statement at https: //www.sc.com/rcs/ and Regulatory Compliance Disclosures at http: //www.sc.com/rcs/fm
Insofar as this communication is not sent by the Global Research team and contains any market commentary, the market commentary has been prepared by the sales and/or trading desk of Standard Chartered Bank or its affiliate. It is not and does not constitute research material, independent research, recommendation or financial advice. Any market commentary is for information purpose only and shall not be relied on for any other purpose and is subject to the relevant disclaimers available at https: //www.sc.com/en/regulatory-disclosures/#market-disclaimer.
Insofar as this communication is sent by the Global Research team and contains any research materials prepared by members of the team, the research material is for information purpose only and shall not be relied on for any other purpose, and is subject to the relevant disclaimers available at https: //research.sc.com/research/api/application/static/terms-and-conditions.
Insofar as this e-mail contains the term sheet for a proposed transaction, by responding affirmatively to this e-mail, you agree that you have understood the terms and conditions in the attached term sheet and evaluated the merits and risks of the transaction. We may at times also request you to sign the term sheet to acknowledge the same.
Please visit https: //www.sc.com/en/regulatory-disclosures/dodd-frank/ for important information with respect to derivative products.