diff options
| author | hallgren <hallgren@chalmers.se> | 2014-07-28 11:58:00 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-07-28 11:58:00 +0000 |
| commit | 7a91afc02a0a245bf9fea248e61421a75c22137d (patch) | |
| tree | e8c0466894f64a5a6cb98ef4d32dedcb9eeca879 /src/compiler/GF/Compile/Compute | |
| parent | 59172ce9c5baf593e3110036a14c910da80878f7 (diff) | |
Convert from Text.PrettyPrint to GF.Text.Pretty
All compiler modules now use GF.Text.Pretty instead of Text.PrettyPrint
Diffstat (limited to 'src/compiler/GF/Compile/Compute')
| -rw-r--r-- | src/compiler/GF/Compile/Compute/Abstract.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/Compute/AppPredefined.hs | 4 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/Compute/ConcreteLazy.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/Compute/ConcreteNew1.hs | 4 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/Compute/ConcreteStrict.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/Compute/Predef.hs | 6 |
6 files changed, 10 insertions, 10 deletions
diff --git a/src/compiler/GF/Compile/Compute/Abstract.hs b/src/compiler/GF/Compile/Compute/Abstract.hs index ef7974314..c374a80b4 100644 --- a/src/compiler/GF/Compile/Compute/Abstract.hs +++ b/src/compiler/GF/Compile/Compute/Abstract.hs @@ -29,7 +29,7 @@ import GF.Grammar.Lookup import Debug.Trace import Data.List(intersperse) import Control.Monad (liftM, liftM2) -import Text.PrettyPrint +import GF.Text.Pretty -- for debugging tracd m t = t diff --git a/src/compiler/GF/Compile/Compute/AppPredefined.hs b/src/compiler/GF/Compile/Compute/AppPredefined.hs index 2a1998283..0869cedee 100644 --- a/src/compiler/GF/Compile/Compute/AppPredefined.hs +++ b/src/compiler/GF/Compile/Compute/AppPredefined.hs @@ -23,7 +23,7 @@ import GF.Grammar import GF.Grammar.Predef import qualified Data.Map as Map -import Text.PrettyPrint +import GF.Text.Pretty import Data.Char (isUpper,toUpper,toLower) -- predefined function type signatures and definitions. AR 12/3/2003. @@ -140,4 +140,4 @@ mapStr ty f t = case (ty,t) of mapField (mty,te) = case mty of Just ty -> (mty,mapStr ty f te) _ -> (mty,te) --}
\ No newline at end of file +-} diff --git a/src/compiler/GF/Compile/Compute/ConcreteLazy.hs b/src/compiler/GF/Compile/Compute/ConcreteLazy.hs index abfa93578..929e30ce1 100644 --- a/src/compiler/GF/Compile/Compute/ConcreteLazy.hs +++ b/src/compiler/GF/Compile/Compute/ConcreteLazy.hs @@ -33,7 +33,7 @@ import GF.Compile.Compute.AppPredefined import Data.List (nub) --intersperse --import Control.Monad (liftM2, liftM) import Control.Monad.Identity -import Text.PrettyPrint +import GF.Text.Pretty ----import Debug.Trace diff --git a/src/compiler/GF/Compile/Compute/ConcreteNew1.hs b/src/compiler/GF/Compile/Compute/ConcreteNew1.hs index 354f8249e..eba1db57b 100644 --- a/src/compiler/GF/Compile/Compute/ConcreteNew1.hs +++ b/src/compiler/GF/Compile/Compute/ConcreteNew1.hs @@ -8,7 +8,7 @@ import GF.Grammar.Lookup import GF.Grammar.Predef import GF.Data.Operations import Data.List (intersect) -import Text.PrettyPrint +import GF.Text.Pretty normalForm :: SourceGrammar -> Term -> Term normalForm gr t = value2term gr [] (eval gr [] t) @@ -65,7 +65,7 @@ eval gr env (ImplArg t) = VImplArg (eval gr env t) eval gr env (Table p res) = VTblType (eval gr env p) (eval gr env res) eval gr env (RecType rs) = VRecType [(l,eval gr env ty) | (l,ty) <- rs] eval gr env t@(ExtR t1 t2) = - let error = VError (show (text "The term" <+> ppTerm Unqualified 0 t <+> text "is not reducible")) + let error = VError (show ("The term" <+> ppTerm Unqualified 0 t <+> "is not reducible")) in case (eval gr env t1, eval gr env t2) of (VRecType rs1, VRecType rs2) -> case intersect (map fst rs1) (map fst rs2) of [] -> VRecType (rs1 ++ rs2) diff --git a/src/compiler/GF/Compile/Compute/ConcreteStrict.hs b/src/compiler/GF/Compile/Compute/ConcreteStrict.hs index 3f417bae2..df343adec 100644 --- a/src/compiler/GF/Compile/Compute/ConcreteStrict.hs +++ b/src/compiler/GF/Compile/Compute/ConcreteStrict.hs @@ -33,7 +33,7 @@ import GF.Compile.Compute.AppPredefined import Data.List (nub,intersperse) import Control.Monad (liftM2, liftM) -import Text.PrettyPrint +import GF.Text.Pretty ----import Debug.Trace diff --git a/src/compiler/GF/Compile/Compute/Predef.hs b/src/compiler/GF/Compile/Compute/Predef.hs index 8c5e5c5f7..b9bb01ce8 100644 --- a/src/compiler/GF/Compile/Compute/Predef.hs +++ b/src/compiler/GF/Compile/Compute/Predef.hs @@ -2,7 +2,7 @@ {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module GF.Compile.Compute.Predef(predef,predefName,delta) where -import Text.PrettyPrint(render,hang,text) +import GF.Text.Pretty(render,hang) import qualified Data.Map as Map import Data.Array(array,(!)) import Data.List (isInfixOf) @@ -154,6 +154,6 @@ string s = case words s of swap (x,y) = (y,x) -bug msg = ppbug (text msg) +bug msg = ppbug msg ppbug doc = error $ render $ - hang (text "Internal error in Compute.Predef:") 4 doc + hang "Internal error in Compute.Predef:" 4 doc |
