ormolu-0.1.2.0: A formatter for Haskell source code

Safe Haskell | None
Language | Haskell2010

Ormolu.Processing.Preprocess

Description

Preprocessing for input source code.

Synopsis

- preprocess :: FilePath -> String -> RegionDeltas -> (String, String, String, [Located String])

# 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.