hie-bios-0.2.0: Set up a GHC API session

Safe HaskellSafe
LanguageHaskell2010

HIE.Bios.Types

Synopsis

Documentation

data BIOSVerbosity Source #

Constructors

Silent 
Verbose 

data CradleOpts Source #

Constructors

CradleOpts 

Fields

data OutputStyle Source #

Output style.

Constructors

LispStyle

S expression style.

PlainStyle

Plain textstyle.

newtype LineSeparator Source #

The type for line separator. Historically, a Null string is used.

Constructors

LineSeparator String 

data Options Source #

Constructors

Options 

Fields

replace :: Char -> String -> String -> Builder Source #

>>> replace '"' "\\\"" "foo\"bar" ""
"foo\\\"bar"

class ToString a where Source #

Methods

toLisp :: Options -> a -> Builder Source #

toPlain :: Options -> a -> Builder Source #

Instances
ToString String Source #
>>> toLisp defaultOptions "fo\"o" ""
"\"fo\\\"o\""
>>> toPlain defaultOptions "foo" ""
"foo"
Instance details

Defined in HIE.Bios.Types

ToString [((Int, Int, Int, Int), String)] Source #
>>> let inp = [((1,2,3,4),"foo"),((5,6,7,8),"bar")] :: [((Int,Int,Int,Int),String)]
>>> toLisp defaultOptions inp ""
"((1 2 3 4 \"foo\") (5 6 7 8 \"bar\"))"
>>> toPlain defaultOptions inp ""
"1 2 3 4 \"foo\"\n5 6 7 8 \"bar\""
Instance details

Defined in HIE.Bios.Types

Methods

toLisp :: Options -> [((Int, Int, Int, Int), String)] -> Builder Source #

toPlain :: Options -> [((Int, Int, Int, Int), String)] -> Builder Source #

ToString [String] Source #
>>> toLisp defaultOptions ["foo", "bar", "ba\"z"] ""
"(\"foo\" \"bar\" \"ba\\\"z\")"
>>> toPlain defaultOptions ["foo", "bar", "baz"] ""
"foo\nbar\nbaz"
Instance details

Defined in HIE.Bios.Types

data Cradle Source #

The environment where this library is used.

Constructors

Cradle 

Fields

Instances
Show Cradle Source # 
Instance details

Defined in HIE.Bios.Types

data CradleAction Source #

Constructors

CradleAction 

Fields

  • actionName :: String

    Name of the action

  • getDependencies :: IO [FilePath]

    Dependencies of a cradle that might change the cradle. Contains both files specified in hie.yaml as well as specified by the build-tool if there is any. FilePaths are expected to be relative to the cradleRootDir to which this CradleAction belongs to. Files returned by this action might not actually exist. This is useful, because, sometimes, adding specific files changes the options that a Cradle may return, thus, needs reload as soon as these files are created.

  • getOptions :: FilePath -> IO (ExitCode, String, [String])

    Options to compile the given file with. The result consists of the return code of the operation that has been run, the stdout of the process, and a list of options that are needed to compile the given file.

Instances
Show CradleAction Source # 
Instance details

Defined in HIE.Bios.Types

data CompilerOptions Source #

Option information for GHC

Constructors

CompilerOptions 

Fields