Commit df266301 authored by Michael Hanus 's avatar Michael Hanus
Browse files

FlatCurry constructor Typed added at various places

parent 334cd423
......@@ -27,7 +27,7 @@ import Char(isSpace)
systemBanner =
let bannerText = "CASS: Curry Analysis Server System ("++
"version of 19/04/2013 for "++curryCompiler++")"
"version of 26/04/2013 for "++curryCompiler++")"
bannerLine = take (length bannerText) (repeat '=')
in bannerLine ++ "\n" ++ bannerText ++ "\n" ++ bannerLine
......
......@@ -2,7 +2,7 @@
--- A few base functions for analysing type dependencies in FlatCurry programs.
---
--- @author Heiko Hoffmann, Michael Hanus
--- @version March 2013
--- @version April 2013
-----------------------------------------------------------------------------
module FlatCurryDependency(dependsDirectlyOnTypes,callsDirectly) where
......@@ -51,6 +51,7 @@ funcSetOfExpr (Or e1 e2) = unionRBT (funcSetOfExpr e1) (funcSetOfExpr e2)
funcSetOfExpr (Case _ e bs) = unionRBT (funcSetOfExpr e)
(unionMap funcSetOfBranch bs)
where funcSetOfBranch (Branch _ be) = funcSetOfExpr be
funcSetOfExpr (Typed e _) = funcSetOfExpr e
isConstructorComb ct = case ct of
ConsCall -> True
......
......@@ -226,6 +226,8 @@ substituteAllCase vs es b (Branch (Pattern l pvs) e) =
Branch (Pattern l (map (+b) pvs)) (substituteAll vs es b e)
substituteAllCase vs es b (Branch (LPattern l) e) =
Branch (LPattern l) (substituteAll vs es b e)
substituteAll vs es b (Typed e t) =
Typed (substituteAll vs es b e) t
-- Is the expression a guarded expressions?
......
......@@ -311,6 +311,8 @@ substituteAllCase vs es b (Branch (Pattern l pvs) e) =
Branch (Pattern l (map (+b) pvs)) (substituteAll vs es b e)
substituteAllCase vs es b (Branch (LPattern l) e) =
Branch (LPattern l) (substituteAll vs es b e)
substituteAll vs es b (Typed e t) =
Typed (substituteAll vs es b e) t
-- Is the expression a guarded expressions?
......
-----------------------------------------------------------------------------
-- Show all calls to imported functions in a module
--
-- Michael Hanus, November 2003
--- Show all calls to imported functions in a module
---
--- @author Michael Hanus
--- @version April 2013
-----------------------------------------------------------------------------
module ImportCalls(main,showImportCalls) where
......@@ -78,6 +79,7 @@ globalFunsInExpr mod exp = funsInExpr exp
funsInExpr (Case _ e bs) = union (funsInExpr e)
(nub (concatMap funsInBranch bs))
where funsInBranch (Branch _ be) = funsInExpr be
funsInExpr (Typed e _) = funsInExpr e
----------------- Auxiliaries:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment