Iris rejects Extend function instance with invalid kind
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Rust
- Stars
- 117
- Forks
- 11
- Avg merge
- 4h 22m
- Merged PRs (30d)
- 126
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from purefunctor/purescript-iris
-
bug language-server
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
purefunctor/purescript-iris#552 ·
Maintainers usually reply within 1 day
-
bug language-server
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
purefunctor/purescript-iris#551 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
purefunctor/purescript-iris#613 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
purefunctor/purescript-iris#610 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
purefunctor/purescript-iris#560 ·
Maintainers usually reply within 1 day
All issues in purefunctor/purescript-iris
Similar issues
-
type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
stackabletech/kafka-operator#1033 · 1 comment ·
Maintainers usually reply within 1 day
-
bug good first issue needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
farion1231/cc-switch#7744 · 1 comment ·
Maintainers usually reply within 1 day
-
datafusion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apache/iceberg-rust#3297 ·
Maintainers usually reply within 1 day