mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-13 09:55:35 +03:00
WIP
This commit is contained in:
parent
e2a5f94646
commit
1346489fe9
@ -138,7 +138,7 @@ indexByReference uf = (tms, tys)
|
||||
|
||||
allTerms :: Ord v => TypecheckedUnisonFile v a -> Map v (Term v a)
|
||||
allTerms uf =
|
||||
Map.fromList [ (v, t) | (v, t, _) <- join $ topLevelComponents' uf ]
|
||||
Map.fromList [ (v, t) | (v, t, _) <- join $ topLevelComponents uf ]
|
||||
|
||||
-- |the top level components (no watches) plus test watches.
|
||||
topLevelComponents :: TypecheckedUnisonFile v a
|
||||
|
@ -734,8 +734,9 @@ hash = hash' [] where
|
||||
|
||||
instance (Show1 f, Show v) => Show (Term f v a) where
|
||||
-- annotations not shown
|
||||
showsPrec p (Term _ _ out) = case out of
|
||||
Var v -> showParen (p>=9) $ \x -> "Var " ++ show v ++ x
|
||||
Cycle body -> ("Cycle " ++) . showsPrec p body
|
||||
Abs v body -> showParen True $ (show v ++) . showString ". " . showsPrec p body
|
||||
Tm f -> showsPrec1 p f
|
||||
showsPrec p (Term freevars _ out) = case out of
|
||||
-- showsPrec p (Term _ _ out) = case out of
|
||||
Var v -> showParen (p>=9) $ \x -> show freevars <> "Var " ++ show v ++ x
|
||||
Cycle body -> (show freevars <>) . ("Cycle " ++) . showsPrec p body
|
||||
Abs v body -> showParen True $ (show freevars <>) . (show v ++) . showString ". " . showsPrec p body
|
||||
Tm f -> (show freevars <>) . showsPrec1 p f
|
||||
|
@ -21,6 +21,7 @@ module Unison.DataDeclaration
|
||||
constructorType,
|
||||
constructorTypes,
|
||||
constructorVars,
|
||||
constructorIds,
|
||||
declConstructorReferents,
|
||||
declDependencies,
|
||||
declFields,
|
||||
|
Loading…
Reference in New Issue
Block a user