
Hi David,
You're right, I keep forgetting to look at the source code.
And I wasn't aware of the info (:i) command. Should come in handy in the future.
Michael
--- On Mon, 9/6/10, David Menendez
A "concrete" library?
I'm playing around with Data.Bits. It has .&. and .|. which I assume are functions (rather than operators) because I don't see and infix statement for them. Correct?
.|. and .&. are operators because they are made from symbol
characters. Operators default to infixl 9 unless specified otherwise,
so no infix declaration is needed.
However, Data.Bits does have infix declarations for .&. and .|. :
infixl 8 `shift`, `rotate`, `shiftL`, `shiftR`, `rotateL`, `rotateR`
infixl 7 .&.
infixl 6 `xor`
infixl 5 .|.
If you want to check the fixity of an operator, use :info in GHCi.
Prelude Data.Bits> :i .|.
class (Num a) => Bits a where
...
(.|.) :: a -> a -> a
...
-- Defined in Data.Bits
infixl 5 .|.
--
Dave Menendez