summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorJan Stolarek <jan.stolarek@p.lodz.pl>2015-11-09 15:44:47 +0100
committerJan Stolarek <jan.stolarek@p.lodz.pl>2015-11-09 15:52:20 +0100
commit3cfe60aebb9de2a1d897a111f779eacb6614b7cc (patch)
tree89b43cd2b75013aa8923bd2662d1730f0018fbc0 /compiler
parentf4056324ea30b31f9cec7bf9bafa72bb695f6951 (diff)
downloadhaskell-3cfe60aebb9de2a1d897a111f779eacb6614b7cc.tar.gz
Abstract TFs can have injectivity information
Summary: For abstract type families we incorrectly rejected their injectivity annotation. Fixes #11007. Test Plan: #6018 Reviewers: goldfire, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1453 GHC Trac Issues: #11007
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcTyClsDecls.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs
index d1a6c76ea5..c21baf04bd 100644
--- a/compiler/typecheck/TcTyClsDecls.hs
+++ b/compiler/typecheck/TcTyClsDecls.hs
@@ -699,10 +699,9 @@ tcFamDecl1 parent
-- If Nothing, this is an abstract family in a hs-boot file;
-- but eqns might be empty in the Just case as well
; case mb_eqns of
- Nothing ->
- return [ATyCon $ buildFamilyTyCon tc_name tvs' Nothing
- AbstractClosedSynFamilyTyCon kind parent
- NotInjective ]
+ Nothing -> return
+ [ ATyCon $ buildFamilyTyCon tc_name tvs' (resultVariableName sig)
+ AbstractClosedSynFamilyTyCon kind parent inj' ]
Just eqns -> do {
-- Process the equations, creating CoAxBranches