on master help sign in
better lookup for operators
commit28ba8de602ab42207f029fdfa0ebc279c9bbf5b5 authorraichoo <raichoo@googlemail.com> dateThu 15 Nov 2012, 17:46 (14 years ago) parenteea2d4a
1 file changed+4−1
src/Idris/Docs.hs+4−1
src/Idris/Docs.hs+4−1
@@ -100,11 +100,14 @@ docFun n
100100 [args] -> zip argnames args
101101 _ -> []
102102 let infixes = idris_infixes i
103− let fixdecls = filter (\(Fix _ x) -> x `isSuffixOf` (show n)) infixes
103+ let fixdecls = filter (\(Fix _ x) -> x == funName n) infixes
104104 let f = case fixdecls of
105105 [] -> Nothing
106106 (Fix x _:_) -> Just x
107107
108108 return (Doc n docstr args (delab i ty) f)
109+ where funName :: Name -> String
110+ funName (UN n) = n
111+ funName (NS n _) = funName n
109112
110113