module Inferno.VersionControl.Log where import Inferno.VersionControl.Operations.Error (VCStoreError, vcStoreErrorToString) data VCServerTrace = ThrownVCStoreError VCStoreError | WriteJSON FilePath | WriteTxt FilePath | AlreadyExistsJSON FilePath | ReadJSON FilePath | ReadTxt FilePath | DeleteFile FilePath vcServerTraceToString :: VCServerTrace -> String vcServerTraceToString :: VCServerTrace -> String vcServerTraceToString = \case WriteJSON String fp -> String "Writing JSON at: " forall a. Semigroup a => a -> a -> a <> String fp WriteTxt String fp -> String "Writing TXT at: " forall a. Semigroup a => a -> a -> a <> String fp AlreadyExistsJSON String fp -> String "JSON already exists at: " forall a. Semigroup a => a -> a -> a <> String fp ReadJSON String fp -> String "Reading JSON at: " forall a. Semigroup a => a -> a -> a <> String fp ReadTxt String fp -> String "Reading TXT at: " forall a. Semigroup a => a -> a -> a <> String fp ThrownVCStoreError VCStoreError e -> VCStoreError -> String vcStoreErrorToString VCStoreError e DeleteFile String fp -> String "Deleting file: " forall a. Semigroup a => a -> a -> a <> String fp