Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Update to follow 'structured-names' branch #26

Merged
merged 1 commit into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions saw-core-coq.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ library
lens,
mtl,
saw-core,
text,
vector
hs-source-dirs: src
exposed-modules:
Expand Down
6 changes: 5 additions & 1 deletion src/Verifier/SAW/Translation/Coq/SpecialTreatment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Control.Monad.Reader (ask)
import qualified Data.Map as Map
import Data.String.Interpolate (i)
import Prelude hiding (fail)
import qualified Data.Text as Text

import qualified Language.Coq.AST as Coq
import Verifier.SAW.SharedTerm
Expand Down Expand Up @@ -459,7 +460,10 @@ constantsRenamingMap notations = Map.fromList notations
-- to check those here to avoid some captures?
translateConstant :: [(String, String)] -> ExtCns e -> String
translateConstant notations (EC {..}) =
Map.findWithDefault ecName ecName (constantsRenamingMap notations)
Map.findWithDefault
(Text.unpack (toShortName ecName))
(Text.unpack (toShortName ecName))
(constantsRenamingMap notations) -- TODO short name doesn't seem right

zipSnippet :: String
zipSnippet = [i|
Expand Down