Overlapping names in GHC: ConLike

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Overlapping names in GHC: ConLike

Joachim Breitner-2
Hi,

while reading some code I noticed that we use the term ?ConLike? for two
different things: From Haskell up to the desugarer, this is a data type
to treat data constructors and pattern synonyms together; afterwards, in
the world of Core, ConLike is an attribute of expression (exprIsConLik)
similar to exprIsHNF.

The former use is newer, introduced by the pattern synonym patch. In the
long run, there is a risk of confusion, maybe we should rename ConLike
module and data type. Any suggestions for a good name?

Greetings,
Joachim

--
Joachim ?nomeata? Breitner
  mail at joachim-breitner.de ? http://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  ? GPG-Key: 0x4743206C
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140213/e40c81f2/attachment.sig>

Reply | Threaded
Open this post in threaded view
|

Overlapping names in GHC: ConLike

Carter Schonwald
Caseable? PatternLike?

On Thursday, February 13, 2014, Joachim Breitner <mail at joachim-breitner.de>
wrote:

> Hi,
>
> while reading some code I noticed that we use the term ?ConLike? for two
> different things: From Haskell up to the desugarer, this is a data type
> to treat data constructors and pattern synonyms together; afterwards, in
> the world of Core, ConLike is an attribute of expression (exprIsConLik)
> similar to exprIsHNF.
>
> The former use is newer, introduced by the pattern synonym patch. In the
> long run, there is a risk of confusion, maybe we should rename ConLike
> module and data type. Any suggestions for a good name?
>
> Greetings,
> Joachim
>
> --
> Joachim ?nomeata? Breitner
>   mail at joachim-breitner.de <javascript:;> ?
> http://www.joachim-breitner.de/
>   Jabber: nomeata at joachim-breitner.de <javascript:;>  ? GPG-Key:
> 0x4743206C
>   Debian Developer: nomeata at debian.org <javascript:;>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140213/e28332b8/attachment.html>

Reply | Threaded
Open this post in threaded view
|

Overlapping names in GHC: ConLike

Dr. ERDI Gergo
On Thu, 13 Feb 2014, Carter Schonwald wrote:

> Caseable? PatternLike??

The reason I went with ConLike originally (apart from not noticing the
clash) was that (bidirectional) pattern synonyms can also be used in
expressions, so they behave like constructors in both contexts.

Reply | Threaded
Open this post in threaded view
|

Overlapping names in GHC: ConLike

Carter Schonwald
ConstructorAble ?  (I'm happy to come up with a whole list of candidates).
:-)

On Friday, February 14, 2014, Dr. ERDI Gergo <gergo at erdi.hu> wrote:

> On Thu, 13 Feb 2014, Carter Schonwald wrote:
>
>  Caseable? PatternLike?
>>
>
> The reason I went with ConLike originally (apart from not noticing the
> clash) was that (bidirectional) pattern synonyms can also be used in
> expressions, so they behave like constructors in both contexts.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140214/0d063658/attachment.html>

Reply | Threaded
Open this post in threaded view
|

Overlapping names in GHC: ConLike

Carter Schonwald
BijectionLike, InvertableCon
ReversableConstructor
InvertableLike
Dualable
DualLike
DuelFoil -- I kid

basically something about how patternSynonyms and normal type constructors
have this "bjiective" (ish?) quality






On Fri, Feb 14, 2014 at 11:10 PM, Dr. ?RDI Gerg? <gergo at erdi.hu> wrote:

> Can we force some more elements of that lazy stream?
> On Feb 15, 2014 12:09 PM, "Carter Schonwald" <carter.schonwald at gmail.com>
> wrote:
>
>> ConstructorAble ?  (I'm happy to come up with a whole list of
>> candidates). :-)
>>
>> On Friday, February 14, 2014, Dr. ERDI Gergo <gergo at erdi.hu> wrote:
>>
>>> On Thu, 13 Feb 2014, Carter Schonwald wrote:
>>>
>>>  Caseable? PatternLike?
>>>>
>>>
>>> The reason I went with ConLike originally (apart from not noticing the
>>> clash) was that (bidirectional) pattern synonyms can also be used in
>>> expressions, so they behave like constructors in both contexts.
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140215/0d5ef825/attachment-0001.html>