hhp-0.0.3: Happy Haskell Programming

Safe HaskellNone
LanguageHaskell2010

Hhp

Contents

Description

The Happy Haskell Programming library. API for commands.

Synopsis

Cradle

data Cradle Source #

The environment where this library is used.

Constructors

Cradle 

Fields

Instances
Eq Cradle Source # 
Instance details

Defined in Hhp.Types

Methods

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

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

Show Cradle Source # 
Instance details

Defined in Hhp.Types

findCradle :: IO Cradle Source #

Finding Cradle. Find a cabal file by tracing ancestor directories. Find a sandbox according to a cabal sandbox config in a cabal directory.

Options

data Options Source #

Constructors

Options 

Fields

newtype LineSeparator Source #

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

Constructors

LineSeparator String 

data OutputStyle Source #

Output style.

Constructors

LispStyle

S expression style.

PlainStyle

Plain textstyle.

Types

type ModuleString = String Source #

Module name.

type Expression = String Source #

Haskell expression.

IO utilities

bootInfo :: Options -> Cradle -> IO String Source #

Printing necessary information for front-end booting.

browseModule Source #

Arguments

:: Options 
-> Cradle 
-> ModuleString

A module name. (e.g. "Data.List")

-> IO String 

Getting functions, classes, etc from a module. If detailed is True, their types are also obtained. If operators is True, operators are also returned.

checkSyntax Source #

Arguments

:: Options 
-> Cradle 
-> [FilePath]

The target files.

-> IO String 

Checking syntax of a target file using GHC. Warnings and errors are returned.

lintSyntax Source #

Arguments

:: Options 
-> FilePath

A target file.

-> IO String 

Checking syntax of a target file using hlint. Warnings and errors are returned.

expandTemplate Source #

Arguments

:: Options 
-> Cradle 
-> [FilePath]

The target files.

-> IO String 

Expanding Haskell Template.

infoExpr Source #

Arguments

:: Options 
-> Cradle 
-> FilePath

A target file.

-> Expression

A Haskell expression.

-> IO String 

Obtaining information of a target expression. (GHCi's info:)

typeExpr Source #

Arguments

:: Options 
-> Cradle 
-> FilePath

A target file.

-> Int

Line number.

-> Int

Column number.

-> IO String 

Obtaining type of a target expression. (GHCi's type:)

listModules :: Options -> Cradle -> IO String Source #

Listing installed modules.

listLanguages :: Options -> IO String Source #

Listing language extensions.

listFlags :: Options -> IO String Source #

Listing GHC flags. (e.g -Wno-orphans)

debugInfo :: Options -> Cradle -> IO String Source #

Obtaining debug information.

rootInfo :: Options -> Cradle -> IO String Source #

Obtaining root information.

packageDoc :: Options -> Cradle -> ModuleString -> IO String Source #

Obtaining the package name and the doc path of a module.

findSymbol :: Options -> Cradle -> Symbol -> IO String Source #

Finding modules to which the symbol belong.