From b3032012007a808af73d17c2207ffaf49ceb1fc4 Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 22 Oct 2008 09:36:50 +0000 Subject: [PATCH] fix a typo. It is option "-cat" not "-type" --- src/GFI.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/GFI.hs b/src/GFI.hs index ed966699a..ccd19900d 100644 --- a/src/GFI.hs +++ b/src/GFI.hs @@ -232,7 +232,12 @@ wordCompletion gfenv line0 prefix0 p = pgf = multigrammar cmdEnv cmdEnv = commandenv gfenv optLang opts = valCIdOpts "lang" (head (languages pgf)) opts - optType opts = DTyp [] (mkCId (valStrOpts "type" (prCId $ lookStartCat pgf) opts)) [] + optType opts = + let str = valStrOpts "cat" (prCId $ lookStartCat pgf) opts + in case readType str of + Just ty -> ty + Nothing -> error ("Can't parse '"++str++"' as type") + ret c [x] = return [x++[c]] ret _ xs = return xs