From 416d231c5ecb4eea4bdb121e1503a74111373256 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Thu, 10 Nov 2011 14:09:41 +0000 Subject: Now PMCFG is compiled per module and at the end we only link it. The new compilation schema is few times faster. --- src/compiler/GF/Grammar/Macros.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/compiler/GF/Grammar/Macros.hs') diff --git a/src/compiler/GF/Grammar/Macros.hs b/src/compiler/GF/Grammar/Macros.hs index 8af343fc6..e8842375d 100644 --- a/src/compiler/GF/Grammar/Macros.hs +++ b/src/compiler/GF/Grammar/Macros.hs @@ -69,9 +69,8 @@ valTypeCnc typ = snd (typeFormCnc typ) typeSkeleton :: Type -> ([(Int,Cat)],Cat) typeSkeleton typ = - let (cont,cat,_) = typeForm typ - args = map (\(b,x,t) -> typeSkeleton t) cont - in ([(length c, v) | (c,v) <- args], cat) + let (ctxt,cat,_) = typeForm typ + in ([(length c, v) | (b,x,t) <- ctxt, let (c,v) = typeSkeleton t], cat) catSkeleton :: Type -> ([Cat],Cat) catSkeleton typ = @@ -560,8 +559,8 @@ allDependencies ism b = ResOper pty pt -> [pty,pt] ResOverload _ tyts -> concat [[Just ty, Just tr] | (ty,tr) <- tyts] ResParam (Just (L loc ps)) _ -> [Just (L loc t) | (_,cont) <- ps, (_,_,t) <- cont] - CncCat pty _ _ -> [pty] - CncFun _ pt _ -> [pt] ---- (Maybe (Ident,(Context,Type)) + CncCat pty _ _ _ -> [pty] + CncFun _ pt _ _ -> [pt] ---- (Maybe (Ident,(Context,Type)) AbsFun pty _ ptr _ -> [pty] --- ptr is def, which can be mutual AbsCat (Just (L loc co)) -> [Just (L loc ty) | (_,_,ty) <- co] _ -> [] -- cgit v1.2.3