Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
tycker
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Jan 9, 2024
1 parent 4545c8d commit b4889a6
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
6 changes: 2 additions & 4 deletions base/src/main/java/org/aya/syntax/concrete/Pattern.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2023 Tesla (Yinsen) Zhang.
// 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.concrete;

Expand Down Expand Up @@ -56,12 +56,10 @@ record CalmFace(@Override @NotNull SourcePos sourcePos) implements Pattern {
}

/**
* @param userType only generated when a typed lambda is pushed into the patterns
* @param type used in the LSP server
* @param type used in the LSP server
*/
record Bind(
@NotNull LocalVar bind
// @Nullable Expr userType
// @ForLSP @NotNull MutableValue<@Nullable Term> type
) implements Pattern {
@Override public @NotNull Bind descent(@NotNull UnaryOperator<@NotNull Pattern> f) {
Expand Down
14 changes: 14 additions & 0 deletions base/src/main/java/org/aya/syntax/ref/LocalCtx.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// 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.ref;

import kala.collection.mutable.MutableMap;
import org.aya.syntax.core.term.Term;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public record LocalCtx(
@NotNull MutableMap<LocalVar, Term> binds,
@Nullable LocalCtx parent
) {
}
3 changes: 3 additions & 0 deletions base/src/main/java/org/aya/tyck/ExprTycker.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// 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.tyck;

public class ExprTycker {
public TyckState state;
}
11 changes: 11 additions & 0 deletions base/src/main/java/org/aya/tyck/TyckState.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// 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.tyck;

import org.aya.syntax.ref.LocalCtx;
import org.jetbrains.annotations.NotNull;

public record TyckState(
@NotNull LocalCtx ctx
) {
}

0 comments on commit b4889a6

Please sign in to comment.