From 6f9f187c7059967cb3c2a8c61c51c15cbe8827a8 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Mon, 19 May 2025 13:08:54 +0200 Subject: [PATCH] two hacks for backwards compatibility --- src/compiler/api/GF/Compile/TypeCheck/ConcreteNew.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/api/GF/Compile/TypeCheck/ConcreteNew.hs b/src/compiler/api/GF/Compile/TypeCheck/ConcreteNew.hs index c7a929f17..b0923a6e5 100644 --- a/src/compiler/api/GF/Compile/TypeCheck/ConcreteNew.hs +++ b/src/compiler/api/GF/Compile/TypeCheck/ConcreteNew.hs @@ -782,6 +782,10 @@ subsCheckRho scope t (VTable p1 r1) rho2 = do -- Rule TABLE subsCheckTbl scope t p1 r1 p2 r2 subsCheckRho scope t (VSort s1) (VSort s2) -- Rule PTYPE | s1 == cPType && s2 == cType = return t +subsCheckRho scope t (VApp _ p1 []) rho2 -- for backwards compatibility + | p1 == (cPredef,cErrorType) = return t +subsCheckRho scope t (VApp _ p1 _) (VApp _ p2 _) -- This is not correct but there is in the RGL nextPrec relies on it. + | p1 == (cPredef,cInt) && p2 == (cPredef,cInts) = return t -- Should be only a temporary hack. subsCheckRho scope t (VApp _ p1 _) (VApp _ p2 _) -- Rule INT1 | p1 == (cPredef,cInts) && p2 == (cPredef,cInt) = return t subsCheckRho scope t (VApp _ p1 [VInt i]) (VApp _ p2 [VInt j]) -- Rule INT2