equal
deleted
inserted
replaced
191 *---------------------------------------------------------------------------*) |
191 *---------------------------------------------------------------------------*) |
192 |
192 |
193 fun mk_pat (c,l) = |
193 fun mk_pat (c,l) = |
194 let val L = length (binder_types (type_of c)) |
194 let val L = length (binder_types (type_of c)) |
195 fun build (prfx,tag,plist) = |
195 fun build (prfx,tag,plist) = |
196 let val args = Library.take (L,plist) |
196 let val (args, plist') = chop L plist |
197 and plist' = Library.drop(L,plist) |
|
198 in (prfx,tag,list_comb(c,args)::plist') end |
197 in (prfx,tag,list_comb(c,args)::plist') end |
199 in map build l end; |
198 in map build l end; |
200 |
199 |
201 fun v_to_prfx (prfx, v::pats) = (v::prfx,pats) |
200 fun v_to_prfx (prfx, v::pats) = (v::prfx,pats) |
202 | v_to_prfx _ = raise TFL_ERR "mk_case" "v_to_prfx"; |
201 | v_to_prfx _ = raise TFL_ERR "mk_case" "v_to_prfx"; |