Mercurial > urweb
diff src/mono_env.sml @ 179:3bbed533fbd2
Cases through monoize
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 03 Aug 2008 10:48:36 -0400 |
parents | eb3f9913bf31 |
children | d11754ffe252 |
line wrap: on
line diff
--- a/src/mono_env.sml Sun Aug 03 09:26:49 2008 -0400 +++ b/src/mono_env.sml Sun Aug 03 10:48:36 2008 -0400 @@ -107,4 +107,15 @@ | DValRec vis => foldl (fn ((x, n, t, e, s), env) => pushENamed env x n t NONE s) env vis | DExport _ => env +val dummyt = (TFfi ("", ""), ErrorMsg.dummySpan) + +fun patBinds env (p, loc) = + case p of + PWild => env + | PVar x => pushERel env x dummyt + | PPrim _ => env + | PCon (_, NONE) => env + | PCon (_, SOME p) => patBinds env p + | PRecord xps => foldl (fn ((_, p), env) => patBinds env p) env xps + end