diff options
Diffstat (limited to 'src/Data/InOrOut.hs')
-rw-r--r-- | src/Data/InOrOut.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Data/InOrOut.hs b/src/Data/InOrOut.hs new file mode 100644 index 00000000..2c14a0f9 --- /dev/null +++ b/src/Data/InOrOut.hs | |||
@@ -0,0 +1,13 @@ | |||
1 | module Data.InOrOut where | ||
2 | |||
3 | |||
4 | -- | This wrapper is useful for tagging another type | ||
5 | -- as being of either an In variety or an Out variety. | ||
6 | -- | ||
7 | -- For example, incoming messages can be tagged as In | ||
8 | -- and outgoing messages could be tagged as Out. | ||
9 | -- | ||
10 | -- Another use case is tagging handles so that | ||
11 | -- you only output to Out Handle and only input | ||
12 | -- from In Handle. | ||
13 | data InOrOut a = In a | Out a | ||