1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 14:13:27 +03:00
- Closes #2495
This commit is contained in:
Jonathan Cubides 2023-11-03 21:23:57 +01:00 committed by GitHub
parent 47c8df11f1
commit ee45ddf8c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
40 changed files with 18 additions and 40 deletions

View File

@ -182,7 +182,7 @@ topModuleDef ::
(Members '[Error ParserError, Files, PathResolver, InfoTableBuilder, PragmasStash, JudocStash, NameIdGen] r) =>
ParsecS r (Module 'Parsed 'ModuleTop)
topModuleDef = do
optional_ stashJudoc
space >> optional_ stashJudoc
optional_ stashPragmas
m <- top moduleDef
P.lift (checkPath (m ^. modulePath))

View File

@ -127,6 +127,7 @@ toPlainTextTrim :: (HasTextBackend a) => a -> Text
toPlainTextTrim =
Text.unlines
. map Text.stripEnd
. dropWhileEnd Text.null
. dropWhile Text.null
. Text.lines
. toPlainText

View File

@ -1,4 +1,3 @@
module Foo;
import Foo.Data.Bool open;

View File

@ -6,4 +6,3 @@ type Nat :=
fun : Nat -> Nat
| (S {S {x}}) := x;

View File

@ -10,4 +10,3 @@ type Pair (A : Type) (B : Type) :=
f : _ → _
| (mkPair false true) := true
| true := false;

View File

@ -1,4 +1,3 @@
module AppLeftImplicit;
x : Type := {x};

View File

@ -2,4 +2,3 @@ module ConstructorExpectedLeftApplication;
f : {A : Type} -> A -> A
| (x y) := x;

View File

@ -2,4 +2,3 @@ module ImplicitPatternLeftApplication;
f : {A : Type} -> A -> A
| ({x} y) := y;

View File

@ -5,4 +5,3 @@ import Stdlib.Prelude open;
f : {A : Type} → Nat := zero;
main : Nat := f;

View File

@ -12,4 +12,3 @@ if : {A : Type} -> Bool -> A -> A -> A
f : Bool -> Bool
| x := if x;

View File

@ -6,4 +6,3 @@ type B := b : B;
f : A → B
| b := b;

View File

@ -3,4 +3,3 @@ module E1;
axiom B : Type;
type X := c : (X -> B) -> X;

View File

@ -5,4 +5,3 @@ type T0 (A : Type) := t : (A -> T0 A) -> T0 A;
alias : Type -> Type := T0;
type T1 := c : alias T1 -> T1;

View File

@ -6,4 +6,3 @@ alias : Type -> Type -> Type
| A B := A -> B;
type T1 := c : alias T1 T1 -> _;

View File

@ -3,4 +3,3 @@ module E2;
import NegParam open;
type D := d : T D -> D;

View File

@ -3,4 +3,3 @@ module E3;
axiom B : Type;
type X := c : B -> (X -> B) -> X;

View File

@ -5,4 +5,3 @@ type Tree (A : Type) :=
| node : (A -> Tree A) -> Tree A;
type Bad := bad : Tree Bad -> Bad;

View File

@ -7,4 +7,3 @@ axiom B : Type;
type T1 (A : Type) := c1 : (B -> T0 A) -> T1 A;
type T2 := c2 : (B -> B -> T1 T2) -> T2;

View File

@ -3,4 +3,3 @@ module E6;
axiom A : Type;
type T (A : Type) := c : (A -> A -> T A -> A) -> T A;

View File

@ -3,4 +3,3 @@ module E7;
type T0 (A : Type) (B : Type) := c0 : (B -> A) -> T0 A B;
type T1 (A : Type) := c1 : (A -> T0 A (T1 A)) -> T1 A;

View File

@ -3,4 +3,3 @@ module E9;
type B := b : B;
type T := c : ((B → T) -> T) -> T;

View File

@ -3,4 +3,3 @@ module UnsolvedMeta;
type Proxy (A : Type) := x : Proxy A;
t : Proxy _ := x;

View File

@ -3,4 +3,3 @@ module WrongReturnType;
axiom B : Type;
type A := c : B;

View File

@ -1,4 +1,3 @@
module WrongReturnTypeParameters;
type A (B : Type) := c : A B B;

View File

@ -1,4 +1,3 @@
module WrongReturnTypeTooFewArguments;
type A (B : Type) := c : A;

View File

@ -1,4 +1,3 @@
module WrongReturnTypeTooManyArguments;
type A (B : Type) := c : A B B;

View File

@ -1,2 +1 @@
module Stdlib.Data.Bool;

View File

@ -11,4 +11,3 @@ f : (A : Type) → Tree A → Tree A → Tree A
g : (A : Type) → Tree A → Tree A → Tree A
| A x leaf := x
| A x (branch y z) := g A z (g A x y);

View File

@ -8,4 +8,3 @@ f : A -> A -> A
g : A -> A -> A
| x y := f x x;

View File

@ -9,4 +9,3 @@ f : A -> A -> A
g : A -> A -> A
| x y := f x x;

View File

@ -9,4 +9,3 @@ f : A -> A -> A
terminating
g : A -> A -> A
| x y := f x x;

View File

@ -6,4 +6,3 @@ type Nat :=
fun : Nat -> Nat
| (S {S {x}}) := x;

View File

@ -4,4 +4,3 @@ import Other;
import U;
u : Other.Unit := U.t;

View File

@ -5,4 +5,3 @@ import Other;
type Unit := t : Unit;
u : Other.Unit := t;

View File

@ -1,4 +1,3 @@
module Other;
type Unit := t : Unit;

View File

@ -1,4 +1,3 @@
module U;
type Unit := t : Unit;

View File

@ -4,4 +4,3 @@ module SelfApplication;
import Stdlib.Prelude open;
main : IO := printNatLn (λ {x := x x} id (3 + 4));

View File

@ -1,3 +1,11 @@
-- Hola
{-- This is Judoc block comment --}
-- Bonjour
{-# format : false #-}
module LocalModWithAxiom;

View File

@ -1,3 +1,9 @@
-- Hola
{-- This is Judoc block comment --}
-- Bonjour
{-# format : false #-}
module LocalModWithAxiom;
@ -18,4 +24,3 @@ module C;
end;
end;

View File

@ -1,2 +1 @@
module M;