Print functions nicer

This commit is contained in:
Niels G. W. Serup 2024-10-14 23:43:27 +02:00
parent b56853d133
commit 0e98373389
No known key found for this signature in database
GPG Key ID: 38EEEBCE67324F19
1 changed files with 8 additions and 1 deletions

View File

@ -102,8 +102,15 @@ formatDependencyTrees = T.concat . (formatDependencyTrees' "")
NoToken ->
[ "--" ]
formatAction :: Text -> Action a b -> [Text]
formatAction :: forall a b. Text -> Action a b -> [Text]
formatAction indentation = \case
Function _ ->
[ "Function "
, T.pack (show (typeRep :: TypeRep a))
, " -> "
, T.pack (show (typeRep :: TypeRep b))
, "\n"
]
MapComp subDeps innerInput innerOutput ->
concat [ [ "MapComp(" ]
, formatToken innerInput