fourmolu-0.1.0.0: A formatter for Haskell source code
Safe HaskellNone
LanguageHaskell2010

Ormolu.Processing.Preprocess

Description

Preprocessing for input source code.

Synopsis

Documentation

preprocess Source #

Arguments

:: FilePath

File name, just to use in the spans

-> String

Input to process

-> RegionDeltas

Region deltas

-> (String, String, String, [Located String])

Literal prefix, pre-processed input, literal suffix, extra comments

Transform given input possibly returning comments extracted from it. This handles LINE pragmas, CPP, shebangs, and the magic comments for enabling/disabling of Ormolu.