about logical computation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

about logical computation

z_axis
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.

Sincerely!
--------------
z_axis
2008-09-29


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
e^(π.i) + 1 = 0
Reply | Threaded
Open this post in threaded view
|

Re: about logical computation

Bulat Ziganshin-2
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:[hidden email]

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: about logical computation

Sean Leather

> 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:

Perhaps you might like a *bit* more documentation than that:

http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Bits.html

Sean

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe