summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorInari Listenmaa <inari.listenmaa@gmail.com>2021-06-18 05:27:38 +0200
committerGitHub <noreply@github.com>2021-06-18 05:27:38 +0200
commit5a53a3824730d42d148fa840f6c821786dfa7c53 (patch)
treefdafa475aee0377593f3e5e3f88b54af09e89a4c /src
parenta7ab610f95563ee666f18480c613a912576dfcea (diff)
parent02671cafd0049f0793206a7d13c47a74e89ae2e8 (diff)
Merge pull request #114 from 1Regina/fix-tests
Fix tests
Diffstat (limited to 'src')
-rw-r--r--src/compiler/GF/Command/Commands.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs
index 0e5c61404..2f2e802e0 100644
--- a/src/compiler/GF/Command/Commands.hs
+++ b/src/compiler/GF/Command/Commands.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE FlexibleInstances, UndecidableInstances #-}
+{-# LANGUAGE FlexibleInstances, UndecidableInstances, CPP #-}
module GF.Command.Commands (
PGFEnv,HasPGFEnv(..),pgf,mos,pgfEnv,pgfCommands,
options,flags,
@@ -741,7 +741,7 @@ pgfCommands = Map.fromList [
Nothing -> do putStrLn ("unknown category of function identifier "++show id)
return void
[e] -> case inferExpr pgf e of
- Left tcErr -> error $ render (ppTcError tcErr)
+ Left tcErr -> errorWithoutStackTrace $ render (ppTcError tcErr)
Right (e,ty) -> do putStrLn ("Expression: "++showExpr [] e)
putStrLn ("Type: "++showType [] ty)
putStrLn ("Probability: "++show (probTree pgf e))
@@ -1019,3 +1019,7 @@ stanzas = map unlines . chop . lines where
chop ls = case break (=="") ls of
(ls1,[]) -> [ls1]
(ls1,_:ls2) -> ls1 : chop ls2
+
+#if !(MIN_VERSION_base(4,9,0))
+errorWithoutStackTrace = error
+#endif \ No newline at end of file