Quantcast
Channel: Dafny: An Automatic Program Verifier for Functional Correctness
Viewing all articles
Browse latest Browse all 1106

Closed Unassigned: Incorrect 'cyclic dependencies' error for datatypes [129]

$
0
0
The following code works:

```
datatype Maybe<T> = None | Some(v:T)
datatype B = B(b:Maybe<B>)
```

However, the variation below causes the error "because of cyclic dependencies among constructor argument types, no instances of datatype 'B' can be constructed":

```
datatype Maybe<T> = Some(v:T) | None
datatype B = B(b:Maybe<B>)
```


Viewing all articles
Browse latest Browse all 1106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>