summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-07-28 11:58:00 +0000
committerhallgren <hallgren@chalmers.se>2014-07-28 11:58:00 +0000
commit7a91afc02a0a245bf9fea248e61421a75c22137d (patch)
treee8c0466894f64a5a6cb98ef4d32dedcb9eeca879 /src/compiler/GF/Grammar
parent59172ce9c5baf593e3110036a14c910da80878f7 (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/Grammar')
-rw-r--r--src/compiler/GF/Grammar/MMacros.hs6
-rw-r--r--src/compiler/GF/Grammar/Unify.hs8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/GF/Grammar/MMacros.hs b/src/compiler/GF/Grammar/MMacros.hs
index 1b9060003..9f4587967 100644
--- a/src/compiler/GF/Grammar/MMacros.hs
+++ b/src/compiler/GF/Grammar/MMacros.hs
@@ -26,7 +26,7 @@ import GF.Grammar.Values
import GF.Grammar.Macros
import Control.Monad
-import Text.PrettyPrint
+import GF.Text.Pretty
{-
nodeTree :: Tree -> TrNode
@@ -178,13 +178,13 @@ val2expP :: Bool -> Val -> Err Exp
val2expP safe v = case v of
VClos g@(_:_) e@(Meta _) -> if safe
- then Bad (render (text "unsafe value substitution" <+> ppValue Unqualified 0 v))
+ then Bad (render ("unsafe value substitution" <+> ppValue Unqualified 0 v))
else substVal g e
VClos g e -> substVal g e
VApp f c -> liftM2 App (val2expP safe f) (val2expP safe c)
VCn c -> return $ Q c
VGen i x -> if safe
- then Bad (render (text "unsafe val2exp" <+> ppValue Unqualified 0 v))
+ then Bad (render ("unsafe val2exp" <+> ppValue Unqualified 0 v))
else return $ Vr $ x --- in editing, no alpha conversions presentv
VRecType xs->do xs <- mapM (\(l,v) -> val2expP safe v >>= \e -> return (l,e)) xs
return (RecType xs)
diff --git a/src/compiler/GF/Grammar/Unify.hs b/src/compiler/GF/Grammar/Unify.hs
index d08de96c7..9ec6e5078 100644
--- a/src/compiler/GF/Grammar/Unify.hs
+++ b/src/compiler/GF/Grammar/Unify.hs
@@ -20,7 +20,7 @@ module GF.Grammar.Unify (unifyVal) where
import GF.Grammar
import GF.Data.Operations
-import Text.PrettyPrint
+import GF.Text.Pretty
import Data.List (partition)
unifyVal :: Constraints -> Err (Constraints,MetaSubst)
@@ -64,13 +64,13 @@ unify e1 e2 g =
unify b c' g
(App c a, App d b) -> case unify c d g of
Ok g1 -> unify a b g1
- _ -> Bad (render (text "fail unify" <+> ppTerm Unqualified 0 e1))
+ _ -> Bad (render ("fail unify" <+> ppTerm Unqualified 0 e1))
(RecType xs,RecType ys) | xs == ys -> return g
- _ -> Bad (render (text "fail unify" <+> ppTerm Unqualified 0 e1))
+ _ -> Bad (render ("fail unify" <+> ppTerm Unqualified 0 e1))
extend :: Unifier -> MetaId -> Term -> Err Unifier
extend g s t | (t == Meta s) = return g
- | occCheck s t = Bad (render (text "occurs check" <+> ppTerm Unqualified 0 t))
+ | occCheck s t = Bad (render ("occurs check" <+> ppTerm Unqualified 0 t))
| True = return ((s, t) : g)
subst_all :: Unifier -> Term -> Err Term