Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
178:eb3f9913bf31 | 179:3bbed533fbd2 |
---|---|
105 end | 105 end |
106 | DVal (x, n, t, e, s) => pushENamed env x n t (SOME e) s | 106 | DVal (x, n, t, e, s) => pushENamed env x n t (SOME e) s |
107 | DValRec vis => foldl (fn ((x, n, t, e, s), env) => pushENamed env x n t NONE s) env vis | 107 | DValRec vis => foldl (fn ((x, n, t, e, s), env) => pushENamed env x n t NONE s) env vis |
108 | DExport _ => env | 108 | DExport _ => env |
109 | 109 |
110 val dummyt = (TFfi ("", ""), ErrorMsg.dummySpan) | |
111 | |
112 fun patBinds env (p, loc) = | |
113 case p of | |
114 PWild => env | |
115 | PVar x => pushERel env x dummyt | |
116 | PPrim _ => env | |
117 | PCon (_, NONE) => env | |
118 | PCon (_, SOME p) => patBinds env p | |
119 | PRecord xps => foldl (fn ((_, p), env) => patBinds env p) env xps | |
120 | |
110 end | 121 end |