Skip to content

Commit 2f66f3e

Browse files
committed
[ test ] case for the fix
1 parent f98bb39 commit 2f66f3e

File tree

7 files changed

+442
-294
lines changed

7 files changed

+442
-294
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module LetBinders
2+
3+
infix 1 :::
4+
record List1 (a : Type) where
5+
constructor (:::)
6+
head : a
7+
tail : List a
8+
9+
swap : List1 a -> List1 a
10+
swap aas =
11+
let (a ::: as) := aas in
12+
let (b :: bs) = as
13+
| [] => a ::: []
14+
rest = a :: bs
15+
in b ::: rest
16+
17+
identity : List (Nat, a) -> List (List a)
18+
identity =
19+
let
20+
21+
replicate : (n : Nat) -> a -> List a
22+
replicate Z a = []
23+
replicate (S n) a = a :: replicate n a
24+
25+
closure := uncurry replicate
26+
27+
in map closure

tests/ideMode/ideMode005/Syntax.idr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ module Syntax
22

33
%default total
44

5-
{- -- interfaces don't work yet
6-
{0 a : Type} -> (foo : Show a) => Show (Maybe a) where
7-
-}
8-
95
showMaybe : {0 a : Type} -> (assumption : Show a) => Maybe a -> String
106
showMaybe x@ma = case map (id . id) ma of
117
Nothing => "Nothing"

tests/ideMode/ideMode005/expected1

Lines changed: 290 additions & 290 deletions
Large diffs are not rendered by default.

tests/ideMode/ideMode005/expectedG

Lines changed: 120 additions & 0 deletions
Large diffs are not rendered by default.

tests/ideMode/ideMode005/inputG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
000021((:load-file "LetBinders.idr") 1)

tests/ideMode/ideMode005/regenerate

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $1 --no-color --console-width 0 --ide-mode < inputC > expectedC
1515
$1 --no-color --console-width 0 --ide-mode < inputD > expectedD
1616
$1 --no-color --console-width 0 --ide-mode < inputE > expectedE
1717
$1 --no-color --console-width 0 --ide-mode < inputF > expectedF
18+
$1 --no-color --console-width 0 --ide-mode < inputG > expectedG
1819

1920
rm -f expected output*
2021
touch expected

tests/ideMode/ideMode005/run

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,7 @@ diff expectedE outputE >> output
4545
$1 --no-color --console-width 0 --ide-mode < inputF > outputF
4646
diff expectedF outputF >> output
4747

48+
$1 --no-color --console-width 0 --ide-mode < inputG > outputG
49+
diff expectedG outputG >> output
50+
4851
rm -rf build

0 commit comments

Comments
 (0)