cryptol/tests/issues/issue395.icry
Robert Dockins d891fde0c7 Fix a corner case for join on 0-length inner sequences.
Both the standard and the reference interpreter were producing
incorrect behaviors.  The correct behavior is to return an
empty sequence.

Fixes #395.
2017-05-10 17:49:37 -07:00

22 lines
559 B
Plaintext

:t (join (zero : [inf][0]))
join (zero : [inf][0])
join (zero : [inf][0]) == []
:eval join (zero : [inf][0])
:t (join (zero : [1000][0]))
join (zero : [1000][0])
join (zero : [1000][0]) == []
:eval join (zero : [1000][0])
:pro (\(x:[1000][0]) -> join x == [])
:t (join (zero : [inf][0][32]))
join (zero : [inf][0][32])
join (zero : [inf][0][32]) == []
:eval join (zero : [inf][0][32])
:t (join (zero : [1000][0][32]))
join (zero : [1000][0][32])
join (zero : [1000][0][32]) == []
:eval join (zero : [1000][0][32])
:pro (\(x:[1000][0][32]) -> join x == [])