diff options
| author | krasimir <krasimir@chalmers.se> | 2009-01-23 07:16:46 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-01-23 07:16:46 +0000 |
| commit | f6661c32137dc2e51c9e6ba1f3f2253b75ba0133 (patch) | |
| tree | d3e1552511f26ef526c973a553f955e4d59d5862 /src/GF/Compile | |
| parent | f0718589df2cef815cfef40f8ea6eb6a5fc671ec (diff) | |
remove some more obsolete code
Diffstat (limited to 'src/GF/Compile')
| -rw-r--r-- | src/GF/Compile/Compute.hs | 3 | ||||
| -rw-r--r-- | src/GF/Compile/Optimize.hs | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/GF/Compile/Compute.hs b/src/GF/Compile/Compute.hs index 90295b697..d9fb8c12b 100644 --- a/src/GF/Compile/Compute.hs +++ b/src/GF/Compile/Compute.hs @@ -56,9 +56,6 @@ computeTermOpt rec gr = comput True where Q p c | p == cPredef -> return t | otherwise -> look p c - -- if computed do nothing - Computed t' -> return $ unComputed t' - Vr x -> do t' <- maybe (prtBad ("no value given to variable") x) return $ lookup x g case t' of diff --git a/src/GF/Compile/Optimize.hs b/src/GF/Compile/Optimize.hs index 31564d444..177e5bf70 100644 --- a/src/GF/Compile/Optimize.hs +++ b/src/GF/Compile/Optimize.hs @@ -168,7 +168,7 @@ partEval opts gr (context, val) trm = errIn ("parteval" +++ prt_ trm) $ do -- {s = variants {"Auto" ; "Wagen"} ; g = variants {N ; M}} ; recordExpand :: Type -> Term -> Err Term -recordExpand typ trm = case unComputed typ of +recordExpand typ trm = case typ of RecType tys -> case trm of FV rs -> return $ FV [R [assign lab (P r lab) | (lab,_) <- tys] | r <- rs] _ -> return $ R [assign lab (P trm lab) | (lab,_) <- tys] @@ -179,12 +179,12 @@ recordExpand typ trm = case unComputed typ of mkLinDefault :: SourceGrammar -> Type -> Err Term mkLinDefault gr typ = do - case unComputed typ of + case typ of RecType lts -> mapPairsM mkDefField lts >>= (return . Abs varStr . R . mkAssign) _ -> liftM (Abs varStr) $ mkDefField typ ---- _ -> prtBad "linearization type must be a record type, not" typ where - mkDefField typ = case unComputed typ of + mkDefField typ = case typ of Table p t -> do t' <- mkDefField t let T _ cs = mkWildCases t' |
