21 lines
557 B
Haskell
21 lines
557 B
Haskell
{-# LANGUAGE DerivingVia #-}
|
|
{-# LANGUAGE DeriveGeneric #-}
|
|
{-# LANGUAGE DataKinds #-}
|
|
{-# LANGUAGE TypeOperators #-}
|
|
{-# LANGUAGE StrictData #-}
|
|
module Config.Watcher where
|
|
|
|
import Dhall.Deriving
|
|
import Dhall
|
|
|
|
newtype Seconds = Seconds { seconds :: Natural }
|
|
deriving (Show, Generic, Eq)
|
|
deriving (FromDhall, ToDhall) via Codec (SetSingletonConstructors Bare) Seconds
|
|
|
|
data ConfigWatcher = ConfigWatcher
|
|
{ directories :: [FilePath]
|
|
, period :: Seconds
|
|
}
|
|
deriving (Show, Generic, Eq)
|
|
deriving (FromDhall, ToDhall) via Codec AsIs ConfigWatcher
|