Skip to content

診断コード

コンパイラとツールの診断にはコードが振られています。エラーで止まったときは、ここでコードを引くと、何が起きたかと関係するページが分かります。

  • エラーは E + 4桁、警告は W + 4桁です。一度振った番号は診断を廃止しても使い回しません。
  • 番号の1桁目が段、2桁目が段の中の主題を表します。警告も同じ帯を使います(W3xxx は型の警告)。
  • 1つのコードは1種類の誤りを表します。直し方が同じ誤りは、書いた位置や形が違っても同じコードにし、形の違いは文面で区別します。
  • 文面は英語です。文面は仕様の一部ではなく、改善のために変わることがあります。コードは変わりません。
  • 実験的な機能が出す診断には = note: experimental feature `name` が付きます。
fn main() {
user = 1
x = usr
y: Int = "a"
}
Terminal window
$ emela check main.emel
error[E2101]: cannot find value `usr` in this scope
╭─[ main.emel:3:7 ]
│
3 │ x = usr
│ ─┬─
│ ╰───
───╯
= help: did you mean `user`?
error[E3001]: type mismatch: expected `Int`, found `String`
╭─[ main.emel:4:12 ]
│
4 │ y: Int = "a"
│ ─┬─
│ ╰───
───╯
2 errors
  • 診断は標準エラーに出し、間を空行で区切ります。
  • 位置は ╭─[ パス:行:桁 ] の枠で示します。位置がファイル全体のときは ─[ パス ] の1行にします。
  • 注記は = note: ...、助言は = help: ... と出します。
  • コードのない診断は error: ... と出します。
  • 最後の行は N errors、警告もあれば N errors, M warnings です(1件なら単数形)。
  • 色は標準エラーが端末で、環境変数 NO_COLOR が空か未設定のときだけ付けます。
  • 診断にエラーがあれば、コマンドは終了コード 1 で終わります。警告だけなら 0 です。
  • 実装がまだ扱えない形には、コードのない error: not supported yet: ... を出します。扱えるようになるまでの暫定です。
帯段主題
E1xxx字句と構文E10xx 字句、E11xx 式・パターン・型の構文、E12xx 宣言の構文、E13xx 注釈の構文、E14xx もう書かない形
E2xxxモジュール、名前、プロジェクトE20xx ファイルとモジュール、E21xx 名前の解決、E22xx 同梱の core やテストに限った定義、E23xx Pome.toml と依存
E3xxx型E30xx 型全般、E31xx 呼び出しとパターン、E32xx エラーの型(E)、E33xx Trait、impl、derive
E4xxxエフェクトE40xx エフェクトとハンドラの宣言、E41xx with、layer、handler member、E42xx エフェクトのラベル、E43xx R、Immediate、中断、E44xx 能力
E5xxx外部関数とターゲットE50xx @external、E51xx @export と @entry、E52xx ビルドするターゲットの制限
E6xxx〜E8xxx予約
E9xxxツールE90xx 入出力、E91xx 外部のツール(JS のホスト、cc、wasmtime)
  • 下2桁は主題の中の通し番号で、01 から振ります。
  • 0.29.0 より前は、段ごとに 100 ずつの帯(E01xx 字句と構文、E02xx モジュール、E03xx 型、E04xx エフェクト、E09xx ツール)でした。0.29.0 で一度だけ今の帯に振り直しました。新しい帯のコードは1桁目が 0 でないので、前の帯のコードと取り違えません。

文面の例はその診断の代表的な文面です。かっこの中のリンクは規則を説明しているページです。旧コードは 0.28 までのコードで、いくつかの種類をまとめたコードには、まとめた分をすべて挙げています。退役したコードは載せていません。

