diff --git a/hbs2-core/hbs2-core.cabal b/hbs2-core/hbs2-core.cabal index 7e141919..9b6f6b7b 100644 --- a/hbs2-core/hbs2-core.cabal +++ b/hbs2-core/hbs2-core.cabal @@ -64,6 +64,7 @@ library exposed-modules: , HBS2.Defaults + , HBS2.Data.Types , HBS2.Hash , HBS2.Merkle , HBS2.Clock diff --git a/hbs2-core/lib/HBS2/Data/Types.hs b/hbs2-core/lib/HBS2/Data/Types.hs new file mode 100644 index 00000000..36be9eb1 --- /dev/null +++ b/hbs2-core/lib/HBS2/Data/Types.hs @@ -0,0 +1,20 @@ +module HBS2.Data.Types + ( module HBS2.Hash + , module HBS2.Data.Types + ) + where + +import HBS2.Hash + +import Codec.Serialise() +import Data.Data +import Data.String(IsString) +import GHC.Generics +import Prettyprinter + +newtype HashRef = HashRef (Hash HbSync) + deriving newtype (Eq,Ord,IsString,Pretty) + deriving stock (Data,Generic) + +instance Serialise HashRef + diff --git a/hbs2/Main.hs b/hbs2/Main.hs index b8890e2c..9e7c0a00 100644 --- a/hbs2/Main.hs +++ b/hbs2/Main.hs @@ -23,14 +23,9 @@ import HBS2.Storage.Simple import HBS2.Prelude import HBS2.Prelude.Plated import HBS2.Merkle -import HBS2.Hash +import HBS2.Data.Types import HBS2.Defaults -newtype HashRef = HashRef (Hash HbSync) - deriving newtype (Eq,Ord,IsString,Pretty) - deriving stock (Data,Generic) - -instance Serialise HashRef newtype OptInputFile = OptInputFile { unOptFile :: FilePath } deriving newtype (Eq,Ord,IsString)