From 53bb412fd3b97269d973315ba9f86b7d0f8ebf07 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Sat, 22 Jul 2017 14:06:44 -0400 Subject: [PATCH] Align the arguments with the ::. --- src/Data/Syntax/Assignment.hs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Data/Syntax/Assignment.hs b/src/Data/Syntax/Assignment.hs index 0f8f552bc..46bad9a22 100644 --- a/src/Data/Syntax/Assignment.hs +++ b/src/Data/Syntax/Assignment.hs @@ -228,20 +228,20 @@ showPos path Info.Pos{..} = maybe (showParen True (showString "interactive")) sh -- | Run an assignment over an AST exhaustively. assignBy :: (Symbol grammar, Enum grammar, Eq grammar, Recursive ast, Foldable (Base ast), HasCallStack) - => (forall x. Base ast x -> Node grammar) - -> Source.Source - -> Assignment ast grammar a - -> ast - -> Either (Error grammar) a + => (forall x. Base ast x -> Node grammar) + -> Source.Source + -> Assignment ast grammar a + -> ast + -> Either (Error grammar) a assignBy toNode source assignment = fmap fst . runAssignment toNode source assignment . makeState . pure -- | Run an assignment of nodes in a grammar onto terms in a syntax over an AST exhaustively. runAssignment :: forall grammar a ast. (Symbol grammar, Enum grammar, Eq grammar, Recursive ast, Foldable (Base ast), HasCallStack) - => (forall x. Base ast x -> Node grammar) -- ^ A function to project a 'Node' from the ast. - -> Source.Source -- ^ The source for the parse tree. - -> Assignment ast grammar a -- ^ The 'Assignment' to run. - -> AssignmentState ast grammar -- ^ The current state. - -> Either (Error grammar) (a, AssignmentState ast grammar) -- ^ 'Either' an 'Error' or the pair of the assigned value & updated state. + => (forall x. Base ast x -> Node grammar) -- ^ A function to project a 'Node' from the ast. + -> Source.Source -- ^ The source for the parse tree. + -> Assignment ast grammar a -- ^ The 'Assignment' to run. + -> AssignmentState ast grammar -- ^ The current state. + -> Either (Error grammar) (a, AssignmentState ast grammar) -- ^ 'Either' an 'Error' or the pair of the assigned value & updated state. runAssignment toNode source assignment state = go assignment state >>= requireExhaustive where go :: forall a . Assignment ast grammar a