summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/GF/Compile/Rename.hs5
-rw-r--r--src/compiler/GF/Grammar/Grammar.hs2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/GF/Compile/Rename.hs b/src/compiler/GF/Compile/Rename.hs
index 732693b49..e2ee5934b 100644
--- a/src/compiler/GF/Compile/Rename.hs
+++ b/src/compiler/GF/Compile/Rename.hs
@@ -101,10 +101,15 @@ renameIdentTerm' env@(act,imps) t0 =
text "given" <+> fsep (punctuate comma (map (ppIdent . fst) qualifs)))
fs -> case nub [f c | f <- fs] of
[tr] -> return tr
+ ts -> return $ AdHocOverload ts
+ -- name conflicts resolved as overloading in TypeCheck.RConcrete AR 31/1/2014
+ -- the old definition is below and still presupposed in TypeCheck.Concrete
+{-
ts@(t:_) -> do checkWarn (text "atomic term" <+> ppTerm Qualified 0 t0 $$
text "conflict" <+> hsep (punctuate comma (map (ppTerm Qualified 0) ts)) $$
text "given" <+> fsep (punctuate comma (map (ppIdent . fst) qualifs)))
return t
+-}
-- a warning will be generated in CheckGrammar, and the head returned
-- in next V:
-- Bad $ "conflicting imports:" +++ unwords (map prt ts)
diff --git a/src/compiler/GF/Grammar/Grammar.hs b/src/compiler/GF/Grammar/Grammar.hs
index 7400ff09b..2fdab29c7 100644
--- a/src/compiler/GF/Grammar/Grammar.hs
+++ b/src/compiler/GF/Grammar/Grammar.hs
@@ -398,6 +398,8 @@ data Term =
| ELincat Ident Term -- ^ boxed linearization type of Ident
| ELin Ident Term -- ^ boxed linearization of type Ident
+ | AdHocOverload [Term] -- ^ ad hoc overloading generated in Rename
+
| FV [Term] -- ^ alternatives in free variation: @variants { s ; ... }@
| Alts Term [(Term, Term)] -- ^ alternatives by prefix: @pre {t ; s\/c ; ...}@