Changes between Version 13 and Version 14 of GhcKinds/KindsWithoutData


Ignore:
Timestamp:
Sep 8, 2013 11:42:18 PM (10 months ago)
Author:
elliottt
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GhcKinds/KindsWithoutData

    v13 v14  
    11= Defining kinds without an associated datatype =  
     2 
     3This ticket to track this request is #6024. 
    24 
    35When using `-XDataKinds` GHC automatically promotes every datatype to a kind, and its constructors to 
     
    3941Also, 
    4042{{{ 
    41 data type (i :: D) where C :: I ('C Int) 
     43data type D = C 
    4244}}} 
    43 defines a datatype `D` which is not promoted to a kind, and its constructors 
    44 are not promoted to types. We would then also have ‘type only T = Int -> Int`. 
     45defines a datatype `D` which is not promoted to a kind, and its constructor `C` is 
     46not promoted to a type. 
    4547 
    46 ''Advantages'': solves (1) and (2) 
     48== Other Extensions == 
    4749 
    48 ''Disadvantages'': 
    49  
    50 1. If, in the future, we make `* :: *`, we will no longer have separation of 
    51 types and kinds, so things like `D`/`I` above will become impossible. 
    52  
    53 2. Requires changing the parser 
    54  
    55 Currently we are planning to implement the second solution. If we do get `* :: *` other things will break due to name clashes, so that shouldn't prevent us from going ahead now. This ticket to track this request is #6024. 
     50If, in the future, we make `* :: *`, we will no longer have separation of 
     51types and kinds, so we won't be able to make such fine distinctions. 
    5652 
    5753== Alternative Solutions ==