Skip to content

Commit

Permalink
Add newtype constructors to thje typing environment.
Browse files Browse the repository at this point in the history
Fixes #1870
  • Loading branch information
yav committed May 16, 2023
1 parent aaaef43 commit c94add3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cryptol-saw-core/src/Verifier/SAW/CryptolEnv.hs
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,12 @@ mkCryEnv env =
liftModuleM modEnv $
do prims <- MB.getPrimMap
-- noIfaceParams because we don't support translating functors yet
TM.inpVars `fmap` MB.genInferInput P.emptyRange prims
NoParams ifaceDecls
infInp <- MB.genInferInput P.emptyRange prims NoParams ifaceDecls
let newtypeCons = Map.fromList
[ (T.ntConName nt, T.newtypeConType nt)
| nt <- Map.elems (TM.inpNewtypes infInp)
]
pure (newtypeCons `Map.union` TM.inpVars infInp)
let types' = Map.union (eExtraTypes env) types
let terms = eTermEnv env
let cryEnv = C.emptyEnv
Expand Down

0 comments on commit c94add3

Please sign in to comment.