
#13908: sameMutableArray equivalent for Array -------------------------------------+------------------------------------- Reporter: winter | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3697 Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I'm really not sure about this. Mutable arrays have ''identity'' so it makes sense to ask if they are "the same". Immutable arrays do not. Are the two lists `[2,3]` and `[2,3]` "the same"? Would it make a difference if you let-bound it `let x = [2,3] in sameList x x`? We have `unsafePtrEq` and `reallyUnsafePtrEq`. Maybe use them instead? The danger is that legitimate compiler optimisations might change behaviour. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13908#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler