summaryrefslogtreecommitdiff
path: root/src/Data/InOrOut.hs
blob: 2c14a0f9057ce5fd5d65914825e56069372f2e6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Data.InOrOut where


-- | This wrapper is useful for tagging another type
--   as being of either an In variety or an Out variety.
--
--   For example, incoming messages can be tagged as In
--   and outgoing messages could be tagged as Out.
--
--   Another use case is tagging handles so that
--   you only output to Out Handle and only input
--   from In Handle.
data InOrOut a = In a | Out a