diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2011-11-10 14:09:41 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2011-11-10 14:09:41 +0000 |
| commit | 416d231c5ecb4eea4bdb121e1503a74111373256 (patch) | |
| tree | 6cd0501413c1ed7c738e029337571ca9cfed2eda /src/compiler/GF/Grammar/Macros.hs | |
| parent | 4baa44a933f9a7dd57db7eaab98048792e140e20 (diff) | |
Now PMCFG is compiled per module and at the end we only link it. The new compilation schema is few times faster.
Diffstat (limited to 'src/compiler/GF/Grammar/Macros.hs')
| -rw-r--r-- | src/compiler/GF/Grammar/Macros.hs | 9 |
1 files changed, 4 insertions, 5 deletions
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] _ -> [] |
