Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Iris rejects Extend function instance with invalid kind

Đã đóng
#601 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, rust
Lĩnh vực
compilers

Hướng nghiên cứu

Reproduce the disagreement using spago.yaml and src/Main.purs, first running spago build and the Node command, then iris build --quiet --color never. Investigate Iris's handling of the Extend expression at src/Main.purs:9 and the resulting CannotUnify diagnostics. Done means Iris compiles this reproduction without errors, matching purs's successful result.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

With purs 0.15.15, Iris 0.1.1, Spago 1.0.3 and Node 22.16.0, create these two files in a fresh directory:

spago.yaml:

package:
  name: extend-function-repro
  dependencies:
    - control
    - effect
    - console
workspace:
  packageSet:
    registry: 81.1.0

src/Main.purs:

module Main where

import Prelude
import Control.Extend as Extend
import Effect (Effect)
import Effect.Console (log)

main :: Effect Unit
main = log (show (Extend.extend (\f -> f "B") (\s -> s <> "!") "A"))

Run from that directory with spago, purs and iris on PATH:

spago build
node -e 'import("./output/Main/index.js").then(m => m.main())'
iris build --quiet --color never

Observed: spago build succeeds with zero errors and purs's output prints "AB!". Iris exits with status 1, reporting two CannotUnify errors at src/Main.purs:9 (Cannot unify 'Type' with '?[invalid kind]'), followed by NoInstanceFound: Show ?[invalid function application] and compilation failed. The latter diagnostic may be cascading; the internal cause is not established. This is a compile disagreement, not a runtime mismatch.

The expression uses the Semigroup String => Extend ((->) String) instance from control 6.0.0: evaluating the extended function at "A" asks the input function for "B", yielding "AB!". The resolved registry dependencies are control 6.0.0, prelude 6.0.2, newtype 5.0.0, safe-coerce 2.0.0, unsafe-coerce 6.0.0, effect 4.0.0 and console 6.1.0. The generated spago.lock for this two-file reproduction has SHA-256 c54a52bb0a07f41b163cc3f844ae27449ff19980919fecb92c72243264918f26.

Ngôn ngữ chính
Rust
Star
117
Fork
11
Merge trung bình
4 giờ 22 phút
Pull request đã merge (30 ngày)
126

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của purefunctor/purescript-iris

Tất cả issue của purefunctor/purescript-iris

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.