#2806: Require bang-patterns for unlifted bindings
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:                  
        Type:  feature request   |       Status:  new             
    Priority:  normal            |    Milestone:  6.12.1          
   Component:  Compiler          |      Version:  6.8.3           
    Severity:  normal            |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Comment (by guest):

 My more disruptive wish involved:
 {{{
 type I = Int#  --or I = Int. Defined in some other module.

 f :: I -> I -> I
 f a b = a  -- "f !a !b = a" could be required if I = Int#

 g :: ... -> I
 g ... = f (some_complex_computation_1) (some_complex_computation_2)
 }}}

 I'm unhappy that GHC has the feature for an unlifted type to change the
 strictness/space-complexity of unsuspecting functions: a change that
 lifted and non-built-in types cannot ever bring about even if you wished
 them to.  I noticed this when looking at GHC's "FastInt" code that
 abstracts away from `Int#` slightly (I think it abstracts for
 historical/potential portability.  Admittedly, I think GHC is also the
 only compiler that supports bang-patterns, currently?)

 I guess there is also the intermediate (and annoying) option of a warning-
 flag rather than errors or nothing :-)

 -Isaac Dupree

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2806#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to