[ghc-steering-committee] Proposal #167 (Deprecated Entities): Request for comments

Joachim Breitner mail at joachim-breitner.de
Mon Feb 4 22:20:33 UTC 2019


Hi,

Am Montag, den 04.02.2019, 08:44 +0000 schrieb Simon Marlow:
> The point of "pattern" (I believe) is that we want it to be invisible
> to the importer whether a constructor name was declared as a pattern
> synonym or a real data constructor, to allow abstraction and smooth
> migration of APIs when the concrete representation of a datatype
> changes. However, it would also make sense to allow "data" instead of
> "pattern", with exactly the same meaning (import either a data
> constructor or a pattern synonym with the given name). I wonder why
> we didn't do that.

I agree that “the better name” should be a synonym for pattern (or the
other way around).

But I don’t think it should be data, because we write

   data Bool = True | False

and it would be odd if `data Bool` means something different here and
in an import statement.

“value”, as Eric says, is better.

Cheers,
Joachim
-- 
Joachim Breitner
  mail at joachim-breitner.de
  http://www.joachim-breitner.de/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20190204/5b28b370/attachment.sig>


More information about the ghc-steering-committee mailing list