diff options
| author | Inari Listenmaa <inari.listenmaa@gmail.com> | 2021-06-18 05:27:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-18 05:27:38 +0200 |
| commit | 5a53a3824730d42d148fa840f6c821786dfa7c53 (patch) | |
| tree | fdafa475aee0377593f3e5e3f88b54af09e89a4c /src/compiler/GF/Command | |
| parent | a7ab610f95563ee666f18480c613a912576dfcea (diff) | |
| parent | 02671cafd0049f0793206a7d13c47a74e89ae2e8 (diff) | |
Merge pull request #114 from 1Regina/fix-tests
Fix tests
Diffstat (limited to 'src/compiler/GF/Command')
| -rw-r--r-- | src/compiler/GF/Command/Commands.hs | 8 |
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 |
