Compatibility: unary negation of 0.0 loses negative zero versus purs
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, rust
- Área
- compilers, documentation, testing-qa
Línea de trabajo
Start by reviewing PR #474 and the reported unary-negation lowering and constant-folding behavior. Run the standalone Spago reproducer to compare signed-zero results between purs and Iris. Done means documenting the chosen compatibility contract and adding the small regression test if deliberate divergence is retained.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
This is a documented runtime divergence, not yet a compiler-bug claim. With purs 0.15.15, Iris 0.1.1, Node 22.16.0 and registry set 81.1.0, a valid Number expression involving (-0.0) differs after unary negation is lowered. The signed-zero choice appears intentional in merged PR #474, which emits 0 - value and folds the negative-zero literal to positive zero. This issue asks that the compatibility contract be decided/documented, rather than presupposing the implementation must be changed.
Standalone observation (a fresh Spago package with prelude, effect, console, and argonaut-core dependencies; workspace.packageSet.registry: 81.1.0):
module Main where
import Prelude
import Data.Argonaut.Core as J
import Effect (Effect)
import Effect.Console (log)
main :: Effect Unit
main = log (show (map (1.0 / _) (J.toNumber (J.fromNumber (-0.0)))))
Purs prints (Just -Infinity); Iris 0.1.1 prints (Just Infinity). This is not JSON serialization: JSON.stringify(-0) is "0" on either side. In the generated caller, purs passes -0.0 to fromNumber, whereas Iris passes 0; both package paths use the same identity fromNumber FFI. The reciprocal merely exposes the zero sign observably.
The outcome may be an intentional interpretation of PureScript numeric negation rather than an Iris defect. What observable signed-zero behavior should Iris promise relative to purs for unary negation and constant folding? If deliberate divergence is supported, documenting it with a small regression test would let downstream users reason about it. No private repository link or fixture is required for the reproducer.
- Lenguaje dominante
- Rust
- Estrellas
- 117
- Forks
- 11
- Merge medio
- 4 h 22 min
- PR fusionados (30 d)
- 126
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de purefunctor/purescript-iris
-
bug language-server
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
purefunctor/purescript-iris#552 ·
Los mantenedores suelen responder en 1 día
-
bug language-server
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
purefunctor/purescript-iris#551 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
purefunctor/purescript-iris#613 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 58/100
purefunctor/purescript-iris#610 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
purefunctor/purescript-iris#560 ·
Los mantenedores suelen responder en 1 día
Todos los issues de purefunctor/purescript-iris
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
area: cli bug priority: P2 ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día