Changes between Initial Version and Version 1 of Ticket #9182


Ignore:
Timestamp:
Jun 7, 2014 6:19:22 PM (12 months ago)
Author:
dfranke
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9182 – Description

    initial v1  
    1414I think this program should be accepted. It isn't that I'm not giving a definition for `empty`; it's that I'm defining it to be a function with no accompanying equations, as could be represented in Template Haskell by 
    1515 
    16   $(return [FunD (mkName "empty") []]) 
     16  {{{$(return [FunD (mkName "empty") []])}}} 
    1717 
    1818Currently, this too is rejected, with GHC complaining `Function binding for ‘empty’ has no equations`. I think this should be legal, with an empty list of clauses in a function definition being treated the same way as an empty list of matches in a case expression.