Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 40c467f

Browse files
committed
🔥 the Show1 instances for Tracing and AssignmentF.
1 parent 2ccd8e1 commit 40c467f

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/Assigning/Assignment.hs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -380,23 +380,3 @@ instance (Enum grammar, Eq1 ast, Ix grammar, Show grammar) => MonadError (Error
380380
Choose choices atEnd Nothing -> Tracing cs (Choose (fmap (>>= continue) choices) (fmap (>>= continue) atEnd) (Just handler)) `Then` pure
381381
Choose choices atEnd (Just onError) -> Tracing cs (Choose (fmap (>>= continue) choices) (fmap (>>= continue) atEnd) (Just (\ err -> (onError err >>= continue) <|> handler err))) `Then` pure
382382
_ -> Tracing cs assignment `Then` ((`catchError` handler) . continue)) (fmap pure rule)
383-
384-
instance Show1 f => Show1 (Tracing f) where
385-
liftShowsPrec sp sl d = liftShowsPrec sp sl d . runTracing
386-
387-
instance (Enum grammar, Ix grammar, Show grammar, Show1 ast) => Show1 (AssignmentF ast grammar) where
388-
liftShowsPrec sp sl d a = case a of
389-
End -> showString "End" . showChar ' ' . sp d ()
390-
Location -> showString "Location" . sp d (L.Location (Range 0 0) (Span (Pos 1 1) (Pos 1 1)))
391-
CurrentNode -> showString "CurrentNode"
392-
Source -> showString "Source" . showChar ' ' . sp d ""
393-
Children a -> showsUnaryWith showChild "Children" d a
394-
Choose choices atEnd _ -> showsBinaryWith (liftShowsPrec showChild showChildren) (liftShowsPrec showChild showChildren) "Choose" d choices atEnd
395-
Many a -> showsUnaryWith (liftShowsPrec (\ d a -> sp d [a]) (sl . pure)) "Many" d a
396-
Alt as -> showsUnaryWith (const sl) "Alt" d (toList as)
397-
Label child string -> showsBinaryWith (liftShowsPrec sp sl) showsPrec "Label" d child string
398-
Fail s -> showsUnaryWith showsPrec "Fail" d s
399-
GetLocals -> showString "GetLocals"
400-
PutLocals locals -> showsUnaryWith showsPrec "PutLocals" d locals
401-
where showChild = liftShowsPrec sp sl
402-
showChildren = liftShowList sp sl

0 commit comments

Comments
 (0)