[Haskell-cafe] about logical computation

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Sep 29 03:33:03 EDT 2008


Hello z_axis,

Monday, September 29, 2008, 11:22:22 AM, you wrote:

> hi, friends
> I am a Haskell newbie however i like it very much. After starting
> learn haskell, i donot find the corresponding "&", "|" , "~", "<<",
> ">>" logical computation of C language.

import Data.Bits

just its exports:

module Data.Bits (
  Bits(
    (.&.), (.|.), xor, -- :: a -> a -> a
    complement,        -- :: a -> a
    shift,             -- :: a -> Int -> a
    rotate,            -- :: a -> Int -> a
    bit,               -- :: Int -> a
    setBit,            -- :: a -> Int -> a
    clearBit,          -- :: a -> Int -> a
    complementBit,     -- :: a -> Int -> a
    testBit,           -- :: a -> Int -> Bool
    bitSize,           -- :: a -> Int
    isSigned,          -- :: a -> Bool
    shiftL, shiftR,    -- :: a -> Int -> a
    rotateL, rotateR   -- :: a -> Int -> a
  )


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list