Language.PureScript.Sugar.Operators.Common

purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.Sugar.Operators.Common

# Documentation

type Chain a = [Either a a] #

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

type Reapply (nameType :: OpNameType) 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 :: forall (nameType :: OpNameType) a. FromOp nameType a -> Parsec (Chain a) () (SourceSpan, Qualified (OpName nameType)) #

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

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

matchOperators :: forall m a (nameType :: OpNameType). (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 #