Permalink
Browse files

add int_handler rule

  • Loading branch information...
1 parent a488de0 commit ca5255b6d89500deb2c1ea30eed53dccd2eadbaf @bblum committed Dec 5, 2011
Showing with 4 additions and 2 deletions.
  1. +1 −0 Attributes.hs
  2. +3 −2 Rules.hs
View
1 Attributes.hs
@@ -23,6 +23,7 @@ stringToRule :: String -> Maybe Rule
stringToRule s =
case s of
"might_sleep" -> Just $ Rule $ Nested 0
+ "int_handler" -> Just $ Rule $ Nested 1
"wont_sleep" -> Just $ Rule Infinity
_ -> Nothing
View
5 Rules.hs
@@ -20,6 +20,7 @@ instance Ord Context where -- subtyping relation; user-defined
instance Show Rule where -- user-defined
show (Rule (Nested 0)) = "might_sleep"
+ show (Rule (Nested 1)) = "int_handler"
show (Rule (Nested x)) = "[unknown rule: " ++ show x ++ "]"
show (Rule Infinity) = "wont_sleep"
@@ -69,6 +70,6 @@ disjoin = merge max
entryContext :: Annotation -> Context
entryContext (Annotation (Rule r, _)) = r
--- Gives a default "assume the best" context.
+-- Gives a default context to start checking function bodies.
entryDefault :: Context -- user-defined
-entryDefault = Nested 0
+entryDefault = Infinity

0 comments on commit ca5255b

Please sign in to comment.