diff options
author | Joe Crayne <joe@jerkface.net> | 2018-09-21 18:13:12 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2018-09-21 18:18:58 -0400 |
commit | 92957a792a87dbc4d2b8120aaf57bf983c4796e2 (patch) | |
tree | b6db171250edd3e5407ec94908ab3714b2128977 /src/Data | |
parent | adf62395931f4b90491cc1338b9a5105da98fbbe (diff) |
XEd25519 signature algorithm.
Diffstat (limited to 'src/Data')
-rw-r--r-- | src/Data/Sized.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Data/Sized.hs b/src/Data/Sized.hs new file mode 100644 index 00000000..0d3d5845 --- /dev/null +++ b/src/Data/Sized.hs | |||
@@ -0,0 +1,14 @@ | |||
1 | module Data.Sized where | ||
2 | |||
3 | import Data.Typeable | ||
4 | |||
5 | |||
6 | -- | Info about a type's serialized length. Either the length is known | ||
7 | -- independently of the value, or the length depends on the value. | ||
8 | data Size a | ||
9 | = VarSize (a -> Int) | ||
10 | | ConstSize !Int | ||
11 | deriving Typeable | ||
12 | |||
13 | class Sized a where size :: Size a | ||
14 | |||