comparison src/flat_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 4ab19c19665f
children 717b6f8d8505
comparison
equal deleted inserted replaced
55:5c97b7cd912b 56:d3cc191cb25f
110 fun declBinds env (d, _) = 110 fun declBinds env (d, _) =
111 case d of 111 case d of
112 DVal (x, n, t, _) => pushENamed env x n t 112 DVal (x, n, t, _) => pushENamed env x n t
113 | DFun (n, x, dom, ran, _) => pushF env n x dom ran 113 | DFun (n, x, dom, ran, _) => pushF env n x dom ran
114 114
115 fun bbind env x =
116 case ElabEnv.lookupC ElabEnv.basis x of
117 ElabEnv.NotBound => raise Fail "FlatEnv.bbind: Not bound"
118 | ElabEnv.Rel _ => raise Fail "FlatEnv.bbind: Rel"
119 | ElabEnv.Named (n, _) => pushTNamed env x n NONE
120
121 val basis = empty
122 val basis = bbind basis "int"
123 val basis = bbind basis "float"
124 val basis = bbind basis "string"
125
126 end 115 end