BNFC3-3.0: A compiler front-end generator.
Safe HaskellNone
LanguageHaskell2010

BNFC.Backend.Agda.Utilities.ReservedWords

Synopsis

Documentation

agdaReservedWords :: [String] Source #

A list of Agda keywords that would clash with generated names.

agdaLower :: String1 -> String1 Source #

Turn identifier to non-capital identifier. Needed, since in Agda a constructor cannot overload a data type with the same name.

>>> map agdaLower ["SFun","foo","ABC","HelloWorld","module","Type_int","C1"]
["sFun","foo","aBC","helloWorld","module'","type-int","c1"]

avoidAgdaReservedWords :: String1 -> String1 Source #

Avoid Agda reserved words.

avoidResWordsASTRulesAgda :: [(Type, [(Label, [Type])])] -> [(Type, [(Label, [Type])])] Source #

Apply agdaLower function to AST rhs types.