[GHC] #1005: Add Logical Shift Operators

GHC trac at galois.com
Thu Nov 16 07:40:08 EST 2006


#1005: Add Logical Shift Operators
----------------------------+-----------------------------------------------
 Reporter:  rob at mits.coop   |          Owner:         
     Type:  proposal        |         Status:  new    
 Priority:  normal          |      Milestone:         
Component:  libraries/base  |        Version:  6.6    
 Severity:  normal          |     Resolution:         
 Keywords:                  |     Difficulty:  Unknown
 Testcase:                  |   Architecture:  Unknown
       Os:  Unknown         |  
----------------------------+-----------------------------------------------
Comment (by malcolm.wallace at cs.york.ac.uk):

 Thanks for the pointer to a description of logical vs arithmetic shift.
 However, this does flag up an assumption in the proposal - namely that the
 current specification requires arithmetic shifting.  As far as I can tell,
 nothing in the interface documentation for Data.Bits says that the
 operations should be arithmetic, and indeed I couldn't guarantee that we
 do not _already_ have logical shifts in either Hugs or nhc98.  It might be
 that it is the arithmetic variants that are missing.

 Having said that, I do think it is good to propose that the specification
 should be more precise.  And it would indeed be good to have separate
 functions for the separate styles of operation.  (But implementing them
 efficiently might conceivably require some architecture-specific
 configuration.)

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


More information about the Glasgow-haskell-bugs mailing list