-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: modules associated with inductive types should be declared af…
…ter their inductive types (#2768) * Closes #2763. * Fixes a bug in the scoper, likely introduced in #2468 by making later declarations depend on earlier ones. The problem was that the inductive modules were always added at the beginning of a section, which resulted in an incorrect definition dependency graph (an inductive type depended on its associated projections). * Now inductive modules are added just after a group of inductive definitions, before the next function definition. This implies that inductive type definitions which depend on each other cannot be separated by function definitions. Existing Juvix code needs to be adjusted. * The behaviour is now equivalent to "manually" inserting module declarations with projections after each group of inductive definitions.
- Loading branch information
Showing
8 changed files
with
156 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module TypeParamAxiom; | ||
|
||
import Stdlib.Data.Nat open; | ||
|
||
axiom X : Type; | ||
axiom B : Type -> Type; | ||
|
||
type A := mkA { | ||
a : B X; | ||
}; | ||
|
||
main : Nat := 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 |
Oops, something went wrong.