diff options
author | Guillaume Melquiond <guillaume.melquiond@inria.fr> | 2015-12-22 22:35:09 +0100 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@inria.fr> | 2015-12-22 22:35:09 +0100 |
commit | 602badcad9deec9224b78cd1e1033af30358ef2e (patch) | |
tree | e528188a52c4120fa94a5e0ff2c035874dee75cf /checker/safe_typing.ml | |
parent | d55676344c8dc0d9a87b2ef12ec2348281db4bf5 (diff) |
Do not compose "str" and "to_string" whenever possible.
For instance, calling only Id.print is faster than calling both str and
Id.to_string, since the latter performs a copy. It also makes the code a
bit simpler to read.
Diffstat (limited to 'checker/safe_typing.ml')
-rw-r--r-- | checker/safe_typing.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/checker/safe_typing.ml b/checker/safe_typing.ml index 81a3cc035..ee3305167 100644 --- a/checker/safe_typing.ml +++ b/checker/safe_typing.ml @@ -13,6 +13,8 @@ open Cic open Names open Environ +let pr_dirpath dp = str (DirPath.to_string dp) + (************************************************************************) (* * Global environment @@ -52,9 +54,9 @@ let check_engagement env (expected_impredicative_set,expected_type_in_type) = let report_clash f caller dir = let msg = - str "compiled library " ++ str(DirPath.to_string caller) ++ + str "compiled library " ++ pr_dirpath caller ++ spc() ++ str "makes inconsistent assumptions over library" ++ spc() ++ - str(DirPath.to_string dir) ++ fnl() in + pr_dirpath dir ++ fnl() in f msg |