[ghc-steering-committee] #216: Qualified Do again, recommendation: accept the alternative
Simon Peyton Jones
simonpj at microsoft.com
Thu Apr 16 15:02:28 UTC 2020
| the variant is described in 6.1.2 of the proposal:
PS: Sorry for missing that. (It has not been mentioned in any of the discussion.)
Simon
| -----Original Message-----
| From: ghc-steering-committee <ghc-steering-committee-
| bounces at haskell.org> On Behalf Of Joachim Breitner
| Sent: 16 April 2020 15:57
| To: ghc-steering-committee at haskell.org
| Subject: Re: [ghc-steering-committee] #216: Qualified Do again,
| recommendation: accept the alternative
|
| Hi,
|
| Am Donnerstag, den 16.04.2020, 14:48 +0000 schrieb Simon Peyton Jones
| via ghc-steering-committee:
| > It would be really helpful to have a single source of truth.
| Perhaps
| > someone (Joachim or anyone else) can write a Google doc that
| > describes, as precisely as possible, the proposal that he is
| > advocating. Or get the proposal authors to do so. Just saying “a
| > variant where the value does not need to be in scope” does not count
| > as a specification (to me).
|
| the variant is described in 6.1.2 of the proposal:
| https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
| ub.com%2Ftweag%2Fghc-proposals%2Fblob%2Flocal-do%2Fproposals%2F0000-
| local-do.rst%23612qualifieddo-with-operations-that-are-not-in-
| scope&data=02%7C01%7Csimonpj%40microsoft.com%7Ccfc3548461cb4f9c537
| b08d7e21665ba%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63722645813
| 8396283&sdata=fiV%2B37%2BsCuijDL1dx7iyryEkiPWoRC1ZKGtxq4xf9K4%3D&a
| mp;reserved=0
| has a spec (“resolves to any (>>=) that is exported by any module
| aliased by the name M, independently of whether it is in scope (i.e.
| imported).” and an I think enlightening example (albeit with an odd
| duplication of imports).
|
| > Then.
| > 1. import MyMonad as M
| > (+) other operations do not need to be qualified
| > (-) unqualified `>>=` may be ambiguous
| >
| > What are “other operations”?
|
| Anything else exported from MyMonad that the user might want to use.
|
| > Why might “>>=” be ambiguous? I think the answer is: because
| MyMonad
| > must export it (to use in M.do), but it may already be in scope from
| > the Prelude.
|
| Correct.
|
| > I’m strongly inclined against inventing new complexity in the module
| > system, unless it is absolutely unavoidable. More to specify, more
| to
| > explain, more to understand, more to implement.
|
| And you are sure that the complexity of this is more than that of
| “fully settled” types?
|
| Cheers,
| Joachim
| --
| Joachim Breitner
| mail at joachim-breitner.de
|
| https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.j
| oachim-
| breitner.de%2F&data=02%7C01%7Csimonpj%40microsoft.com%7Ccfc3548461
| cb4f9c537b08d7e21665ba%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63
| 7226458138396283&sdata=%2FkfYvu9u3aPelYnSxYW3k%2BiDEVzNXi5vA2vkQKx
| UQ68%3D&reserved=0
|
|
| _______________________________________________
| ghc-steering-committee mailing list
| ghc-steering-committee at haskell.org
| https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail
| .haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-steering-
| committee&data=02%7C01%7Csimonpj%40microsoft.com%7Ccfc3548461cb4f9
| c537b08d7e21665ba%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C6372264
| 58138396283&sdata=3ylk%2Fh9DP0un9%2Fw%2FVKcrWnzlvmR8rflb8Ju17Zv5yu
| 4%3D&reserved=0
More information about the ghc-steering-committee
mailing list