Skip to content
Open
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
4 changes: 2 additions & 2 deletions SmithyDafnyMakefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ transpile_implementation:
$(DAFNY_OTHER_FILES) \
$(TRANSPILE_MODULE_NAME) \
$(if $(strip $(STD_LIBRARY)) , --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/src/Index.dfy, ) \
$(if $(USE_DAFNY_STANDARD_LIBRARIES) , --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/bin/DafnyStandardLibraries-smithy-dafny-subset.doo, ) \
$(if $(USE_DAFNY_STANDARD_LIBRARIES) , $(if $(strip $(STD_LIBRARY)) , --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/bin/DafnyStandardLibraries-smithy-dafny-subset.doo, ), ) \
$(TRANSLATION_RECORD) \
$(TRANSPILE_DEPENDENCIES)

Expand Down Expand Up @@ -248,7 +248,7 @@ transpile_test:
$(DAFNY_OPTIONS) \
$(DAFNY_OTHER_FILES) \
$(if $(strip $(STD_LIBRARY)) , --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/src/Index.dfy, ) \
$(if $(USE_DAFNY_STANDARD_LIBRARIES) , --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/bin/DafnyStandardLibraries-smithy-dafny-subset.doo, ) \
$(if $(USE_DAFNY_STANDARD_LIBRARIES) , $(if $(strip $(STD_LIBRARY)) , --library:$(PROJECT_ROOT)/$(STD_LIBRARY)/bin/DafnyStandardLibraries-smithy-dafny-subset.doo, ), ) \
$(TRANSLATION_RECORD) \
$(SOURCE_TRANSLATION_RECORD) \
$(TRANSPILE_MODULE_NAME) \
Expand Down
2 changes: 1 addition & 1 deletion TestModels/dafny-dependencies/StandardLibrary/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ transpile_implementation:
--unicode-char:false \
--function-syntax:3 \
--output $(OUT) \
$(if $(USE_DAFNY_STANDARD_LIBRARIES), bin/DafnyStandardLibraries-smithy-dafny-subset.doo, ) \
$(if $(USE_DAFNY_STANDARD_LIBRARIES), ./bin/DafnyStandardLibraries-smithy-dafny-subset.doo, ) \
$(DAFNY_OPTIONS) \
$(DAFNY_OTHER_FILES) \
$(TRANSPILE_MODULE_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ def __init__(self, dafny_byte_stream):
self.dafny_byte_stream = dafny_byte_stream

def read(self, size: int = -1) -> bytes:
# TODO: assert size is -1, buffer,
# or define a more specialized Action<int, bytes> type for streams.
# We could define a more specialized Action<int, bytes> type for streams
# if we wanted to support this level of control in all languages.
if size != -1:
raise ValueError(f"A read size other than -1 is not supported: {size}")
next = self.dafny_byte_stream.Next()
while next.is_Some and len(next.value) == 0:
next = self.dafny_byte_stream.Next()
Expand Down
Loading