fourmolu-0.9.0.0: A formatter for Haskell source code
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ormolu.Parser.Pragma

Description

A module for parsing of pragmas from comments.

Synopsis

Documentation

data Pragma Source #

Ormolu's representation of pragmas.

Constructors

PragmaLanguage [String]

Language pragma

PragmaOptionsGHC String

GHC options pragma

PragmaOptionsHaddock String

Haddock options pragma

Instances

Instances details
Show Pragma Source # 
Instance details

Defined in Ormolu.Parser.Pragma

Eq Pragma Source # 
Instance details

Defined in Ormolu.Parser.Pragma

Methods

(==) :: Pragma -> Pragma -> Bool #

(/=) :: Pragma -> Pragma -> Bool #

parsePragma Source #

Arguments

:: String

Comment to try to parse

-> Maybe Pragma 

Extract a pragma from a comment if possible, or return Nothing otherwise.