[GHC] #7036: StableNames in presence of class constraints / monadic functions

GHC cvs-ghc at haskell.org
Fri Jun 29 18:52:44 CEST 2012


#7036: StableNames in presence of class constraints / monadic functions
---------------------------------+------------------------------------------
    Reporter:  ifigueroap        |       Owner:                  
        Type:  feature request   |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  GHC API           |     Version:  7.4.2           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by simonpj):

  * difficulty:  => Unknown


Comment:

 You are skating on incredibly thin ice.  Haskell in general, and GHC in
 particular, makes no claims about pointer equality.  Any program that
 relies on it is likely to be fragile. For example, you probably expect `f`
 to be pointer-equal to `f`. And perhaps to `head [f]`?  What about a
 partial application `(f 1)` and `(f 1)`?  What about `(f 1)` and `f
 (2-1)`?

 Rather than bend the language or compiler out of shape, I'd be inclined to
 look at the original goal, and see if it can be done some other way.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7036#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list