{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE StrictData        #-}

{-|
Module      : Headroom.FileSupport.Types
Description : Data types for "Headroom.FileSupport"
Copyright   : (c) 2019-2020 Vaclav Svejcar
License     : BSD-3-Clause
Maintainer  : vaclav.svejcar@gmail.com
Stability   : experimental
Portability : POSIX

This module contains data types for "Headroom.FileSupport" module.
-}

module Headroom.FileSupport.Types
  ( -- * Data Types
    FileInfo(..)
  )
where

import           Headroom.Configuration.Types   ( CtHeaderConfig )
import           Headroom.FileType.Types        ( FileType )
import           Headroom.Variables.Types       ( Variables )
import           RIO


-- | Info extracted about the concrete source code file.
data FileInfo = FileInfo
  { FileInfo -> FileType
fiFileType     :: FileType
  -- ^ type of the file
  , FileInfo -> CtHeaderConfig
fiHeaderConfig :: CtHeaderConfig
  -- ^ configuration for license header
  , FileInfo -> Maybe (Int, Int)
fiHeaderPos    :: Maybe (Int, Int)
  -- ^ position of existing license header
  , FileInfo -> Variables
fiVariables    :: Variables
  -- ^ additional extracted variables
  }
  deriving (FileInfo -> FileInfo -> Bool
(FileInfo -> FileInfo -> Bool)
-> (FileInfo -> FileInfo -> Bool) -> Eq FileInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileInfo -> FileInfo -> Bool
$c/= :: FileInfo -> FileInfo -> Bool
== :: FileInfo -> FileInfo -> Bool
$c== :: FileInfo -> FileInfo -> Bool
Eq, Int -> FileInfo -> ShowS
[FileInfo] -> ShowS
FileInfo -> String
(Int -> FileInfo -> ShowS)
-> (FileInfo -> String) -> ([FileInfo] -> ShowS) -> Show FileInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileInfo] -> ShowS
$cshowList :: [FileInfo] -> ShowS
show :: FileInfo -> String
$cshow :: FileInfo -> String
showsPrec :: Int -> FileInfo -> ShowS
$cshowsPrec :: Int -> FileInfo -> ShowS
Show)