Skip to content

Commit

Permalink
avoid Pretty instance for a list
Browse files Browse the repository at this point in the history
git-svn-id: https://svn-agbkb.informatik.uni-bremen.de/Hets/trunk@6485 cec4b9c1-7d33-0410-9eda-942365e851bb
  • Loading branch information
Christian Maeder authored and Christian Maeder committed Jun 22, 2006
1 parent 85eb04d commit 6a546f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion HasCASL/Unify.hs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ mguList tm l1 l2 = case (l1, l2) of
s1 <- mgu tm h1 h2
s2 <- mguList tm (map (subst s1) t1) $ map (subst s1) t2
return $ compSubst s1 s2
_ -> mkError "no unification with empty list" (l1 ++ l2)
_ -> mkError "no unification with empty list" (head $ l1 ++ l2)

shapeMatch :: TypeMap -> Type -> Type -> Result Subst
shapeMatch tm a b = match tm (const $ const True) (True, a) (True, b)
Expand Down
5 changes: 3 additions & 2 deletions HasCASL/VarDecl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,12 @@ partitionOpId e i sc =
in partition (isUnifiable (typeMap e) (counter e) sc . opType) $ opInfos l

checkUnusedTypevars :: TypeScheme -> State Env TypeScheme
checkUnusedTypevars sc@(TypeScheme tArgs t _) = do
checkUnusedTypevars sc@(TypeScheme tArgs t ps) = do
let ls = map (fst . snd) $ leaves (< 0) t -- generic vars
rest = map getTypeVar tArgs List.\\ ls
if null rest then return ()
else addDiags [mkDiag Warning "unused type variables" rest]
else addDiags [Diag Warning ("unused type variables: "
++ show(fsep $ punctuate comma $ map pretty rest)) ps]
return sc

-- | storing an operation
Expand Down
4 changes: 2 additions & 2 deletions Static/ArchDiagram.hs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ instance Pretty Diag where
let gs (n, dn) =
(n, getSig $ dn_sig dn)
in text "nodes:"
<+> pretty (map gs $ labNodes diag)
<+> fsep (punctuate comma $ map (pretty . gs) $ labNodes diag)
$+$ text "edges:"
<+> pretty (edges diag)
<+> fsep (punctuate comma $ map pretty $ edges diag)


-- * Functions
Expand Down

0 comments on commit 6a546f8

Please sign in to comment.