GF.Support

Supporting infrastructure and system utilities

Source locations

class HasSourcePath a

data Location

data L a

unLoc

noLoc

ppLocation

ppL

Command line options

Option types

data Options

data Flags

data Mode

data Phase

data Verbosity

data OutputFormat

data SISRFormat

data Optimization

data CFGTransform

data HaskellOption

data Dump

data Pass

data Recomp

outputFormatsExpl

Option parsing

parseOptions

parseModuleOptions

fixRelativeLibPaths

Option pretty-printing

optionsGFO

optionsPGF

Option manipulation

addOptions

concatOptions

noOptions

modifyFlags

helpMessage

Checking specific options

flag

cfgTransform

haskellOption

readOutputFormat

isLexicalCat

isLiteralCat

renameEncoding

getEncoding

defaultEncoding

Setting specific options

setOptimization

setCFGTransform

Convenience methods for checking options

verbAtLeast

dump

The Error monad

data Err a

err

maybeErr

testErr

fromErr

errIn

lookupErr

Error monad class

class ErrorMonad m

checks

liftErr

Checking

checkUnique

unifyMaybeBy

unifyMaybe

Monadic operations on lists and pairs

mapPairListM

mapPairsM

pairM

Binary search trees; now with FiniteMap

type BinTree a b

emptyBinTree

isInBinTree

lookupTree

lookupTreeManyAll

updateTree

buildTree

filterBinTree

mapTree

tree2list

Printing

indent

(+++)

(++-)

(++++)

(+++-)

(+++++)

prUpper

prReplicate

prTList

prQuotedString

prParenth

prCurly

prBracket

prArgList

prSemicList

prCurlyList

restoreEscapes

numberedParagraphs

prConjList

prIfEmpty

wrapLines

Topological sorting

topoTest

topoTest2

Misc

ifNull

combinations

done

readIntArg

iterFix

chunks

Files and IO

putIfVerb

GF files path and library path manipulation

type FileName

type InitPath

type FullPath

gfLibraryPath

gfGrammarPathVar

getLibraryDirectory

getGrammarPath

extendPathEnv

getSubdirs

justModuleName

isGF

isGFO

gfFile

gfoFile

gf2gfo

gf2gfo'

splitInModuleSearchPath

Error handling in the IO monad

type IOE a

tryIOE

useIOE

maybeIO

die

Diagnostic output

class Output m

putPointE

ioErrorText

Timing

timeIt

File IO

writeUTF8File

readBinaryFile

writeBinaryFile

Reused

class MonadIO m

liftErr

Backwards compatible try and catch

catch

try

Console IO

Changing which character encoding to use for console IO

setConsoleEncoding

changeConsoleEncoding

Console colors

data TermColors

getTermColors

Binary serialisation

class Binary t

encode

decode

encodeFile

decodeFile