Skip to content

Commit

Permalink
Tests for @argument.actual
Browse files Browse the repository at this point in the history
  • Loading branch information
wenkokke committed Jan 22, 2024
1 parent 937f5ef commit 909d936
Show file tree
Hide file tree
Showing 14 changed files with 2,008 additions and 360 deletions.
4 changes: 2 additions & 2 deletions packages/common/src/scopeSupportFacets/haskell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export const haskellScopeSupport: LanguageScopeSupportFacetMap = {
functionCallee: unsupported,
"functionCallee.constructor": unsupported,

"argument.actual": unsupported,
"argument.actual.iteration": unsupported,
"argument.actual": supported,
"argument.actual.iteration": supported,
"argument.formal": unsupported,
"argument.formal.iteration": unsupported,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ fib n = fib (n-1) + fib (n-2)

---

[#1 Content] =
[#1 Removal] =
[#1 Range] =
[#1 Domain] = 1:0-1:9
0| fib :: Integer -> Integer

Expand All @@ -19,11 +18,8 @@ fib n = fib (n-1) + fib (n-2)
4|


[#1 Insertion delimiter] = "\n"


[#2 Content] =
[#2 Removal] =
[#2 Range] =
[#2 Domain] = 2:0-2:9
0| fib :: Integer -> Integer

Expand All @@ -36,11 +32,8 @@ fib n = fib (n-1) + fib (n-2)
4|


[#2 Insertion delimiter] = "\n"


[#3 Content] =
[#3 Removal] =
[#3 Range] =
[#3 Domain] = 3:0-3:29
0| fib :: Integer -> Integer

Expand All @@ -51,6 +44,3 @@ fib n = fib (n-1) + fib (n-2)
3| fib n = fib (n-1) + fib (n-2)
>-----------------------------<
4|


[#3 Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
abs :: Int -> Int
abs x
| x >= 0 = x
| otherwise = -x

---

[#1 Range] =
[#1 Domain] = 1:0-3:20
0| abs :: Int -> Int

1| abs x
>-----
2| | x >= 0 = x
--------------------
3| | otherwise = -x
--------------------<
4|



[#2 Range] =
[#2 Domain] = 2:6-2:20
0| abs :: Int -> Int

1| abs x

2| | x >= 0 = x
>--------------<
3| | otherwise = -x

4|



[#3 Range] =
[#3 Domain] = 3:6-3:20
0| abs :: Int -> Int

1| abs x

2| | x >= 0 = x

3| | otherwise = -x
>--------------<
4|
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
bap :: Int -> Int
bap x
| x > 0, x == 0 = x
| otherwise = -x

---

[#1 Range] =
[#1 Domain] = 1:0-3:20
0| bap :: Int -> Int

1| bap x
>-----
2| | x > 0, x == 0 = x
------------------------
3| | otherwise = -x
--------------------<
4|



[#2 Range] =
[#2 Domain] = 2:6-2:24
0| bap :: Int -> Int

1| bap x

2| | x > 0, x == 0 = x
>------------------<
3| | otherwise = -x

4|



[#3 Range] =
[#3 Domain] = 3:6-3:20
0| bap :: Int -> Int

1| bap x

2| | x > 0, x == 0 = x

3| | otherwise = -x
>--------------<
4|
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
compare :: Int -> Int -> Ordering
compare x y
| x < y = LT
| x == y = EQ
| x > y = GT

---

[#1 Range] =
[#1 Domain] = 1:0-4:17
0| compare :: Int -> Int -> Ordering

1| compare x y
>-----------
2| | x < y = LT
-----------------
3| | x == y = EQ
-----------------
4| | x > y = GT
-----------------<
5|



[#2 Range] =
[#2 Domain] = 2:6-2:17
0| compare :: Int -> Int -> Ordering

1| compare x y

2| | x < y = LT
>-----------<
3| | x == y = EQ

4| | x > y = GT

5|



[#3 Range] =
[#3 Domain] = 3:6-3:17
0| compare :: Int -> Int -> Ordering

1| compare x y

2| | x < y = LT

3| | x == y = EQ
>-----------<
4| | x > y = GT

5|



[#4 Range] =
[#4 Domain] = 4:6-4:17
0| compare :: Int -> Int -> Ordering

1| compare x y

2| | x < y = LT

3| | x == y = EQ

4| | x > y = GT
>-----------<
5|
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
fromEither :: (a -> c) -> (b -> c) -> Either a b -> c
fromEither f g x = case x of
Left l -> f l
Right r -> g r

---

[#1 Range] =
[#1 Domain] = 1:0-3:18
0| fromEither :: (a -> c) -> (b -> c) -> Either a b -> c

1| fromEither f g x = case x of
>----------------------------
2| Left l -> f l
------------------
3| Right r -> g r
------------------<
4|



[#2 Range] =
[#2 Domain] = 2:4-2:18
0| fromEither :: (a -> c) -> (b -> c) -> Either a b -> c

1| fromEither f g x = case x of

2| Left l -> f l
>--------------<
3| Right r -> g r

4|



[#3 Range] =
[#3 Domain] = 3:4-3:18
0| fromEither :: (a -> c) -> (b -> c) -> Either a b -> c

1| fromEither f g x = case x of

2| Left l -> f l

3| Right r -> g r
>--------------<
4|
Loading

0 comments on commit 909d936

Please sign in to comment.