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

Headroom.FileType

Description

This application can generate source code headers from templates for various type of source code files. Such headers are usually represented as a top level comment, the application must render such header with correct syntax. The FileType represents such type of source code file, which is recognized by this application and for which the license headers can be manipulated.

Synopsis

Documentation

data FileType Source #

Represents supported type of source code file, where license headers may be added, replaced or removed.

Constructors

CSS

CSS source code file

Haskell

Haskell source code file

HTML

HTML source code file

Java

Java source code file

JS

JavaScript source code file

Scala

Scala source code file

fileTypeByExt Source #

Arguments

:: Text

file extension to search for

-> Maybe FileType

corresponding FileType (if found)

Returns FileType for given file extension (without dot).

>>> fileTypeByExt "hs"
Just Haskell

listExtensions Source #

Arguments

:: FileType

FileType to list extensions for

-> [Text]

list of found file extensions

Lists all recognized file extensions for given FileType.

>>> listExtensions Haskell
["hs"]

fileTypeByName Source #

Arguments

:: Text

textual representation of FileType

-> Maybe FileType

corresponding FileType (if found)

Reads FileType from its textual representation.

>>> fileTypeByName "haskell"
Just Haskell