summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-04-04 16:50:12 +0000
committerhallgren <hallgren@chalmers.se>2014-04-04 16:50:12 +0000
commitd6d056034b2c75844c4c3b56fdcb5702fe2340a3 (patch)
tree9823a0cbad35f27e38fee56c3483200e180d1d04 /src/compiler
parentad5f7397ad75dfec25edbe9ad5b3d9916fa71fcd (diff)
TypeCheck.RConcrete: contravariance in table types
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/GF/Compile/TypeCheck/RConcrete.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/GF/Compile/TypeCheck/RConcrete.hs b/src/compiler/GF/Compile/TypeCheck/RConcrete.hs
index 4bbd42271..16c6908da 100644
--- a/src/compiler/GF/Compile/TypeCheck/RConcrete.hs
+++ b/src/compiler/GF/Compile/TypeCheck/RConcrete.hs
@@ -683,7 +683,8 @@ checkIfEqLType gr g t u trm = do
(Q (m,a), QC (n,b)) | a == b -> elem m (allExtendsPlus gr n)
|| elem n (allExtendsPlus gr m)
- (Table a b, Table c d) -> alpha g a c && alpha g b d
+ -- contravariance
+ (Table a b, Table c d) -> alpha g c a && alpha g b d
(Vr x, Vr y) -> x == y || elem (x,y) g || elem (y,x) g
_ -> t == u
--- the following should be one-way coercions only. AR 4/1/2001