From 0d047707fc1027e7e145d0204cf76eb24fc10398 Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 6 Dec 2013 13:46:59 +0000 Subject: [PATCH] GF.Compile.CheckGrammar: add source path to error message for circular definitions --- src/compiler/GF/Compile/CheckGrammar.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/GF/Compile/CheckGrammar.hs b/src/compiler/GF/Compile/CheckGrammar.hs index d924e413e..5b707157c 100644 --- a/src/compiler/GF/Compile/CheckGrammar.hs +++ b/src/compiler/GF/Compile/CheckGrammar.hs @@ -53,7 +53,8 @@ checkModule opts sgr mo@(m,mi) = do abs <- lookupModule gr a checkCompleteGrammar opts gr (a,abs) mo _ -> return mo - infoss <- topoSortJments2 mo + infoss <- checkIn (ppLocation (msrc mi) NoLoc <> colon) $ + topoSortJments2 mo foldM updateCheckInfos mo infoss where updateCheckInfos mo = fmap (foldl update mo) . parallelCheck . map check