From 35009a2911a35f37bc1a4cdecf2b5fa20b3cc57c Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 27 May 2008 20:54:31 +0000 Subject: some fixes in pattern matching in Compute --- src-3.0/GF/Grammar/Lookup.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src-3.0/GF/Grammar') diff --git a/src-3.0/GF/Grammar/Lookup.hs b/src-3.0/GF/Grammar/Lookup.hs index 3c308a539..35e3b8006 100644 --- a/src-3.0/GF/Grammar/Lookup.hs +++ b/src-3.0/GF/Grammar/Lookup.hs @@ -144,7 +144,6 @@ lookupParams gr = look True where info <- lookupIdentInfo mo c case info of ResParam (Yes psm) -> return psm - AnyInd _ n -> look False n c _ -> Bad $ prt c +++ "has no parameters defined in resource" +++ prt m _ -> Bad $ prt m +++ "is not a resource" @@ -195,7 +194,7 @@ allParamValues :: SourceGrammar -> Type -> Err [Term] allParamValues cnc ptyp = case ptyp of _ | Just n <- isTypeInts ptyp -> return [EInt i | i <- [0..n]] QC p c -> lookupParamValues cnc p c - Q p c -> lookupParamValues cnc p c ---- + Q p c -> lookupResDef cnc p c >>= allParamValues cnc RecType r -> do let (ls,tys) = unzip $ sortByFst r tss <- mapM allPV tys -- cgit v1.2.3