forked from GitHub/gf-core
debugging testgf3
This commit is contained in:
@@ -2,9 +2,10 @@ resource Param = {
|
|||||||
|
|
||||||
param Bool = True | False ;
|
param Bool = True | False ;
|
||||||
|
|
||||||
oper and : Bool -> Bool -> Bool = \x,y -> case x of {
|
oper and -- : Bool -> Bool -> Bool
|
||||||
|
= \\x,y => case x of {
|
||||||
True => y ;
|
True => y ;
|
||||||
_ => False
|
False => False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,8 +203,10 @@ checkCompleteGrammar abs cnc = do
|
|||||||
checkResInfo :: GF -> Ident -> Ident -> Judgement -> Check Judgement
|
checkResInfo :: GF -> Ident -> Ident -> Judgement -> Check Judgement
|
||||||
checkResInfo gr mo c info = do
|
checkResInfo gr mo c info = do
|
||||||
---- checkReservedId c
|
---- checkReservedId c
|
||||||
|
trace (show info) (return ())
|
||||||
case jform info of
|
case jform info of
|
||||||
JOper -> chIn "operation" $ case (jtype info, jdef info) of
|
JOper -> chIn "operation" $ case (jtype info, jdef info) of
|
||||||
|
_ | isConstructor info -> return info
|
||||||
(_,Meta _) -> do
|
(_,Meta _) -> do
|
||||||
checkWarn "No definition given to oper"
|
checkWarn "No definition given to oper"
|
||||||
return info
|
return info
|
||||||
@@ -698,6 +700,7 @@ getOverload env@gr mt t = case appForm t of
|
|||||||
|
|
||||||
checkLType :: GF -> Term -> Type -> Check (Term, Type)
|
checkLType :: GF -> Term -> Type -> Check (Term, Type)
|
||||||
checkLType env trm typ0 = do
|
checkLType env trm typ0 = do
|
||||||
|
trace (show trm) (return ())
|
||||||
|
|
||||||
typ <- comp typ0
|
typ <- comp typ0
|
||||||
|
|
||||||
|
|||||||
@@ -34,9 +34,12 @@ batchCompile opts files = do
|
|||||||
|
|
||||||
-- to output an intermediate stage
|
-- to output an intermediate stage
|
||||||
intermOut :: Options -> Option -> String -> IOE ()
|
intermOut :: Options -> Option -> String -> IOE ()
|
||||||
intermOut opts opt s = if oElem opt opts then
|
intermOut opts opt s =
|
||||||
ioeIO (putStrLn ("\n\n--#" +++ prOpt opt) >> putStrLn s)
|
if oElem opt opts || oElem (iOpt "show_all") opts
|
||||||
else return ()
|
then
|
||||||
|
ioeIO (putStrLn ("\n\n--#" +++ prOpt opt) >> putStrLn s)
|
||||||
|
else
|
||||||
|
return ()
|
||||||
|
|
||||||
prMod :: SourceModule -> String
|
prMod :: SourceModule -> String
|
||||||
prMod = prModule
|
prMod = prModule
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ lookupOperType gr m c = do
|
|||||||
case jform ju of
|
case jform ju of
|
||||||
JParam -> return typePType
|
JParam -> return typePType
|
||||||
_ -> case jtype ju of
|
_ -> case jtype ju of
|
||||||
Meta _ -> fail ("no type given to " ++ prIdent m ++ "." ++ prIdent c ++ " in " ++ show ju)
|
Meta _ -> fail ("no type given to " ++ prIdent m ++ "." ++ prIdent c)
|
||||||
ty -> return ty
|
ty -> return ty
|
||||||
---- can't be just lookupJField jtype
|
---- can't be just lookupJField jtype
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,11 @@ More options (debugging flags):
|
|||||||
-show_refreshing -- ... after refreshing variables
|
-show_refreshing -- ... after refreshing variables
|
||||||
-show_optimize -- ... after partial evaluation
|
-show_optimize -- ... after partial evaluation
|
||||||
-show_factorize -- ... after factoring optimization
|
-show_factorize -- ... after factoring optimization
|
||||||
|
-show_all -- show all phases
|
||||||
|
|
||||||
|
-1 -- stop after parsing
|
||||||
|
-2 -- ... extending
|
||||||
|
-3 -- ... renaming
|
||||||
|
-4 -- ... type checking
|
||||||
|
-5 -- ... refreshing
|
||||||
|
|
||||||
-1 -- stop before extending
|
|
||||||
-2 -- ... renaming
|
|
||||||
-3 -- ... type checking
|
|
||||||
-4 -- ... refreshing
|
|
||||||
-5 -- ... partial evaluation
|
|
||||||
|
|||||||
Reference in New Issue
Block a user