bond-0.4.0.1: Bond schema compiler and code generator

Copyright(c) Microsoft
LicenseMIT
Maintaineradamsap@microsoft.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Language.Bond.Parser

Contents

Description

This module provides functionality necessary to parse Bond schema definition language.

Synopsis

Parser

parseBond Source

Arguments

:: SourceName

source name, used only for error messages

-> String

content of a schema file to parse

-> FilePath

path of the file being parsed, used to resolve relative import paths

-> ImportResolver

function to resolve and load imported files

-> IO (Either ParseError Bond)

function returns Bond which represents the parsed abstract syntax tree or ParserError if parsing failed

Parses content of a schema definition file.

type ImportResolver Source

Arguments

 = FilePath

path of the file containing the import statement

-> FilePath

(usually relative) path of the imported file

-> IO (FilePath, String)

the resolver function returns the resolved path of the imported file and its content