lingo-0.5.0.3: File extension based programming language detection
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Languages

Description

Primary interface for looking up the programming language of a file or interacting with languages known to linguist (https:/github.comgithub/linguist).

Synopsis

Documentation

languagesForPath :: FilePath -> [Language] Source #

Find the set of possible languages for a given file path.

Multiple results will be returned for ambiguous files; for example, .md files can be Markdown or GCC machine descriptions, and .php files can be PHP or Hack source files.

languages :: Map LanguageKey Language Source #

Complete map of programming languages known to linguist.

languagesByExtension :: Map Text [LanguageKey] Source #

Map of languages by file extension.

languagesByFileName :: Map Text [LanguageKey] Source #

Map of languages by filename.

type LanguageKey = Text Source #

Type synonym for linguist's language name key.

data Language Source #

Identifies a programming language.

Constructors

Language 

Fields

Instances

Instances details
Show Language Source # 
Instance details

Defined in Gen_Languages

Methods

showsPrec :: Int -> Language -> ShowS

show :: Language -> String

showList :: [Language] -> ShowS

Eq Language Source # 
Instance details

Defined in Gen_Languages

Methods

(==) :: Language -> Language -> Bool

(/=) :: Language -> Language -> Bool