mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
11 lines
336 B
Nix
11 lines
336 B
Nix
|
{ lib }:
|
||
|
{
|
||
|
/* Returns the Agda interface file to a given Agda file.
|
||
|
*
|
||
|
* Examples:
|
||
|
* interfaceFile "Everything.agda" == "Everything.agdai"
|
||
|
* interfaceFile "src/Everything.lagda.tex" == "src/Everything.agdai"
|
||
|
*/
|
||
|
interfaceFile = agdaFile: lib.head (builtins.match ''(.*\.)l?agda(\.(md|org|rst|tex))?'' agdaFile) + "agdai";
|
||
|
}
|