Skip to content

Commit 8bc7cab

Browse files
committed
Testsuite: Add example for GitHub issue 309
that was fixed by a commit in PR 833
1 parent 2e4030b commit 8bc7cab

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package ICE where
2+
3+
import Vector
4+
5+
type BitVector n = Vector n (UInt 1)
6+
7+
struct Compress n = {
8+
x :: BitVector n;
9+
} deriving (Bits)
10+
11+
foo :: BitVector n -> Compress (TAdd n 1)
12+
foo = _
13+
14+
bar :: Vector 8 (BitVector n) -> Compress (TAdd n 2)
15+
bar xs =
16+
let a :: Compress (TAdd n 1)
17+
a = _
18+
in foo a.x
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# for "make clean" to work everywhere
2+
3+
CONFDIR = $(realpath ../../..)
4+
5+
include $(CONFDIR)/clean.mk
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# GitHub Issue #309
2+
3+
# This triggered an internal error during ISyntaxCheck
4+
# because kind information was being lost
5+
#
6+
compile_pass ICE.bs

0 commit comments

Comments
 (0)