diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2013-06-21 13:54:49 +0100 |
---|---|---|
committer | Richard Eisenberg <eir@cis.upenn.edu> | 2013-06-21 13:54:49 +0100 |
commit | 569b26526403df4d88fe2a6d64c7dade09d003ad (patch) | |
tree | f216a5ceaf5d655248564abefab6765aaa9da37d /compiler/vectorise/Vectorise.hs | |
parent | 11db9cf82e014de43d8ab04947ef2a2b7fa30f37 (diff) | |
download | haskell-569b26526403df4d88fe2a6d64c7dade09d003ad.tar.gz |
Revise implementation of overlapping type family instances.
This commit changes the syntax and story around overlapping type
family instances. Before, we had "unbranched" instances and
"branched" instances. Now, we have closed type families and
open ones.
The behavior of open families is completely unchanged. In particular,
coincident overlap of open type family instances still works, despite
emails to the contrary.
A closed type family is declared like this:
> type family F a where
> F Int = Bool
> F a = Char
The equations are tried in order, from top to bottom, subject to
certain constraints, as described in the user manual. It is not
allowed to declare an instance of a closed family.
Diffstat (limited to 'compiler/vectorise/Vectorise.hs')
-rw-r--r-- | compiler/vectorise/Vectorise.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/vectorise/Vectorise.hs b/compiler/vectorise/Vectorise.hs index b939f4beb6..012ae37039 100644 --- a/compiler/vectorise/Vectorise.hs +++ b/compiler/vectorise/Vectorise.hs @@ -27,7 +27,6 @@ import DynFlags import Outputable import Util ( zipLazy ) import MonadUtils -import FamInstEnv ( toBranchedFamInst ) import Control.Monad @@ -93,7 +92,7 @@ vectModule guts@(ModGuts { mg_tcs = tycons -- and dfuns , mg_binds = Rec tc_binds : (binds_top ++ binds_imp) , mg_fam_inst_env = fam_inst_env - , mg_fam_insts = fam_insts ++ (map toBranchedFamInst new_fam_insts) + , mg_fam_insts = fam_insts ++ new_fam_insts } } |