{-# LANGUAGE DeriveAnyClass #-}

module Horizon.Spec.Types.HaskellSource (HaskellSource(FromGit, FromHackage, FromTarball, FromLocal)) where

import           Data.Kind                        (Type)
import           Dhall                            (FromDhall, Generic, ToDhall)
import           Horizon.Spec.Types.GitSource     (GitSource)
import           Horizon.Spec.Types.HackageSource (HackageSource)
import           Horizon.Spec.Types.LocalSource   (LocalSource)
import           Horizon.Spec.Types.TarballSource (TarballSource)

type HaskellSource :: Type
data HaskellSource where
  FromGit :: GitSource -> HaskellSource
  FromHackage :: HackageSource -> HaskellSource
  FromLocal :: LocalSource -> HaskellSource
  FromTarball :: TarballSource -> HaskellSource
  deriving stock (Int -> HaskellSource -> ShowS
[HaskellSource] -> ShowS
HaskellSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HaskellSource] -> ShowS
$cshowList :: [HaskellSource] -> ShowS
show :: HaskellSource -> String
$cshow :: HaskellSource -> String
showsPrec :: Int -> HaskellSource -> ShowS
$cshowsPrec :: Int -> HaskellSource -> ShowS
Show, HaskellSource -> HaskellSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HaskellSource -> HaskellSource -> Bool
$c/= :: HaskellSource -> HaskellSource -> Bool
== :: HaskellSource -> HaskellSource -> Bool
$c== :: HaskellSource -> HaskellSource -> Bool
Eq, forall x. Rep HaskellSource x -> HaskellSource
forall x. HaskellSource -> Rep HaskellSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HaskellSource x -> HaskellSource
$cfrom :: forall x. HaskellSource -> Rep HaskellSource x
Generic)
  deriving anyclass (InputNormalizer -> Decoder HaskellSource
forall a. (InputNormalizer -> Decoder a) -> FromDhall a
autoWith :: InputNormalizer -> Decoder HaskellSource
$cautoWith :: InputNormalizer -> Decoder HaskellSource
FromDhall, InputNormalizer -> Encoder HaskellSource
forall a. (InputNormalizer -> Encoder a) -> ToDhall a
injectWith :: InputNormalizer -> Encoder HaskellSource
$cinjectWith :: InputNormalizer -> Encoder HaskellSource
ToDhall)