{-# LANGUAGE OverloadedStrings #-}

module Plugin.GhcTags.CTag where

import qualified Data.Text as Text
import Data.Version

import Paths_ghc_tags_plugin

import           GhcTags.CTag.Header


headers :: [Header]
headers :: [Header]
headers =
    [ HeaderType Int -> Maybe Text -> Int -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Int
FileFormat     Maybe Text
forall a. Maybe a
Nothing Int
2 Text
""
    , HeaderType Int -> Maybe Text -> Int -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Int
FileSorted     Maybe Text
forall a. Maybe a
Nothing Int
1 Text
""
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
FileEncoding   Maybe Text
forall a. Maybe a
Nothing Text
"utf-8" Text
""
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
ProgramAuthor  Maybe Text
forall a. Maybe a
Nothing Text
"Marcin Szamotulski" Text
""
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
ProgramName    Maybe Text
forall a. Maybe a
Nothing Text
"ghc-tags-plugin" Text
""
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
ProgramUrl     Maybe Text
forall a. Maybe a
Nothing Text
"https://hackage.haskell.org/package/ghc-tags-plugin" Text
""
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
ProgramVersion Maybe Text
forall a. Maybe a
Nothing (String -> Text
Text.pack (String -> Text) -> String -> Text
forall a b. (a -> b) -> a -> b
$ Version -> String
showVersion Version
version) Text
""

    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
FieldDescription Maybe Text
haskellLang Text
"type" Text
"type of expression"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
FieldDescription Maybe Text
haskellLang Text
"ffi"  Text
"foreign object name"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
FieldDescription Maybe Text
haskellLang Text
"file" Text
"not exported term"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
FieldDescription Maybe Text
haskellLang Text
"instance" Text
"class, type or data type instance"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
FieldDescription Maybe Text
haskellLang Text
"Kind" Text
"kind of a type"

    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"M" Text
"module name"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"`" Text
"module top level term, but not a function"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"λ" Text
"module top level function term"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"Λ" Text
"type constructor"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"c" Text
"data constructor"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"g" Text
"gadt constructor"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"r" Text
"record field"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"≡" Text
"type synonym"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"~" Text
"type signature"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"p" Text
"pattern synonym"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"C" Text
"type class"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"m" Text
"type class member"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"i" Text
"type class instance"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"x" Text
"type class instance member"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"F" Text
"type family"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"f" Text
"type family instance"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"D" Text
"data type family"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"d" Text
"data type family instance"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"I" Text
"foreign import"
    , HeaderType Text -> Maybe Text -> Text -> Text -> Header
forall ty.
(NFData ty, Show ty) =>
HeaderType ty -> Maybe Text -> ty -> Text -> Header
Header HeaderType Text
KindDescription Maybe Text
haskellLang Text
"E" Text
"foreign export"
    ]
  where
    haskellLang :: Maybe Text
haskellLang = Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"Haskell"