This repository has been archived by the owner on May 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3895187
commit 65aa291
Showing
3 changed files
with
36 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) 2020-2024 Tesla (Yinsen) Zhang. | ||
// Use of this source code is governed by the MIT license that can be found in the LICENSE.md file. | ||
package org.aya.syntax.core; | ||
|
||
import kala.collection.immutable.ImmutableSeq; | ||
import org.aya.generic.AyaDocile; | ||
import org.aya.pretty.doc.Doc; | ||
import org.aya.syntax.core.term.Term; | ||
import org.aya.util.Arg; | ||
import org.aya.util.prettier.PrettierOptions; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* Signature of a definition, used in concrete and tycking. | ||
* | ||
* @author ice1000 | ||
*/ | ||
public record Signature<T extends Term>( | ||
@NotNull ImmutableSeq<Arg<Term>> param, | ||
@NotNull T result | ||
) implements AyaDocile { | ||
@Override public @NotNull Doc toDoc(@NotNull PrettierOptions options) { | ||
// return Doc.sep(Doc.sep(param.view().map(p -> p.toDoc(options))), Doc.symbol("->"), result.toDoc(options)); | ||
} | ||
} |
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