Wildcards in type functions vs. named wild cards

Jan Stolarek jan.stolarek at p.lodz.pl
Tue Dec 1 12:21:15 UTC 2015


One of my students (Michał, CCd) is hacking on #10982 and he noticed a rather unexpected 
behaviour. If I say:

{-# LANGUAGE TypeFamilies #-}

module T10982 where

type family F a where
    F _t = Int

Then everything is fine. But if I enable NamedWildCards extension then suddenly this code is 

T10982.hs:7:7: error:
    Unexpected wild card: ‘_t’
    In the declaration for type synonym ‘F’

I am 99% sure this is a bug and the program should be accepted even with NamedWildCards. Am I 
correct? Does this interact in any way with your upcomming refactoring of wildcards?


Politechnika Łódzka
Lodz University of Technology

Treść tej wiadomości zawiera informacje przeznaczone tylko dla adresata.
Jeżeli nie jesteście Państwo jej adresatem, bądź otrzymaliście ją przez pomyłkę
prosimy o powiadomienie o tym nadawcy oraz trwałe jej usunięcie.

This email contains information intended solely for the use of the individual to whom it is addressed.
If you are not the intended recipient or if you have received this message in error,
please notify the sender and delete it from your system.

More information about the ghc-devs mailing list