Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Oct 11, 2024
1 parent 2744c5d commit 182c8c3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Juvix/Parser/Lexer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ space' special =
| otherwise -> return (acc <> pack txt)

integerWithBase' :: ParsecS r (WithLoc IntegerWithBase)
integerWithBase' = withLoc $ do
integerWithBase' = P.try $ withLoc $ do
minus <- optional (char '-')
b <- integerBase'
num :: Integer <- case b of
Expand Down
22 changes: 11 additions & 11 deletions tests/Core/positive/test043.jvc
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@

def fun :
Π A : Type,
A A :=
A -> A :=
λ(A : Type)
λ(x : A)
let f : (A A) A := λ(h : A A) h (h x) in
let f : (A -> A) -> A := λ(h : A -> A) h (h x) in
f (λ(y : A) x);

def helper : Int Int Int :=
def helper : Int -> Int -> Int :=
λ(a : Int)
λ(b : Int)
a * b - b;

def fun' : Π T : Type Type,
def fun' : Π T : Type -> Type,
Π unused : Type,
Π C : Type,
Π A : Type,
(T A A C)
A
C :=
λ(T : Type Type)
(T A -> A -> C)
-> A
-> C :=
λ(T : Type -> Type)
λ(unused : Type)
λ(C : Type)
λ(A : Type)
λ(mhelper : T A A C)
λ(mhelper : T A -> A -> C)
λ(a' : A)
let f : (A A) A := λ(g : A A) g (g a') in
let h : A A C := λ(a1 : A) λ(a2 : A) mhelper a2 a1 in
let f : (A -> A) -> A := λ(g : A -> A) g (g a') in
let h : A -> A -> C := λ(a1 : A) λ(a2 : A) mhelper a2 a1 in
f (λ(y : A) h y a');

fun Int 2 + fun' (λ(A : Type) A) Bool Int Int helper 3
2 changes: 1 addition & 1 deletion tests/Internal/positive/out/FunctionType.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Π A : Type, Π B : Type, A B
Π A : Type, Π B : Type, A -> B

0 comments on commit 182c8c3

Please sign in to comment.