purescript-0.13.0: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell2010

Language.PureScript.Sugar.Operators.Common

Documentation

type Chain a = [Either a a] Source #

type FromOp nameType a = a -> Maybe (SourceSpan, Qualified (OpName nameType)) Source #

type Reapply nameType a = SourceSpan -> Qualified (OpName nameType) -> a -> a -> a Source #

token :: Stream s Identity t => (t -> Maybe a) -> Parsec s u a Source #

parseOp :: FromOp nameType a -> Parsec (Chain a) () (SourceSpan, Qualified (OpName nameType)) Source #

matchOp :: FromOp nameType a -> Qualified (OpName nameType) -> Parsec (Chain a) () SourceSpan Source #

opTable :: [[(Qualified (OpName nameType), Associativity)]] -> FromOp nameType a -> Reapply nameType a -> [[Operator (Chain a) () Identity a]] Source #

matchOperators :: forall m a nameType. Show a => MonadError MultipleErrors m => (a -> Bool) -> (a -> Maybe (a, a, a)) -> FromOp nameType a -> Reapply nameType a -> ([[Operator (Chain a) () Identity a]] -> OperatorTable (Chain a) () Identity a) -> [[(Qualified (OpName nameType), Associativity)]] -> a -> m a Source #