{-# LANGUAGE DeriveAnyClass #-}
module Horizon.Spec.Types.HackageSource (HackageSource(MkHackageSource), name, version) where

import           Data.Kind                  (Type)
import           Dhall                      (FromDhall, Generic, ToDhall)
import           Horizon.Spec.Types.Name    (Name)
import           Horizon.Spec.Types.Version (Version)

type HackageSource :: Type
data HackageSource where
  MkHackageSource :: { HackageSource -> Name
name :: Name, HackageSource -> Version
version :: Version } -> HackageSource
  deriving stock (HackageSource -> HackageSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HackageSource -> HackageSource -> Bool
$c/= :: HackageSource -> HackageSource -> Bool
== :: HackageSource -> HackageSource -> Bool
$c== :: HackageSource -> HackageSource -> Bool
Eq, Int -> HackageSource -> ShowS
[HackageSource] -> ShowS
HackageSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HackageSource] -> ShowS
$cshowList :: [HackageSource] -> ShowS
show :: HackageSource -> String
$cshow :: HackageSource -> String
showsPrec :: Int -> HackageSource -> ShowS
$cshowsPrec :: Int -> HackageSource -> ShowS
Show, forall x. Rep HackageSource x -> HackageSource
forall x. HackageSource -> Rep HackageSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HackageSource x -> HackageSource
$cfrom :: forall x. HackageSource -> Rep HackageSource x
Generic)
  deriving anyclass (InputNormalizer -> Decoder HackageSource
forall a. (InputNormalizer -> Decoder a) -> FromDhall a
autoWith :: InputNormalizer -> Decoder HackageSource
$cautoWith :: InputNormalizer -> Decoder HackageSource
FromDhall, InputNormalizer -> Encoder HackageSource
forall a. (InputNormalizer -> Encoder a) -> ToDhall a
injectWith :: InputNormalizer -> Encoder HackageSource
$cinjectWith :: InputNormalizer -> Encoder HackageSource
ToDhall)