on master help sign in
Add show instance to strict data structures
54acd41Harendra Kumar
src/Streamly/Internal/Data/Strict.hs+5−5
@@ -32,16 +32,16 @@ where
32-- Tuples
32-- Tuples
33-------------------------------------------------------------------------------
33-------------------------------------------------------------------------------
34--
34--
35−data Tuple' a b = Tuple' !a !b
35+data Tuple' a b = Tuple' !a !b deriving Show
36−data Tuple3' a b c = Tuple3' !a !b !c
36+data Tuple3' a b c = Tuple3' !a !b !c deriving Show
37−data Tuple4' a b c d = Tuple4' !a !b !c !d
37+data Tuple4' a b c d = Tuple4' !a !b !c !d deriving Show
38
38
39-------------------------------------------------------------------------------
39-------------------------------------------------------------------------------
40-- Maybe
40-- Maybe
41-------------------------------------------------------------------------------
41-------------------------------------------------------------------------------
42--
42--
43-- | A strict 'Maybe'
43-- | A strict 'Maybe'
44−data Maybe' a = Just' !a | Nothing'
44+data Maybe' a = Just' !a | Nothing' deriving Show
45
45
46-- XXX perhaps we can use a type class having fromStrict/toStrict operations.
46-- XXX perhaps we can use a type class having fromStrict/toStrict operations.
47--
47--
@@ -56,4 +56,4 @@ fromStrictMaybe (Just' a) = return $ Just a
56-------------------------------------------------------------------------------
56-------------------------------------------------------------------------------
57--
57--
58-- | A strict 'Either'
58-- | A strict 'Either'
59−data Either' a b = Left' !a | Right' !b
59+data Either' a b = Left' !a | Right' !b deriving Show