1
0
forked from GitHub/gf-core

restructure ResParam and ResValue

This commit is contained in:
krasimir
2009-10-28 16:47:01 +00:00
parent d99e134fed
commit 526e75fce1
9 changed files with 100 additions and 123 deletions

View File

@@ -309,8 +309,8 @@ canon2canon opts abs cg0 =
-- flatten record arguments of param constructors
p2p (f,j) = case j of
ResParam (Just (ps,v)) ->
ResParam (Just ([(c,concatMap unRec cont) | (c,cont) <- ps],Nothing))
ResParam (Just ps) _ ->
ResParam (Just [(c,concatMap unRec cont) | (c,cont) <- ps]) Nothing
_ -> j
unRec (bt,x,ty) = case ty of
RecType fs -> [ity | (_,typ) <- fs, ity <- unRec (Explicit,identW,typ)]
@@ -355,7 +355,7 @@ paramValues cgr = (labels,untyps,typs) where
ty <- typsFrom ty0
] ++ [
Q m ty |
(m,(ty,ResParam _)) <- jments
(m,(ty,ResParam _ _)) <- jments
] ++ [ty |
(_,(_,CncFun _ (Just tr) _)) <- jments,
ty <- err (const []) snd $ appSTM (typsFromTrm tr) []