コード旧コード内容文面の例
E1001E0101文字列が閉じていないunterminated string literal
E1002E0102補間 #{ が閉じていないunterminated interpolation
E1003E0103どの名前のクラスにも合わない(字句と予約語)invalid name `Http_client`: not a lower, type, or upper name
E1004E0104数値の形になっていないinvalid number literal `1e9`
E1005E0105認識できない文字unrecognized character `é`
E1006E0106\ の後ろに文字がない(行末の \。複数行の文字列の中を含む)missing character after `\`
E1007E0107使えないエスケープunknown escape sequence `\q`
E1008E0108\u{...} の誤り(形の崩れ、サロゲート、10FFFF 超え)`\u{D800}` is a surrogate, not a Unicode scalar value
E1009E0109複数行の文字列の形の誤り(開く """ の後が改行でない、閉じる """ が行に1つでない、閉じる行より浅いインデント)expected a newline after the opening `"""`
E1101E0110来るはずのトークンがない。文面には期待したトークンの表示名が入る(記号と予約語はバッククォートで囲み、名前とリテラルは lower name のような種類名、入力の終わりは end of file)expected `)`
E1102E0111, E0113, E0118, E0126型、パターン、式、宣言が来るはずの位置にない。文面でどれかを示すexpected type / expected pattern / expected expression / expected declaration
E1103E0112要素が1つのタプル(型・パターン・式の (a,)、型とパターンの (a))a tuple type needs at least two elements
E1104E0114, E0115リストの .. の位置の誤り(.. の後ろに要素がある、または .. の前に要素がない [..rest])`..` must come last / `..` needs at least one element before it
E1105E0117パターンの文字列に補間があるstring interpolation is not allowed in a pattern
E1106E0119比較演算子の連鎖(a < b < c)comparison operators cannot be chained
E1107E0120名前付き引数の後ろの位置引数positional arguments cannot follow named arguments
E1108E0121括弧のない use X.op()wrap `use` in parentheses to call its operations: `(use X).op()`
E1109E0122文・腕・宣言の後ろに改行か } がないexpected newline or `}` after statement
E1110E0123, E0124パターンの外の _、または式のない ..`_` can only be used in patterns / `..` without an expression can only be used in patterns
E1111E0125束縛の左辺がパターンとして読めない(a + b = 1)invalid left-hand side of binding: expected a pattern
E1112E0149無名関数を、ブロックの最後でない文として書いた。行頭の || が前の行の続きにならないことを助言に出すthis anonymous function is never used with = help: a line that starts with `||` starts an anonymous function; to continue the previous line with `||`, enclose the expression in parentheses
E1113E0152式の途中の <-、または文 x <- R の右辺がエフェクトの名前でない(字句)。負の数と比べたいときは a < -b と書く`<-` can only bind an effect at the start of a statement (`x <- E`); to compare with a negative value, write `a < -b` / the right side of `<-` must be an effect
E1201E0127宣言の後ろの import(モジュール)imports must come before declarations
E1202E01281つのバリアントで名前付きと名前なしのフィールドを混ぜた(データ型)a variant cannot mix named and positional fields
E1203E0129trait の本体の導出規則(導出規則の構文が決まるまでの暫定)derive rules in traits are not supported yet
E1204E0130@external がない。本体のない fn、トップレベルの suspend fn、フィールドのない type(外部関数)a function without a body must be `@external`
E1205E0131opaque を type / enum 以外に付けた、または pub なしで付けた`opaque` can only be used on `type` and `enum`
E1206E0132バリアントのない enuman enum needs at least one variant
E1207E0133impl に pub や注釈を付けた`impl` cannot have `pub` or annotations
E1208E0134handler の操作の引数に型を書いたhandler operation parameters take their types from the effect
E1209E0135impl と handler の fn に本体がないthis function needs a body
E1210E0136impl の fn に戻り値の型、fails、uses を書いたimpl methods take their signature from the trait
E1211E0137エフェクトの操作に uses 節を書いた(エフェクト)effect operations cannot have a `uses` clause
E1212E0150局所関数に型引数、注釈、pub、suspend を付けた(束縛と関数)a local function cannot have attributes, a local function cannot be `pub` , a local function cannot be `suspend` , each with = help: remove it
E1213E0150, E0426, E0460型引数を書けない位置に書いた(局所関数、利用者のエフェクトの操作、内側のハンドラ)(束縛と関数)a local function cannot have type parameters with = help: remove it / operation `wrap` cannot have type parameters: only built-in effects may declare them / inner handler `Open` cannot have type parameters
E1214E0151局所関数をブロックの最後の文として書いた(束縛と関数)local function `go` is never called with = help: call it after the declaration
E1301E0138, E0141, E0146注釈の引数の形の誤り。@external ではターゲットの名前がない、文字列でない引数、文字列が1つか2つでない、文字列の補間。@external type に引数を付けた。@export の引数の形の誤りと、トップレベルの本体のある fn 以外に付けたときも含む(外部関数)expected `@external(target, "name")` / `@external` on a type takes no arguments / expected `@export(target, "name")`
E1302E01391つの fn に同じ言語の @external が2つ以上ある(外部関数)duplicate `@external` for target `js`
E1303E0140@external か @export の言語の名前を知らない(今は js、wasm、c)(外部関数)unknown language `node`
E1401E0142match を前置で書いた(パターンマッチ)`match` comes after the value: write `value match { ... }`
E1402E0144impl を impl Trait for Type か impl[...] Type: Trait の形で書いた(Trait)write `impl User: Show` instead of `impl Show for User`
E1403E0145handler を implements で書いた(エフェクト)write `handler ConsoleLogger: Logger` instead of `implements`
E1404E0147uses 節を書く位置(シグネチャ、関数型、エフェクトの操作)に use を書いたwrite `uses { Http }` instead of `use Http`
E1405E0148fn(...) を式として書いた。無名関数は |x| body と書く(束縛と関数)anonymous functions are written `|x| body` with = help: write `|x| ...` showing the rewrite. The language server offers the rewrite as a quick fix

E2xxx と W2xxx モジュール、名前、プロジェクト

Section titled “E2xxx と W2xxx モジュール、名前、プロジェクト”
コード旧コード内容文面の例
E2001E0201, E0202ファイル名かディレクトリ名がモジュール名にならない(モジュールと名前の解決)file name `Foo` cannot be a module name: not lower snake_case / directory name `My-Dir` cannot be a module name: not lower snake_case
E2002E0203予約されたモジュール名(ソースのルート直下の prelude.emel、core のモジュール名、std、テストのルート直下の main.emel と lib.emel)。依存のルート名が予約された名前のときも含むmodule name `Prelude` is reserved
E2003E0204モジュールの重複(大文字小文字の違いだけのもの、ソースのルートとテストのルートにまたがるものを含む)。依存のルート名がほかのモジュールやルート名とぶつかるときも含む(プロジェクトと Pome)duplicate module `Http.Client`
E2004E0205import 先のモジュールがないundefined module `Http.Clinet`
E2005E0206import の循環(自己 import を含む)import cycle: `A` -> `B` -> `A`
E2006E0208渡したファイルかディレクトリがソースのルートの外にある。テストのルートのファイルを build や run に渡したときも含む(emela コマンド)file `scripts/x.emel` is outside the source root `src` / directory `scripts` is outside the source root `src` / `test/a.emel` is under the test root, which only check and test read
E2007E0209エントリが見つからない(build と run だけ)entry `src/main.emel` not found
E2008E0210エントリがモジュールにならないentry `src/Main.emel` is not a module
E2009E0230emela run のエントリに main がなく、HTTP サービスでもない。ライブラリだけのプロジェクトを run したときも含む(実行時の意味)entry `src/main.emel` has no `main` function
E2010E0239ソースのルートのモジュールが、テストのルートのモジュールか [dev-dependencies] の Pome を import した(テスト)`Brix.Pbt.Property` can only be imported under `test/`
E2101E0211未定義の名前undefined name `usr`
E2102E0212モジュール、Trait、エフェクトに、その名前の項目がないmodule `Http.Client` has no item `gett`
E2103E0213同じ名前空間での定義の重複。後の定義を指し、前の定義の位置を添えるduplicate definition of `User`
E2104E0214pub でない定義を、ほかのモジュールから参照した`parse_raw` is private to `Email`
E2105E0215, E0216, E0315opaque な型を、定義したモジュールの外で構築した、パターンに書いた、またはフィールドを参照した(モジュール)cannot construct opaque type `Email` outside its module / cannot match on opaque type `Email` outside its module / cannot access field `value` of opaque type `Email` outside its module
E2106E0217名前は見つかったが、その位置に書けない種類だったexpected an error, found type `User`
E2107E0218. の左の名前が、モジュールと Trait の両方を指すambiguous name `Show`: both a module and a trait
E2108E0219self か Self を、使えない場所に書いた`self` is only available in handlers, traits, and impls
E2109E02201つのパターンか引数の並びで、同じ名前を2回束縛した`x` is bound more than once
E2110E0221型の位置にエフェクトの名前を書いた。集合でない型引数の位置(List[Db])も含む(型と効果の体系)effect `Logger` cannot be used as a type
E2111E0222部分更新の呼び出し先が、構成子1つのもの(type、error、フィールドのある handler)でない(データ型)cannot update enum variant `Circle` with `..`
E2112E0223部分更新で、変えるフィールドを位置で書いた(データ型)fields to update must be named: `field: value`
E2113E0231const が名前だけで循環している(データ型)constants refer to each other: `A` -> `B` -> `A`
W2101W0201型名の型引数が、外側の同じ名前の型を隠す(字句と予約語)type parameter `Item` shadows type `Item`
W2102W0202モジュールの定義か import が、Prelude の同じ名前を隠す`Some` shadows a Prelude name
E2201E0224@intrinsic を同梱の core のソースの外で使った(字句と予約語)`@intrinsic` can only be used in the bundled core library
E2202E0225@intrinsic を、本体のない fn、エフェクト、フィールドのない type 以外に付けた`@intrinsic` can only be used on a function without a body
E2203E0226@test を、引数のある fn、本体のない fn、トップレベルの fn 以外に付けた、または @test に引数を付けた(テスト)test function `takes` cannot take parameters
E2204E0227テスト関数を、テスト関数でない fn や const から参照した(テスト)test function `adds` can only be used from test functions
E2205E0228@internal の fn を、同梱の core のモジュールの外から参照したfunction `Secret.peek` can only be used from the bundled core library
E2206E0229@internal を、同梱の core の外か、トップレベルの fn 以外に付けた`@internal` can only be used in the bundled core library / `@internal` can only be used on top-level functions
E2301E0207ディレクトリを渡したが Pome.toml が見つからないno `Pome.toml` found in `proj` or its ancestors
E2302E0232Pome.toml の [build].target が知らないターゲット(プロジェクトと Pome)unknown target `node` in `[build].target`
E2303E0233依存の Pome の @external か @export を、[external] の allow で許していない(プロジェクトと Pome)`github.com/acme/x` uses `@external`, but it is not allowed
E2304E0234依存の [pome].emela が今のコンパイラより新しい、または版として読めない`github.com/acme/x` needs emela 0.22.0 or newer; this is 0.21.0 / `[pome].emela` of `github.com/acme/x` is not a version: `next`
E2305E0235依存のルート名がモジュール名にならない、またはソースパスからルート名を作れない`Json-codec` (the root name of `github.com/acme/x`) is not a module name / cannot make a root name from `Json-Codec` of `github.com/acme/Json-Codec`
E2306E0236言語サーバーが Pome.toml の依存を使えない(lock がない、キャッシュにない)the dependencies cannot be used: no Pome.lock; run `emela pome install`
E2307E0238依存グラフの Pome の [pome].targets にビルドするターゲットがない`github.com/emela-lang/x/platform-cloudflare` supports only js, not wasm
E2308E0240同じ Pome が [dependencies] と [dev-dependencies] の両方にある`github.com/emela-lang/brix` is in both [dependencies] and [dev-dependencies]
W2301W0203依存の [pome].emela が今のコンパイラより古い minor(ビルドは続ける)`github.com/acme/x` is written for emela 0.20.1; this is 0.21.0
W2302W0204[external] の allow の Pome が依存グラフにない`github.com/acme/old` is allowed in [external] but not depended on
W2303W0205ビルドする Pome の [pome].license が文字列でない、または SPDX のライセンス式でない(プロジェクトと Pome)`MIT/Apache-2.0` is not an SPDX license expression / `[pome].license` is not a string
W2304W0206[experimental] か --experimental-<name> の実験的な機能が、知らない名前、安定した機能、取り除いた機能のどれか(プロジェクトと Pome)unknown experimental feature `name` / experimental feature `name` is now stable and always on / experimental feature `name` was removed
W2305W0207[experimental] の値が真偽値でない`[experimental].name` must be `true` or `false`
コード旧コード内容文面の例
E3001E0301型が合わないtype mismatch: expected `Int`, found `String`
E3002E0302無限型infinite type: `?0` occurs in `List[?0]`
E3003E0310数値が来るはずの位置に数値でない型(算術演算子、単項マイナス)expected a number (`Int`, `Int64` or `Float`), found `String`
E3004E0311整数リテラルが型の範囲を超えた(字句と予約語)integer literal `3000000000` is out of range for `Int`
E3005E0314型が決まらない値のフィールドを参照した、またはメソッドを呼んだthe type of this value must be known to access field `name` / the type of this value must be known to call `f`
E3006E0316トップレベルの fn、局所関数、handler の init の引数に型がない(束縛と関数)parameter `x` of a top-level function needs a type
E3007E0323名前付き型の集合の型引数に、その種類のタグか集合の型引数でないものを書いた`E` of `Handler` is an error set, found type `Int`
E3008E0324集合でない型引数の位置に集合を書いたexpected a type, found a set: sets can only be passed to set type parameters
W3001W0304main の戻り値の型が ()、ExitCode、Never のどれでもない(実行時の意味)the value of type `Int` returned by `main` is discarded
W3002W0305fn の型引数が fn の型(引数、戻り値、fails、uses)に現れない。呼び出しで決まらないので消すか使う。言語サーバーが消す quick fix を出す(ジェネリクス)type parameter `A` of `f` does not appear in its signature
E3101E0304, E0305, E0309, E0332, E0406数が合わない(型引数、呼び出しの引数、構成子のパターンのフィールド、impl の fn の引数と Trait の宣言、handler の操作の引数とエフェクトの宣言)wrong number of type arguments: `List` takes 1, found 2 / wrong number of arguments: `connect` takes 2, found 3 / pattern `Rect` has 2 fields, found 1 / wrong number of parameters: `show` of `Show` takes 1, found 2 / wrong number of parameters: operation `info` takes 1, found 2
E3102E0303match が網羅していない(パターンマッチ)non-exhaustive match: `Rect(_, _)` not covered
E3103E0306その名前の引数がない。引数名を持たない関数値を名前付き引数で呼んだときも含むno parameter named `prot` in `connect`
E3104E0307同じ引数を2回渡した。位置引数と名前付き引数で同じ仮引数を指したときも含むargument `port` given more than once
E3105E0308名前付きフィールドの構成子のパターンで、.. を書かずにフィールドを省いた(パターンマッチ)pattern `User` does not mention fields `id`, `email`
E3106E0312メソッド呼び出しかフィールドの参照で、その名前のフィールドも関数もない。メソッドとして見つかった関数を呼ばずに書いたときも含むno field or function `nmae` for type `User`
E3107E0313フィールドを持たない型で、フィールドの参照かメソッド呼び出しの関数が見つからないtype `Int` has no field or function `nmae`
E3108E0317束縛か無名関数の引数のパターンが、必ずは成功しない(パターンマッチ)refutable pattern in binding: `None` not covered
E3109E0334型のモジュールで、最初の引数がその型の fn に、その型のフィールドと同じ名前を付けたfunction `headers` has the same name as a field of `Request`
E3110E0335メソッド呼び出しの候補が2つ以上ある。助言に修飾した書き方を出すambiguous method `show` for `User`: `User.show` and `Show.show` with = help: write `User.show(x)` or `Show.show(x)`
W3101W0301冗長な腕(パターンマッチ)unreachable match arm
E3201E0318, E0321本体のエラーが宣言の E に含まれない(-> T の未処理のエラー、fails にないエラー、const の値や layer の項目の引数の失敗)。関数の値の E が、期待する関数型の E に含まれないときも含む(エラー)unhandled error `NotFound` / error `DbError` is not declared in `fails` / error set mismatch: expected `fails {}`, found `fails Timeout`
E3202E0319エラーの型でない値を fail に渡した。1つのエラーの型を表す型引数をエラーでない型で具体化した(エラー)expected an error value, found `Int`
E3203E0320escape の腕のパターンが変数、または _ の腕にガードがある(エラー)escape arms must match an error constructor or `_` / a `_` escape arm cannot have a guard
W3201W0302escape の腕が受けるエラーが元の式から起きない、または _ の腕で元の式の E が空error `Timeout` is never raised here / no error is raised here
E3301E0325impl が、既定の実装のない Trait の関数を実装していない(Trait)incomplete impl: missing methods `show`, `merge`
E3302E0326型が Trait を満たさない(==、大小の比較、補間、制約、derive の対象のフィールド。derive できるのは Eq、Ord、Show、Encode、Decode、ObjectKey、Shaped だけ)(Trait)type `User` does not implement `Eq`
E3303E0328impl の頭が、型の名前と重複のない型引数の並びになっていないimpl head must be a type with distinct type parameters: `List[Int]`
E3304E0329上位 Trait が循環しているtrait `A` is its own supertrait: `A` -> `B` -> `A`
E3305E0330同じ型と Trait の組に impl が2つある(derive と手書きの impl の重なりを含む)`Show` is already implemented for `User`
E3306E0331型を定義したモジュールでも Trait を定義したモジュールでもない場所の impl`Show` for `User` can only be implemented in the module of `Show` or of `User`
E3307E0333Trait の関数の Self が、その関数の中で決まらないcannot infer which impl of `Parse` to use: add a type annotation
E3308E0336opaque な型に derive Decode か derive ObjectKey、フィールドのない @external type に derive Encode などを付けたcannot derive `Decode` for opaque type `Email` / cannot derive `Encode` for host type `Handle`
E3309E0337@key と @tag を当てた後で、フィールドのキーかバリアントのタグが重なるkey `dueAt` is used by both `due_at` and `due` / tag `done` is used by both `Done` and `Closed`
E3310E0338@key をフィールド以外に、@tag をバリアント以外に付けた、同じものを2回付けた、引数が文字列リテラル1つでない`@key` takes one string literal / `@tag` can only be placed on a variant / `@key` can only be placed once
E3311E0339derive ObjectKey を、フィールドが1つでない型か、中身を持つバリアントのある enum に付けたcannot derive `ObjectKey` for `Shape`: variant `Circle` has contents / cannot derive `ObjectKey` for `Point`: it has 2 fields
E3312E0341自動で決まる組み込みの Trait(Immediate、Capability)の impl を書いた(型と効果の体系)`Capability` is determined automatically and cannot be implemented
W3301W0303pub でない型に derive した実装がどこでも要らないderived `Ord` for `Point` is never used
コード旧コード内容文面の例
E4001E0404handler が操作か handler member を全部は実装していない(エフェクト)handler `Half` does not implement operation `warn`
E4002E0405handler が同じ操作か同じ handler member を2回実装したoperation `info` is implemented more than once
E4003E0413, E0433ハンドラが実装できないもののハンドラを書いた(ホストのエフェクト、External、組み込みのエフェクト TaskGroup・Spawn・Deferred・Semaphore・Permit・Queue、ラベル)(中断する操作、エフェクトのラベル)handler `Runtime` cannot implement `Async`: only the host provides it / handler `H` cannot implement `ProcessHost`: only the host provides it / handler `MyGroup` cannot implement `TaskGroup`: only `Task.Group` provides it / handler `H` cannot implement `External`: only the host provides it / handler `AuditH` cannot implement label `Audit`
E4004E0415ハンドラの操作の suspend の有無が、エフェクトの宣言と違う(中断する操作)operation `now` is not a `suspend fn` in effect `Clock`
E4005E0418ハンドラの値を、そのハンドラの init の外で、名前か Self で作った(状態と資源)handler `Counter` can only be constructed in its own `init`
E4006E0419フィールドのあるハンドラに init がない(状態と資源)handler `NoInit` has fields but no `init`
E4007E0420release が失敗しうる(状態と資源)`release` of handler `Counter` cannot fail, but this may fail with error `Boom`
E4008E0423型引数のあるエフェクトの型引数を書いていない(use State、uses 節、handler の頭)missing type arguments for effect `State[S]` / handler `Fixed` must implement `State[S]` with concrete types
E4009E0424エフェクトの型引数を集合として使った(組み込みのエフェクトは除く)type parameter `E` of effect `Raise` is used as a set, but effect type parameters must be ordinary types / type parameter `E` of handler `Wrap` is used as a set, but handler type parameters must be ordinary types
E4010E0446ソースで宣言したエフェクトに操作も handler member もないeffect `Marker` has no operations
E4011E0449内側のハンドラが handler member に合わない(init の引数の名前か型が違う、別のエフェクトを実装している)the init of `Open` takes `(path: Int)`, but handler member `Open` of `Files` takes `(path: String)`
E4012E0450, E0451handler の : の後に、同じエフェクトを2回並べた、または同じ名前の操作か handler member を持つ2つのエフェクトを並べたeffects `Query` and `Reader` of handler `Clash` both have `query` / effect `Audit` is listed more than once in handler `Repeated`
E4013E0462handler の型引数が、: の後のエフェクト、フィールドの型、init の引数の型のどれにも現れないtype parameter `A` of handler `H` does not appear in its effects, fields or init parameters
E4101E0411同じ with のハンドラの依存が循環しているhandlers depend on each other: `Stamped` -> `Ticking` -> `Stamped`
E4102E0421layer の中で同じエフェクトを2つのハンドラが供給する、または同じハンドラを2回並べたeffect `Logger` is provided by both `Counter` and `Quiet` in layer `Loud`
E4103E0422layer が互いを含むlayers include each other: `LoopA` -> `LoopB` -> `LoopA`
E4104E0434, E0435init の引数の過不足。引数を取るハンドラや handler member を引数なしで書いた、または引数を取らないもの(引数のない init のハンドラ、layer、ラベル)に引数を書いた(状態と資源)handler `WorkerKv` needs arguments for its `init` / handler member `Open` needs arguments / handler `FakeKv` takes no arguments
E4105E0447handler member を x = なしで with の項目に書いた、layer の項目に書いた、with で layer を名前に束縛した、またはハンドラを作らないラベルの項目(L、P がエフェクトの L by P)を名前に束縛したhandler member `Open` must be bound to a name in `with` / handler member `Open` cannot be an item of layer `App` / layer `App` cannot be bound to a name: it provides more than one effect / label item `AuditLog by Console` cannot be bound to a name: it makes no handler
E4106E0448handler member を、with の項目と init の外で開いたhandler member `Open` can only be opened in `with` or called in an `init`
E4107E0459型引数を持つハンドラの型引数が、with や layer の項目、by の右で決まらない(決まらない、本体のエフェクトの2つ以上に合う、同じ with の別の項目を上書きしうる)cannot infer the type arguments of handler `Memory[S]` / cannot infer the type arguments of handler `Empty[A]`: both `State[List[Int]]` and `State[List[String]]` fit / cannot infer the type arguments of handler `InMemoryRepo[K, V]`: it may override `Repo[UserId, User]` of `AppLive`
E4201E0429ラベルの元のエフェクトがラベルか組み込みのエフェクト(エフェクトのラベル)label `Nested` cannot stand for `Audit`: `Audit` is a label
E4202E0430ラベルでないエフェクトを with に書いた、または by の左に書いた(エフェクトのラベル)effect `Log` is not a label: `with` takes a handler, a layer or a label / only a label can take `by`, but `Log` is not a label
E4203E0431by の右が、ラベルの元のエフェクトと別のエフェクトを供給する(エフェクトのラベル)label `Audit` stands for `Log`, but `OtherH` provides `Other`
E4204E0432同じ with で同じラベルに2回 by を書いたlabel `Audit` is given a provider more than once in this `with`
W4201W0401with のラベルの項目(L、L by P)が使われないlabel `Audit` is listed here but never used
E4301E0402, E0403本体の R が、宣言や文脈の許す R に含まれない(uses 節、const、layer の項目の引数、main、テスト関数、@export の fn)。関数の値の R が、期待する関数型の R に含まれないときも含む。task の R から来るエフェクトや、名前に束縛した項目、モジュールの External には、それぞれの注記と助言が付く(エフェクト)effect `Logger` is not declared in `uses` / effect `Clock` is not provided in `main` / effect set mismatch: expected `uses {}`, found `uses { Logger }`
E4302E0416Immediate を求める効果の集合が Immediate でない(型と効果の体系)effect `Clock` may suspend, but `R` of `update` must be `Immediate`
E4303E0417fn の操作(suspend fn でないもの)を実装する本体の R が Immediate でなく、中断しうる呼び出しを含む。suspend のない handler member の init と release も同じ(中断する操作)calling `stamp` may suspend because it uses effect `Clock`, but operation `now` is not a `suspend fn`
E4304E0322効果の集合でない型引数に Immediate を付けた(型と効果の体系)`Immediate` can only constrain effect sets, but `A` is not used in `uses`
E4305E0461suspend fn の実装で、resume を直接呼んだ後か resume を渡した後に、中断しうる呼び出しが評価されうる。続きは resume の前に Spawn で始める(中断する操作)call to `send` may suspend after `resume` has been called
E4401E0401能力の値のエフェクトにその操作がないeffect `Logger` has no operation `infoo`
E4402E0414ホストのエフェクトか External を use した`Async` is a host effect and cannot be used with `use` / `ProcessHost` is a host effect and cannot be used with `use` / `External` cannot be used with `use`
E4403E0452use F1 + ... + Fm 型の引数に、どれかの Fi を持たない能力を渡したexpected `use Query + Execute`, found `use Query`, which does not have `Execute`
E4404E0453効果の別名を x.op(...) か x.op の受け手以外に書いた、または効果の別名から handler member を開いた(エフェクト) `log` is an effect alias, not a value: only `log.op(...)` and `log.op` can be written / handler member `Open` cannot be opened through effect alias `fs`
E4405E0455能力が、それを作った with の外へ出る(本体の値の型、本体から出るエラーの型、with の R)。init で Self(...) に渡したフィールドが init の中の with の能力を持つときも含む(エフェクト)capability `log` leaves the `with` that made it
E4406E0456操作の戻り値の型に、能力の型か、その操作のエフェクト以外の能力に縛られた型がある。能力は handler member で渡すthe result of operation `open` cannot contain a capability type: `use Conn`
E4407E0458E の能力に縛られた型の値を、E を実装するハンドラの外で作った(型と効果の体系)a value of `EnemyId` can only be made inside a handler of `Engine`
E4408E0340Capability の制約を、ふつうの型でない型引数(エラーの集合、エフェクトの集合)に付けた`Capability` can only constrain ordinary type parameters, but `R` is used in `uses`
W4401W0403use E を式として書いた((use E).op(...) と x = use E のどちらも)。0.30 でエラーになる。x <- E か名前に束縛した with の項目 with x = H に書き換える。言語サーバーが書き換えの quick fix を出す(エフェクト) `use Logger` as an expression is deprecated

E5xxx と W5xxx 外部関数とターゲット

Section titled “E5xxx と W5xxx 外部関数とターゲット”
コード旧コード内容文面の例
E5001E0412エントリからたどれる外部関数に、ビルドするターゲットの言語の @external がない。check と言語サーバーは出さない(外部関数)external function `wasm_now` has no `@external(js, ...)` for target `js`
E5002E0445外部関数の uses 節に、ProcessHost と PageHost 以外のエフェクト(Async と集合の型引数を含む)がある(外部関数)the uses of external function `write_host` can contain only `ProcessHost` and `PageHost`
E5003E0454外部関数に渡す、または外部関数が返すコールバックの R に、ホストのエフェクトと(呼び出しで渡す関数では)その外部関数のモジュールの External 以外のエフェクトか、@borrowed のない引数での能力がある(外部関数)effect `Greeter` cannot be used by a callback of external function `set_timeout`: the host calls it without handlers / effect `Greeter` cannot be in the `uses` of a callback: the host calls it without handlers / capability `g` cannot be used by a callback of external function `set_timeout`: the host may call it after `g` has ended
E5004E0457外部関数の関数型の引数以外に @borrowed を付けた(外部関数) `@borrowed` can only be written on a parameter of function type of an external function
E5101E0436@export の fn の引数か戻り値が境界の型でない(外部関数)exported function `f` cannot take `List[Int]`
E5102E0437エントリのモジュールの外に、@export の fn か @entry がある`@export` is only allowed in the entry module / `@entry` is only allowed in the entry module
E5103E0438同じターゲットに同じ名前の export が2つある`fetch` is exported twice for target `js`
E5104E0439@entry の引数が entry adapter でない`Http.get` is not an entry adapter
E5105E0440その fn を entry adapter の最初の引数に渡せない`app` does not fit `Http.serve`
E5201E0427ビルドするターゲットが native で、エントリからたどれる外部関数がコールバックを取るか返す(ターゲット)external function `on_data` takes a callback, which target `native` does not support yet
E5202E0441native で、export する fn が中断しうるexported function `f` may suspend, which target `native` does not support
E5203E0442native で @entry(Http.serve) を使った(ターゲット)HTTP services are not supported on target `native` yet
E5204E0443native で、エントリからたどれる外部関数か export する fn が、境界でまだ扱えない型(Array を含むもの)を取るか返す(ターゲット)external function `rows` returns `Array[String]`, which target `native` does not support yet
コード旧コード内容文面の例
E9001E0901パスが見つからないpath `app` not found
E9002E0902ファイルかディレクトリを読めないcannot read `src/a.emel`: permission denied
E9003E0903出力を書き込めないcannot write `target/emela/js/main.mjs`
W9001W0901emela pome publish で、公開 API の変更に対して版の上げ幅が足りないremoving `Quince.Router.mount` needs a new major version (v1.2.0 → v2.0.0)
E9101E0904, E0907, E0909外部のツールが見つからない、起動できない、または古い(JS のホストが --target js で求める版より古い、cc。EMELA_CC に空白があれば EMELA_CC_ARGS を助言する。wasmtime が --target wasm で 49 より古い)(emela コマンド)cannot start `node` / cannot start `cc` / `wasmtime` not found
E9102E0906JS の出力段が不正な出力を返した(処理系の内部の誤り)invalid output from the JS backend
E9103E0908出力した C のコンパイルに失敗した(処理系かホストの C の誤り)`cc` failed to compile the output of target `native`
W9101W0902EMELA_NODE を設定している(emela コマンド)EMELA_NODE is deprecated; use EMELA_JS_HOST