RE: [Diffusion] [Committed] rCABAL2863a628f857: Add two local type signatures
I don't believe I made this commit, or the ones around it. Mysterious; I hope I'm not being impersonated! Simon From: noreply@phabricator.haskell.org [mailto:noreply@phabricator.haskell.org] Sent: 08 July 2016 20:43 To: Simon Peyton Jones <simonpj@microsoft.com> Subject: [Diffusion] [Committed] rCABAL2863a628f857: Add two local type signatures simonpj committed rCABAL2863a628f857: Add two local type signatures (authored by simonpj). Add two local type signatures I'm adding these type signatures to satisfy the "do not generalise local let/where" rule that GHC is taking on. The signatures are clearly correct, but I was surprised at the polymorphism needed. For example parseOptVersion :: ReadP r Version parseOptVersion = parseQuoted ver <++ ver where ver :: ReadP r Version ver = parse <++ return noVersion noVersion = Version{ versionBranch=[], versionTags=[] } Note that 'ver' really is called at two different types! That in turn is because of the type of (<++) (<++) :: ReadP a a -> ReadP r a -> ReadP r a (+++) :: ReadP r a -> ReadP r a -> ReadP r a Note the "a a" in the first arg, which is very unusual. For example, compare the type of (+++). Changing it to match the type of (+++) makes ReadP fail to compile, though, so I assume it's right as it stands. But surely this deserves a comment?! AFFECTED FILES /Distribution/ParseUtils.hs USERS simonpj (Author) COMMIT https://phabricator.haskell.org/rCABAL2863a628f857 EMAIL PREFERENCES https://phabricator.haskell.org/settings/panel/emailpreferences/ To: simonpj
No, this is a Phabricator bug due to some changes in how commit imports are handled. I just upgraded earlier; I'm tracking it down now. At minimum, I'll find a way to turn off the email spam. On Fri, Jul 8, 2016 at 2:46 PM, Simon Peyton Jones via ghc-devs < ghc-devs@haskell.org> wrote:
I don’t believe I made this commit, or the ones around it. Mysterious; I hope I’m not being impersonated!
Simon
*From:* noreply@phabricator.haskell.org [mailto: noreply@phabricator.haskell.org] *Sent:* 08 July 2016 20:43 *To:* Simon Peyton Jones <simonpj@microsoft.com> *Subject:* [Diffusion] [Committed] rCABAL2863a628f857: Add two local type signatures
simonpj committed rCABAL2863a628f857: Add two local type signatures (authored by simonpj).
Add two local type signatures
I'm adding these type signatures to satisfy the "do not generalise local let/where" rule that GHC is taking on.
The signatures are clearly correct, but I was surprised at the polymorphism needed. For example
parseOptVersion :: ReadP r Version parseOptVersion = parseQuoted ver <++ ver
where ver :: ReadP r Version
ver = parse <++ return noVersion
noVersion = Version{ versionBranch=[], versionTags=[] }
Note that 'ver' really is called at two different types! That in turn is because of the type of (<++)
(<++) :: ReadP a a -> ReadP r a -> ReadP r a
(+++) :: ReadP r a -> ReadP r a -> ReadP r a
Note the "a a" in the first arg, which is very unusual. For example, compare the type of (+++).
Changing it to match the type of (+++) makes ReadP fail to compile, though, so I assume it's right as it stands. But surely this deserves a comment?!
*AFFECTED FILES*
/Distribution/ParseUtils.hs
*USERS*
simonpj (Author)
*COMMIT*
https://phabricator.haskell.org/rCABAL2863a628f857
*EMAIL PREFERENCES*
https://phabricator.haskell.org/settings/panel/emailpreferences/
*To: *simonpj
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-- Regards, Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/
participants (2)
-
Austin Seipp -
Simon Peyton Jones