Skip to content

Add kind information to type declarations in FlatCurry

Fredrik Wieczerkowski requested to merge typedecl-kinds into master

Based on !18 (merged).

This adds kind information to all type variables in FlatCurry, including those in data/type declarations, by changing

data TypeDecl
  = Type    QName Visibility [TVarIndex] [ConsDecl]
  | TypeSyn QName Visibility [TVarIndex] TypeExpr
  | TypeNew QName Visibility [TVarIndex] NewConsDecl

to

data TypeDecl
  = Type    QName Visibility [TVarWithKind] [ConsDecl]
  | TypeSyn QName Visibility [TVarWithKind] TypeExpr
  | TypeNew QName Visibility [TVarWithKind] NewConsDecl

where

type TVarIndex = Int
type TVarWithKind = (TVarIndex, Kind)

Merge request reports