diff options
| author | krasimir <krasimir@chalmers.se> | 2010-05-28 14:15:15 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-05-28 14:15:15 +0000 |
| commit | c3f4c3eba7b7d98f48cfe56711eb18611bb89515 (patch) | |
| tree | 42dafb392663e9a92238fd6b2f4dfa289b468f0e /src/compiler/GF/Grammar/MMacros.hs | |
| parent | b3d6f01f403dbf86207079b214b75c2445ad55b7 (diff) | |
refactoring in GF.Grammar.Grammar
Diffstat (limited to 'src/compiler/GF/Grammar/MMacros.hs')
| -rw-r--r-- | src/compiler/GF/Grammar/MMacros.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/GF/Grammar/MMacros.hs b/src/compiler/GF/Grammar/MMacros.hs index a7f746b66..233eb768f 100644 --- a/src/compiler/GF/Grammar/MMacros.hs +++ b/src/compiler/GF/Grammar/MMacros.hs @@ -134,7 +134,7 @@ getMetaAtom a = case a of _ -> Bad "the active node is not meta" -} cat2val :: Context -> Cat -> Val -cat2val cont cat = vClos $ mkApp (uncurry Q cat) [Meta i | i <- [1..length cont]] +cat2val cont cat = vClos $ mkApp (Q cat) [Meta i | i <- [1..length cont]] val2cat :: Val -> Err Cat val2cat v = liftM valCat (val2exp v) @@ -183,7 +183,7 @@ val2expP safe v = case v of else substVal g e VClos g e -> substVal g e VApp f c -> liftM2 App (val2expP safe f) (val2expP safe c) - VCn c -> return $ uncurry Q c + VCn c -> return $ Q c VGen i x -> if safe then Bad (render (text "unsafe val2exp" <+> ppValue Unqualified 0 v)) else return $ Vr $ x --- in editing, no alpha conversions presentv @@ -234,9 +234,9 @@ qualifTerm m = qualif [] where qualif xs t = case t of Abs b x t -> let x' = chV x in Abs b x' $ qualif (x':xs) t Prod b x a t -> Prod b x (qualif xs a) $ qualif (x:xs) t - Vr x -> let x' = chV x in if (elem x' xs) then (Vr x') else (Q m x) - Cn c -> Q m c - Con c -> QC m c + Vr x -> let x' = chV x in if (elem x' xs) then (Vr x') else (Q (m,x)) + Cn c -> Q (m,c) + Con c -> QC (m,c) _ -> composSafeOp (qualif xs) t chV x = string2var $ ident2bs x |
