module Horizon.Spec.Types.Version (Version(MkVersion), fromVersion) where

import           Data.Kind   (Type)
import           Data.String (IsString)
import           Data.Text   (Text)
import           Dhall       (FromDhall, ToDhall)

type Version :: Type
newtype Version = MkVersion { Version -> Text
fromVersion :: Text }
  deriving stock (Version -> Version -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Version -> Version -> Bool
$c/= :: Version -> Version -> Bool
== :: Version -> Version -> Bool
$c== :: Version -> Version -> Bool
Eq, Int -> Version -> ShowS
[Version] -> ShowS
Version -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Version] -> ShowS
$cshowList :: [Version] -> ShowS
show :: Version -> String
$cshow :: Version -> String
showsPrec :: Int -> Version -> ShowS
$cshowsPrec :: Int -> Version -> ShowS
Show)
  deriving newtype (InputNormalizer -> Decoder Version
forall a. (InputNormalizer -> Decoder a) -> FromDhall a
autoWith :: InputNormalizer -> Decoder Version
$cautoWith :: InputNormalizer -> Decoder Version
FromDhall, InputNormalizer -> Encoder Version
forall a. (InputNormalizer -> Encoder a) -> ToDhall a
injectWith :: InputNormalizer -> Encoder Version
$cinjectWith :: InputNormalizer -> Encoder Version
ToDhall, String -> Version
forall a. (String -> a) -> IsString a
fromString :: String -> Version
$cfromString :: String -> Version
IsString)