From 17aa52c88e7300367630ef3df882138acd2845c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Tue, 3 Nov 2015 22:13:51 +0100 Subject: [PATCH] Strip '<' and '>' from IRI before logic lookup For some reason Hets leaves the angular brackets in there, when parsing IRIs at least in this small code sample. This prevents logic lookup from working properly. I opted for this short hack, as it I don't know whether other code relies on the brackets being there and removing them just before looking up the logic is the option that is least likely to break other code. --- Syntax/Parse_AS_Structured.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Syntax/Parse_AS_Structured.hs b/Syntax/Parse_AS_Structured.hs index f412ad231e..5561c7d2fd 100644 --- a/Syntax/Parse_AS_Structured.hs +++ b/Syntax/Parse_AS_Structured.hs @@ -89,7 +89,7 @@ sublogicChars = many $ satisfy $ \ c -> notElem c ":./\\" && isSignChar c lookupLogicM :: IRI -> AParser st String lookupLogicM i = if isSimple i then return l - else case lookupLogicName l of + else case lookupLogicName (filter (not . (`elem` "<>")) l) of Just s -> return s Nothing -> fail $ "logic " ++ show i ++ " not found" where l = iriToStringUnsecure i