diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-10-12 08:37:57 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-10-12 08:37:57 +0000 |
| commit | cf3fcbf582d196ac05eec9e3cec855702699e477 (patch) | |
| tree | 6bd194b7ebf8de108748dba70ee1e904a4dc3dbc /src/GF/Compile | |
| parent | 697cf5f440a4ad9c1308b4e257347200076a8f9b (diff) | |
check circularity in param
Diffstat (limited to 'src/GF/Compile')
| -rw-r--r-- | src/GF/Compile/CheckGrammar.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/GF/Compile/CheckGrammar.hs b/src/GF/Compile/CheckGrammar.hs index d9dfe996d..d68b03812 100644 --- a/src/GF/Compile/CheckGrammar.hs +++ b/src/GF/Compile/CheckGrammar.hs @@ -1025,17 +1025,19 @@ allOperDependencies m b = where opersIn t = case t of Q n c | n == m -> [c] + QC n c | n == m -> [c] _ -> collectOp opersIn t opty (Yes ty) = opersIn ty opty _ = [] pts i = case i of ResOper pty pt -> [pty,pt] + ResParam (Yes (ps,_)) -> [Yes t | (_,cont) <- ps, (_,t) <- cont] CncFun _ pt _ -> [pt] ---- (Maybe (Ident,(Context,Type)) _ -> [] ---- ResParam topoSortOpers :: [(Ident,[Ident])] -> Err [Ident] topoSortOpers st = do - let eops = topoTest st + let eops = topoTest (trace (show st) st) either return (\ops -> Bad ("circular definitions:" +++ unwords (map prt (head ops)))) |
