purescript-0.15.12: PureScript Programming Language Compiler

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.PureScript.Sugar.Operators.Common

# Documentation

type Chain a = [Either a a] #

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

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

toAssoc :: Associativity -> Assoc #

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

parseValue :: Parsec (Chain a) () a #

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

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

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

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 #