Skip to content

Commit 04b85d6

Browse files
committed
Do not output attribute information when unparsing TermLike
1 parent 2d3c935 commit 04b85d6

File tree

1 file changed

+1
-49
lines changed

1 file changed

+1
-49
lines changed

kore/src/Kore/Internal/TermLike/TermLike.hs

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ import Kore.Attribute.Pattern.FreeVariables qualified as Attribute.FreeVariables
7979
import Kore.Attribute.Pattern.FreeVariables qualified as FreeVariables
8080
import Kore.Attribute.Pattern.Function qualified as Attribute
8181
import Kore.Attribute.Pattern.Simplified qualified as Attribute
82-
import Kore.Attribute.Pattern.Simplified qualified as Attribute.Simplified
8382
import Kore.Attribute.Pattern.Total qualified as Attribute
8483
import Kore.Attribute.Synthetic
8584
import Kore.Builtin.Encoding qualified as Encoding
@@ -548,12 +547,6 @@ attributeSimplifiedAttribute ::
548547
attributeSimplifiedAttribute patt@TermAttributes{termSimplified} =
549548
assertSimplifiedConsistency patt termSimplified
550549

551-
constructorLikeAttribute ::
552-
TermAttributes variable ->
553-
Attribute.ConstructorLike
554-
constructorLikeAttribute TermAttributes{termConstructorLike} =
555-
termConstructorLike
556-
557550
{- Checks whether the pattern is simplified relative to the given side
558551
condition.
559552
-}
@@ -710,54 +703,13 @@ instance (Unparse variable, Ord variable) => Unparse (TermLike variable) where
710703
| Attribute.hasKnownCreator termCreated ->
711704
Pretty.sep
712705
[ Pretty.pretty termCreated
713-
, attributeRepresentation
714706
, unparse termLikeF
715707
]
716708
| otherwise ->
717-
Pretty.sep [attributeRepresentation, unparse termLikeF]
709+
unparse termLikeF
718710
where
719711
TermAttributes{termCreated} = attrs
720712

721-
attributeRepresentation = case attrs of
722-
(TermAttributes _ _ _ _ _ _ _ _) ->
723-
Pretty.surround
724-
(Pretty.hsep $ map Pretty.pretty representation)
725-
"/* "
726-
" */"
727-
where
728-
representation =
729-
addTotalRepresentation $
730-
addFunctionRepresentation $
731-
addDefinedRepresentation $
732-
addSimplifiedRepresentation $
733-
addConstructorLikeRepresentation []
734-
addTotalRepresentation
735-
| Attribute.isTotal $ termTotal attrs = ("T" :)
736-
| otherwise = id
737-
addFunctionRepresentation
738-
| Attribute.isFunction $ termFunction attrs = ("Fn" :)
739-
| otherwise = id
740-
addDefinedRepresentation
741-
| Attribute.isDefined $ termDefined attrs = ("D" :)
742-
| otherwise = id
743-
addSimplifiedRepresentation =
744-
case simplifiedTag of
745-
Just result -> (result :)
746-
Nothing -> id
747-
where
748-
simplifiedTag =
749-
Attribute.Simplified.unparseTag
750-
(attributeSimplifiedAttribute attrs)
751-
addConstructorLikeRepresentation =
752-
case constructorLike of
753-
Just Attribute.ConstructorLikeHead -> ("Cl" :)
754-
Just Attribute.SortInjectionHead -> ("Cli" :)
755-
Nothing -> id
756-
where
757-
constructorLike =
758-
Attribute.getConstructorLike
759-
(constructorLikeAttribute attrs)
760-
761713
unparse2 term =
762714
case Recursive.project term of
763715
(_ :< pat) -> unparse2 pat

0 commit comments

Comments
 (0)