Skip to content

Commit

Permalink
do not expand the same type name in expanded types
Browse files Browse the repository at this point in the history
git-svn-id: https://svn-agbkb.informatik.uni-bremen.de/Hets/trunk@8744 cec4b9c1-7d33-0410-9eda-942365e851bb
  • Loading branch information
Christian Maeder authored and Christian Maeder committed Aug 29, 2007
1 parent 950e053 commit c8ae097
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion HasCASL/FoldType.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ rename m = foldType mapTypeRec
{ foldTypeName = \ _ -> m
, foldTypeAbs = \ (TypeAbs v1@(TypeArg i _ _ _ c _ _) ty p) _ _ _ ->
TypeAbs v1 (rename ( \ j k n -> if (j, n) == (i, c) then
TypeName j k n else m j k n) ty) p }
TypeName j k n else m j k n) ty) p
, foldExpandedType = \ (ExpandedType t1 _) r1 r2 -> case (t1, r1) of
(TypeName _ _ _, ExpandedType t3 _) | t1 == t3 ->
ExpandedType t1 r2
_ -> ExpandedType r1 r2
}

-- | the type name components of a type
leaves :: (Int -> Bool) -> Type -> [(Int, (Id, RawKind))]
Expand Down

0 comments on commit c8ae097

Please sign in to comment.