forked from GitHub/gf-core
restructure ResParam and ResValue
This commit is contained in:
@@ -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) []
|
||||
|
||||
Reference in New Issue
Block a user