dafny-lang / libraries

Libraries useful for Dafny programs
Other
43 stars 25 forks source link

Example FileIO libary fails to complile #148

Closed hath995 closed 9 months ago

hath995 commented 9 months ago

Tried to run the command from within the libaries\example\FileIO folder.

Dafny.exe run --target:cs .\ReadBytesFromFile.dfy --input ..\..\src\dafny\FileIO\FileIO.cs "..\..\README.md"

Got the following error:

 Errors compiling program into ReadBytesFromFile
(5854,56): error CS1503: Argument 1: cannot convert from 'Dafny.ISequence<Dafny.Rune>' to 'Dafny.ISequence<char>'

(5854,88): error CS1503: Argument 4: cannot convert from 'out Dafny.ISequence<Dafny.Rune>' to 'out Dafny.ISequence<char>'      

(5869,55): error CS1503: Argument 1: cannot convert from 'Dafny.ISequence<Dafny.Rune>' to 'Dafny.ISequence<char>'

(5869,83): error CS1503: Argument 4: cannot convert from 'out Dafny.ISequence<Dafny.Rune>' to 'out Dafny.ISequence<char>'  

Is the argument for main actually the command line argument as well? It would be really helpful to have IO working. I hope to get ready to use Dafny on Advent of Code later this year.

hath995 commented 9 months ago

ah somehow I missed the run documentation in the file itself. I got it to work.