dafny-lang / libraries

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

Extending wrappers & introducing functors, monads, comonads, and cowrappers #80

Open stefan-aws opened 1 year ago

stefan-aws commented 1 year ago

In the past, there have been requests to include monadic constructs into Dafny (see e.g. https://github.com/dafny-lang/dafny/pull/455). The main issue with providing native support has been that monads don't fit as naturally into a partly imperative language as Dafny, as they do for purely functional languages. Here, I propose that instead of further embedding monads into the language itself, we simply provide a comprehensive standard library. The PR makes the following contributions:

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.