Comment out some dead code found with -fwarn-unused-binds

Also fixed some warnings and tightened some imports
This commit is contained in:
hallgren
2015-08-28 13:59:43 +00:00
parent f2952768d5
commit 5bfaf10de5
39 changed files with 122 additions and 116 deletions

View File

@@ -33,7 +33,7 @@ nfx env@(GE _ _ _ loc) t = value2term loc [] # eval env t
eval :: GlobalEnv -> Term -> Err Value
eval ge t = ($[]) # value (toplevel ge) t
apply env = apply' env
--apply env = apply' env
--------------------------------------------------------------------------------
@@ -279,7 +279,7 @@ strsFromValue t = case t of
d0 <- strsFromValue d
v0 <- mapM (strsFromValue . fst) vs
c0 <- mapM (strsFromValue . snd) vs
let vs' = zip v0 c0
--let vs' = zip v0 c0
return [strTok (str2strings def) vars |
def <- d0,
vars <- [[(str2strings v, map sstr c) | (v,c) <- zip vv c0] |
@@ -511,11 +511,11 @@ ix loc fn xs i =
else bugloc loc $ "(!!): index too large in "++fn++", "++show i++"<"++show n
where n = length xs
infixl 1 #,<#,@@
infixl 1 #,<# --,@@
f # x = fmap f x
mf <# mx = ap mf mx
m1 @@ m2 = (m1 =<<) . m2
--m1 @@ m2 = (m1 =<<) . m2
both f (x,y) = (,) # f x <# f y

View File

@@ -2,7 +2,7 @@
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module GF.Compile.Compute.Predef(predef,predefName,delta) where
import GF.Text.Pretty(render,hang)
--import GF.Text.Pretty(render,hang)
import qualified Data.Map as Map
import Data.Array(array,(!))
import Data.List (isInfixOf)
@@ -146,11 +146,11 @@ norm v =
(VString s1,VString s2) -> VString (s1++" "++s2)
(v1,v2) -> VC v1 v2
_ -> v
{-
strict v = case v of
VError err -> Left err
_ -> Right v
-}
string s = case words s of
[] -> VString ""
ss -> foldr1 VC (map VString ss)
@@ -158,7 +158,8 @@ string s = case words s of
---
swap (x,y) = (y,x)
{-
bug msg = ppbug msg
ppbug doc = error $ render $
hang "Internal error in Compute.Predef:" 4 doc
-}