Mercurial > urweb
comparison src/core_env.sml @ 56:d3cc191cb25f
Separate compilation and automatic basis importation
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 22 Jun 2008 14:23:05 -0400 |
parents | 1ab48e37d0ef |
children | f0f59e918cac |
comparison
equal
deleted
inserted
replaced
55:5c97b7cd912b | 56:d3cc191cb25f |
---|---|
122 fun declBinds env (d, _) = | 122 fun declBinds env (d, _) = |
123 case d of | 123 case d of |
124 DCon (x, n, k, c) => pushCNamed env x n k (SOME c) | 124 DCon (x, n, k, c) => pushCNamed env x n k (SOME c) |
125 | DVal (x, n, t, e) => pushENamed env x n t (SOME e) | 125 | DVal (x, n, t, e) => pushENamed env x n t (SOME e) |
126 | 126 |
127 val ktype = (KType, ErrorMsg.dummySpan) | |
128 | |
129 fun bbind env x = | |
130 case ElabEnv.lookupC ElabEnv.basis x of | |
131 ElabEnv.NotBound => raise Fail "CoreEnv.bbind: Not bound" | |
132 | ElabEnv.Rel _ => raise Fail "CoreEnv.bbind: Rel" | |
133 | ElabEnv.Named (n, _) => pushCNamed env x n ktype NONE | |
134 | |
135 val basis = empty | |
136 val basis = bbind basis "int" | |
137 val basis = bbind basis "float" | |
138 val basis = bbind basis "string" | |
139 | |
140 end | 127 end |