Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Custom errors aren't reported at the right location

クローズ
#599 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
領域
compilers

調査の方向性

Install the stated debug and yoga-json packages, then reproduce the diagnostics with the provided Main.purs example. Trace how the compiler assigns locations to the custom errors and warnings shown in the output; done means those diagnostics point to their actual originating spans rather than the reported locations.

索引モデルが issue の本文から書いたものです。

説明

module Main where

import Prelude

import Effect (Effect)
import Data.Variant (Variant)
import Data.Variant as Variant
import Type.Proxy (Proxy(..))
import Yoga.JSON as JSON
import Debug (traceM)
import Yoga.JSON.Variant (TaggedVariant(..))

type V = (a :: {}, b :: {})
type TV = TaggedVariant "type" "value" V
type Var = Variant V

main :: Effect Unit
main = do
  tv
  tv2

tv = do
  let f = JSON.write ((fromHomogeneous { a: {} }) :: Var)
  traceM f
  traceM $ JSON.read @Var f

tv2 = do
  let f = JSON.write (TaggedVariant $ (Variant.inj (Proxy @"a") {}) :: TV)
  traceM f
  traceM $ JSON.read @TV f

Error! · [NotInScope] · src/Main.purs:23:24
  •
  │
  • 'fromHomogeneous' is not in scope
  │
  │     let f = JSON.write ((fromHomogeneous { a: {} }) :: Var)
  │                          ╰──────────────
  •

Warning! · [CustomWarning] · src/Main.purs:27:1
  •
  │
  • Debug function usage
  │
  │   tv2 = do
  │   ╰───────
  •

Warning! · [CustomWarning] · src/Main.purs:27:1
  •
  │
  • Debug function usage
  │
  │   tv2 = do
  │   ╰───────
  •

Error! · [CannotUnify] · src/Main.purs:23:24
  •
  │
  • Cannot unify '?[invalid function application]' with 'Variant V'
  │
  │     let f = JSON.write ((fromHomogeneous { a: {} }) :: Var)
  │                          ╰────────────────────────
  •

Warning! · [CustomWarning] · src/Main.purs:22:1
  •
  │
  • Debug function usage
  │
  │   tv = do
  │   ╰──────
  •

Warning! · [CustomWarning] · src/Main.purs:22:1
  •
  │
  • Debug function usage
  │
  │   tv = do
  │   ╰──────
  •

You'll need spago install debug and spago install yoga-json

主要言語
Rust
スター
123
フォーク
12
平均マージ
7時間 34分
マージ済み PR(30日)
89

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

purefunctor/purescript-iris のほかの issue

purefunctor/purescript-iris の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。