summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcHsSyn.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-07-19 12:28:04 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2017-07-27 07:49:06 -0400
commit4239238306e911803bf61fdda3ad356fd0b42e05 (patch)
tree098661824130ef59cb0e4f366a6a2030b21c87bd /compiler/typecheck/TcHsSyn.hs
parent1696dbf4ad0fda4d7c5b4afe1911cab51d7dd0b0 (diff)
downloadhaskell-4239238306e911803bf61fdda3ad356fd0b42e05.tar.gz
Fix #12369 by being more flexible with data insts
Previously, a data family's kind had to end in `Type`, and data instances had to list all the type patterns for the family. However, both of these restrictions were unnecessary: - A data family's kind can usefully end in a kind variable `k`. See examples on #12369. - A data instance need not list all patterns, much like how a GADT-style data declaration need not list all type parameters, when a kind signature is in place. This is useful, for example, here: data family Sing (a :: k) data instance Sing :: Bool -> Type where ... This patch also improved a few error messages, as some error plumbing had to be moved around. See new Note [Arity of data families] in FamInstEnv for more info. test case: indexed-types/should_compile/T12369
Diffstat (limited to 'compiler/typecheck/TcHsSyn.hs')
-rw-r--r--compiler/typecheck/TcHsSyn.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs
index 413751c440..86ade903ec 100644
--- a/compiler/typecheck/TcHsSyn.hs
+++ b/compiler/typecheck/TcHsSyn.hs
@@ -34,7 +34,7 @@ module TcHsSyn (
emptyZonkEnv, mkEmptyZonkEnv,
zonkTcTypeToType, zonkTcTypeToTypes, zonkTyVarOcc,
zonkCoToCo, zonkSigType,
- zonkEvBinds,
+ zonkEvBinds, zonkTcEvBinds
) where
#include "HsVersions.h"