Lex a string into a list of Haskell 2010 source tokens.
Modulehaskell-src-exts-1.24.0Haskell98
Language.Haskell.Exts
An umbrella module for the various functionality of the package. Also provides some convenient functionality for dealing directly with source files.
Contents
Synopsis
- value lexTokenStream
- value lexTokenStreamWithMode
- data Token
- value parseFile
- value parseFileWithMode
- value parseFileWithExts
- value parseFileWithComments
- value parseFileWithCommentsAndPragmas
- value parseFileContents
- value parseFileContentsWithMode
- value parseFileContentsWithExts
- value parseFileContentsWithComments
- value readExtensions
- Packagehaskell-src-exts-1.24.0
- Exports13
- LanguageHaskell98
- LicenceBSD-3-Clause
- SourceExts.hs
Re-exported modules
module Language.Haskell.Exts.Syntax
module Language.Haskell.Exts.Build
Lex a string into a list of Haskell source tokens, using an explicit mode.
Constructors
VarId StringLabelVarId StringQVarId (String, String)IDupVarId StringILinVarId StringConId StringQConId (String, String)DVarId [String]VarSym StringConSym StringQVarSym (String, String)QConSym (String, String)IntTok (Integer, String)FloatTok (Rational, String)Character (Char, String)StringTok (String, String)IntTokHash (Integer, String)WordTokHash (Integer, String)FloatTokHash (Rational, String)DoubleTokHash (Rational, String)CharacterHash (Char, String)StringHash (String, String)LeftParenRightParenLeftHashParenRightHashParenSemiColonLeftCurlyRightCurlyVRightCurlyLeftSquareRightSquareParArrayLeftSquareParArrayRightSquareCommaUnderscoreBackQuoteDotDotDotColonQuoteColonDoubleColonEqualsBackslashBarLeftArrowRightArrowAtTAppTildeDoubleArrowMinusExclamationStarLeftArrowTailRightArrowTailLeftDblArrowTailRightDblArrowTailOpenArrowBracketCloseArrowBracketTHExpQuote)
THTExpQuoteTHPatQuoteTHDecQuoteTHTypQuoteTHCloseQuoteTHTCloseQuote]
THIdEscape String|]
THParenEscapeTHTIdEscape StringTHTParenEscapeTHVarQuoteTHTyQuoteTHQuasiQuote (String, String)RPGuardOpenRPGuardCloseRPCAt)
XCodeTagOpenXCodeTagCloseXStdTagOpenXStdTagCloseXCloseTagOpenXEmptyTagCloseXChildTagOpenXPCDATA StringXRPatOpenXRPatClosePragmaEndRULESINLINE BoolINLINE_CONLIKESPECIALISESPECIALISE_INLINE BoolSOURCEDEPRECATEDWARNINGSCCGENERATEDCOREUNPACKNOUNPACKOPTIONS (Maybe String, String)LANGUAGEANNMINIMALNO_OVERLAPOVERLAPOVERLAPPINGOVERLAPPABLEOVERLAPSINCOHERENTCOMPLETEKW_AsKW_ByKW_CaseKW_ClassKW_DataKW_DefaultKW_DerivingKW_DoKW_MDoKW_ElseKW_FamilyKW_ForallKW_GroupKW_HidingKW_IfKW_ImportKW_InKW_InfixKW_InfixLKW_InfixRKW_InstanceKW_LetKW_ModuleKW_NewTypeKW_OfKW_ProcKW_RecKW_RoleKW_ThenKW_TypeKW_UsingKW_WhereKW_QualifiedKW_PatternKW_StockKW_AnyclassKW_ViaKW_ForeignKW_ExportKW_SafeKW_UnsafeKW_ThreadsafeKW_InterruptibleKW_StdCallKW_CCallKW_CPlusPlusKW_DotNetKW_JvmKW_JsKW_JavaScriptKW_CApiEOF
module Language.Haskell.Exts.Pretty
module Language.Haskell.Exts.Fixity
module Language.Haskell.Exts.SrcLoc
module Language.Haskell.Exts.Parser
Parsing of Haskell source files
Parse a source file on disk, using the default parse mode.
Parse a source file on disk, supplying a custom parse mode.
Parse a source file on disk, with an extra set of extensions to know about on top of what the file itself declares.
Parse a source file on disk, supplying a custom parse mode, and retaining comments as well as unknown pragmas.
Parse a source file from a string using the default parse mode.
Parse a source file from a string using a custom parse mode.
Parse a source file from a string, with an extra set of extensions to know about on top of what the file itself declares.
Read extensions declared in LANGUAGE pragmas
Gather the extensions declared in LANGUAGE pragmas at the top of the file. Returns Nothing if the parse of the pragmas fails.