Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ new ] Fewer postulates needed for Primitive types (#3174)
Looking at our attempt to make (most of) the standard library compile with the `--safe` flag (cf. agda/agda-stdlib/pull/414), it would be nice to be able to drop some of the `postulate`s in `Agda.Builtin.*`. * Made `String`, `Char`, `Float`, `Word64` and the `Coinduction` builtins which do not require a corresponding definition. This allows us to remove all of the corresponding `postulate`s in `Agda.Builtin.*`. * Added a warning when a `BUILTIN` rebinds an existing name. This should make our change nicely backwards compatible: we don't need to use `postulate`s anymore but if we are then Agda simply warns us. * Made sure `BUILTIN`-bound names are recognized as proper declarations in the nicifier and that they can be attached a fixity. This is only used for `Sharp` in `Agda.Builtin.Coinduction` at the moment. And voilà!
- Loading branch information
Showing
28 changed files
with
188 additions
and
67 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
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
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,3 @@ | ||
module Agda.TypeChecking.Monad.Builtin where | ||
|
||
builtinsNoDef :: [String] |
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 |
---|---|---|
@@ -1,6 +1,26 @@ | ||
EXECUTED_PROGRAM | ||
|
||
ret > ExitSuccess | ||
out > /Issue2821.agda:24,1-30 | ||
out > BUILTIN STRING declares an identifier (no longer expects an already defined identifier) | ||
out > when scope checking the declaration | ||
out > {-# BUILTIN STRING String #-} | ||
out > /Issue2821.agda:25,1-28 | ||
out > BUILTIN CHAR declares an identifier (no longer expects an already defined identifier) | ||
out > when scope checking the declaration | ||
out > {-# BUILTIN CHAR Char #-} | ||
out > | ||
out > ———— All done; warnings encountered ———————————————————————— | ||
out > | ||
out > /Issue2821.agda:24,1-30 | ||
out > BUILTIN STRING declares an identifier (no longer expects an already defined identifier) | ||
out > when scope checking the declaration | ||
out > {-# BUILTIN STRING String #-} | ||
out > | ||
out > /Issue2821.agda:25,1-28 | ||
out > BUILTIN CHAR declares an identifier (no longer expects an already defined identifier) | ||
out > when scope checking the declaration | ||
out > {-# BUILTIN CHAR Char #-} | ||
out > ALSE | ||
out > RUE | ||
out > |
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 |
---|---|---|
@@ -1,6 +1,35 @@ | ||
COMPILE_FAILED | ||
|
||
ret > ExitFailure 1 | ||
out > /Issue2909-5.agda:6,1-28 | ||
out > BUILTIN INFINITY declares an identifier (no longer expects an already defined identifier) | ||
out > when scope checking the declaration | ||
out > {-# BUILTIN INFINITY ∞ #-} | ||
out > /Issue2909-5.agda:7,1-28 | ||
out > BUILTIN SHARP declares an identifier (no longer expects an already defined identifier) | ||
out > when scope checking the declaration | ||
out > {-# BUILTIN SHARP ♯_ #-} | ||
out > /Issue2909-5.agda:8,1-28 | ||
out > BUILTIN FLAT declares an identifier (no longer expects an already defined identifier) | ||
out > when scope checking the declaration | ||
out > {-# BUILTIN FLAT ♭ #-} | ||
out > | ||
out > ———— All done; warnings encountered ———————————————————————— | ||
out > | ||
out > /Issue2909-5.agda:6,1-28 | ||
out > BUILTIN INFINITY declares an identifier (no longer expects an already defined identifier) | ||
out > when scope checking the declaration | ||
out > {-# BUILTIN INFINITY ∞ #-} | ||
out > | ||
out > /Issue2909-5.agda:7,1-28 | ||
out > BUILTIN SHARP declares an identifier (no longer expects an already defined identifier) | ||
out > when scope checking the declaration | ||
out > {-# BUILTIN SHARP ♯_ #-} | ||
out > | ||
out > /Issue2909-5.agda:8,1-28 | ||
out > BUILTIN FLAT declares an identifier (no longer expects an already defined identifier) | ||
out > when scope checking the declaration | ||
out > {-# BUILTIN FLAT ♭ #-} | ||
out > /Issue2909-5.agda:8,22-23 | ||
out > "COMPILE GHC as" pragmas are not allowed for the FLAT builtin. | ||
out > |
Oops, something went wrong.