File tree 4 files changed +17
-3
lines changed
cryptol-saw-core/src/Verifier/SAW
4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -297,9 +297,12 @@ mkCryEnv env =
297
297
(types, _) <-
298
298
liftModuleM modEnv $
299
299
do prims <- MB. getPrimMap
300
- -- noIfaceParams because we don't support translating functors yet
301
- TM. inpVars `fmap` MB. genInferInput P. emptyRange prims
302
- MI. noIfaceParams ifaceDecls
300
+ infInp <- MB. genInferInput P. emptyRange prims MI. noIfaceParams ifaceDecls
301
+ let newtypeCons = Map. fromList
302
+ [ (T. ntName nt, T. newtypeConType nt)
303
+ | nt <- Map. elems (TM. inpNewtypes infInp)
304
+ ]
305
+ pure (newtypeCons `Map.union` TM. inpVars infInp)
303
306
let types' = Map. union (eExtraTypes env) types
304
307
let terms = eTermEnv env
305
308
let cryEnv = C. emptyEnv
Original file line number Diff line number Diff line change
1
+ module A where
2
+
3
+ newtype A = { x : [8] }
4
+
Original file line number Diff line number Diff line change
1
+ import "A.cry";
2
+
3
+ // Make sure that `newtypes` work.
4
+ // Specifically, that `A` is in scope.
5
+ print {{ A { x = 2 } }};
Original file line number Diff line number Diff line change
1
+ set -e
2
+ $SAW test.saw
You can’t perform that action at this time.
0 commit comments