futhark
Safe HaskellNone
LanguageGHC2021

Language.Futhark.Parser.Parser

Description

Futhark parser written with Happy.

Synopsis

Documentation

parse :: ParserMonad a -> Pos -> Text -> Either SyntaxError a Source #

As 'parseWithComments, but throw away the comments.

parseWithComments :: ParserMonad a -> Pos -> Text -> Either SyntaxError (a, [Comment]) Source #

Parse something starting at the given position. The position also contains the input file name.

data SyntaxError Source #

A syntax error.

Constructors

SyntaxError 

data Comment Source #

A comment consists of its starting and end position, as well as its text. The contents include the comment start marker.

Constructors

Comment 

Instances

Instances details
Show Comment Source # 
Instance details

Defined in Language.Futhark.Parser.Monad

Eq Comment Source # 
Instance details

Defined in Language.Futhark.Parser.Monad

Methods

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

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

Ord Comment Source # 
Instance details

Defined in Language.Futhark.Parser.Monad

Located Comment Source # 
Instance details

Defined in Language.Futhark.Parser.Monad

Methods

locOf :: Comment -> Loc #

locOfList :: [Comment] -> Loc #