summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-07-31 08:29:48 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2017-07-31 08:32:28 -0400
commitc6d4219ae46cddd63aa2b5762efaf99f815009a4 (patch)
tree679b01f380a46f1e9aa69af3b8ebd7073cbcaef9
parent49e334c8ea98cd5ecc81cfe10827538182815723 (diff)
downloadhaskell-c6d4219ae46cddd63aa2b5762efaf99f815009a4.tar.gz
Clarify comment about data family arities
as requested in #14045. [skip ci] comments only
-rw-r--r--compiler/types/FamInstEnv.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/types/FamInstEnv.hs b/compiler/types/FamInstEnv.hs
index f40dabe3fd..b9aa43957e 100644
--- a/compiler/types/FamInstEnv.hs
+++ b/compiler/types/FamInstEnv.hs
@@ -162,6 +162,11 @@ Over-saturation is also possible:
see Note [Eta reduction for data families]. Accordingly, the FamInst
is never over-saturated.
+Why can we allow such flexibility for data families but not for type families?
+Because data families can be decomposed -- that is, they are generative and
+injective. A Type family is neither and so always must be applied to all its
+arguments.
+
Note [Eta reduction for data families]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider this