File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ patternVerifierHook =
149
149
patternVerifierWorker external =
150
150
case externalChild of
151
151
StringLiteral_ literal -> do
152
- bytesValue <- Builtin. parseString Encoding. parseBase16 literal
152
+ bytesValue <- Builtin. parseString Encoding. parse8Bit literal
153
153
(return . InternalBytesF . Const )
154
154
InternalBytes { bytesSort, bytesValue }
155
155
_ -> Kore.Error. koreFail " Expected literal string"
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ asTermLike
96
96
asTermLike InternalBytes { bytesSort, bytesValue } =
97
97
mkDomainValue DomainValue
98
98
{ domainValueSort = bytesSort
99
- , domainValueChild = mkStringLiteral $ Encoding. toBase16 bytesValue
99
+ , domainValueChild = mkStringLiteral $ Encoding. decode8Bit bytesValue
100
100
}
101
101
102
102
internalize
Original file line number Diff line number Diff line change @@ -603,6 +603,14 @@ test_InternalBytes =
603
603
mkDomainValue
604
604
$ DomainValue bytesSort
605
605
$ mkStringLiteral " 00"
606
+ expect = Right $ asInternal " 00"
607
+ actual = verifyPattern (Just bytesSort) unverified
608
+ assertEqual " " expect actual
609
+ , testCase " \\ dv{Bytes{}}(\" \x00 \" )" $ do
610
+ let unverified =
611
+ mkDomainValue
612
+ $ DomainValue bytesSort
613
+ $ mkStringLiteral " \x00 "
606
614
expect = Right $ asInternal " \x00 "
607
615
actual = verifyPattern (Just bytesSort) unverified
608
616
assertEqual " " expect actual
You can’t perform that action at this time.
0 commit comments