Skip to content

Commit 49d9200

Browse files
author
Mike Solomon
committed
Adds bitwise for int and uint
1 parent 56125d4 commit 49d9200

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Web/GPU/Internal/Bitwise.purs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
module Web.GPU.Internal.Bitwise (class Bitwise, or, (.|.)) where
22

3+
import Data.Int.Bits as IntBits
4+
import Data.UInt (UInt)
5+
import Data.UInt as UIntBits
6+
37
class Bitwise a where
48
or :: a -> a -> a
59

10+
instance Bitwise Int where
11+
or = IntBits.or
12+
13+
instance Bitwise UInt where
14+
or = UIntBits.or
15+
616
infixl 10 or as .|.

0 commit comments

Comments
 (0)