Skip to content

Commit

Permalink
Merge pull request #2420 from unisonweb/remove-trace-from-fieldnames
Browse files Browse the repository at this point in the history
Remove trace from fieldnames
  • Loading branch information
pchiusano committed Sep 20, 2021
2 parents 88cebf7 + 8153524 commit 8360694
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parser-typechecker/src/Unison/DeclPrinter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ fieldNames env r name dd = case DD.constructors dd of
fieldNames = Map.fromList
[ (r, f) | (r, n) <- names
, typename <- pure (HQ.toString name)
, typename `isPrefixOf` (traceShowId n)
, typename `isPrefixOf` n
, rest <- pure $ drop (length typename + 1) n
, (f, rest) <- pure $ span (/= '.') rest
, rest `elem` ["",".set",".modify"] ]
in if traceShowId (Map.size fieldNames) == traceShowId (length names) then
in if Map.size fieldNames == length names then
Just [ HQ.unsafeFromString name
| v <- vars
, Just (ref, _) <- [Map.lookup (Var.namespaced [HQ.toVar name, v]) hashes]
Expand Down

0 comments on commit 8360694

Please sign in to comment.