|
Core, Unit and Z0T: msg#00073lang.haskell.glasgow.bugs
Are Unit and Z0T considered equal? In GHC/Base.hcr they are both defined: ----- %data GHCziBase.Unit = {GHCziBase.Unit}; %data GHCziBase.Z0T = {GHCziBase.Z0T}; ----- In .../ghc/compiler/prelude/primops.txt at line 2669 we find: ----- primop FinalizeWeakOp "finalizeWeak#" GenPrimOp Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, (State# RealWorld -> (# State# RealWorld, Unit #)) #) with usage = { mangle FinalizeWeakOp [mkM, mkP] (mkR . (inUB FinalizeWeakOp [id,id,inFun FinalizeWeakOp mkR mkM])) } has_side_effects = True out_of_line = True ----- Here Unit is used but in .../GHC/Weak.hcr at line 57 when using GHCziPrim.finalizzeWeakzh it is tried to unify with Z0T: ----- GHCziWeak.finalizze :: %forall v . GHCziWeak.Weak v -> GHCziIOBase.IO GHCziBase.Z0T = \ @ v (ds::GHCziWeak.Weak v) (eta::GHCziPrim.Statezh GHCziPrim.RealWorld) -> %case ds %of (wild::GHCziWeak.Weak v) {GHCziWeak.Weak (w::GHCziPrim.Weakzh v) -> %case (GHCziPrim.finalizzeWeakzh @ v w eta) %of (wild1::GHCziPrim.Z3H (GHCziPrim.Statezh GHCziPrim.RealWorld) GHCziPrim.Intzh (GHCziPrim.Statezh GHCziPrim.RealWorld -> GHCziPrim.Z2H (GHCziPrim.Statezh GHCziPrim.RealWorld) GHCziBase.Z0T)) ----- I have looked around a bit and tried to see if there is any documentation that says that Unit and Z0T are the same but I didn't find any. Sincerely, Tobias
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | linker error, Andres Loeh |
|---|---|
| Next by Date: | RE: Core, shadowing type variable names, possible fix, Simon Peyton-Jones |
| Previous by Thread: | linker error, Andres Loeh |
| Next by Thread: | RE: Core, Unit and Z0T, Simon Peyton-Jones |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |