headroom-0.4.0.0: License Header Manager
Copyright(c) 2019-2021 Vaclav Svejcar
LicenseBSD-3-Clause
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.FileSupport.Types

Description

Data types for Headroom.FileSupport module in separated module (to avoid cyclic dependencies).

Synopsis

Data Types

data FileSupport Source #

Set of functions that every file support needs to implement.

data SyntaxAnalysis Source #

Set of functions used to analyze source code.

Constructors

SyntaxAnalysis 

Smart Constructors

defaultFileSupport Source #

Arguments

:: FileType

type of the source code file

-> SyntaxAnalysis

function that analyzes source code

-> FileSupport

resulting FileSupport

Default implementation of FileSupport that doesn't extract any variables or template data.

Function Type Aliases

type ExtractTemplateDataFn Source #

Arguments

 = forall a. Template a 
=> a

template to use for extraction

-> HeaderSyntax

copyright header syntax

-> TemplateData

extracted template data

Type of a function that extracts additional template data from template.

type ExtractVariablesFn Source #

Arguments

 = HeaderTemplate

header template

-> Maybe (Int, Int)

header position as (startLine, endLine)

-> SourceCode

analyzed source code file

-> Variables

extracted variables

Type of a function that extracts variables from analyzed source code file.