Commit 58717f1a authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Rebox instance for EitherS

parent 2195f269
......@@ -70,6 +70,15 @@ instance (Rebox a, Rebox b) => Rebox (a :*: b) where
{-# INLINE [0] dseq #-}
dseq (x :*: y) z = dseq x (dseq y z)
instance (Rebox a, Rebox b) => Rebox (EitherS a b) where
{-# INLINE [0] rebox #-}
rebox (LeftS x) = LeftS (rebox x)
rebox (RightS y) = RightS (rebox y)
{-# INLINE [0] dseq #-}
dseq (LeftS x) z = dseq x z
dseq (RightS y) z = dseq y z
instance Rebox a => Rebox (MaybeS a) where
{-# INLINE [0] rebox #-}
rebox NothingS = NothingS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment