Fix typo in Singleton
authorGiuseppe Ottaviano <ott@fb.com>
Wed, 22 Mar 2017 23:02:41 +0000 (16:02 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 22 Mar 2017 23:06:45 +0000 (16:06 -0700)
Summary: The "l" in "Haskell" is not a singleton. Also, friends don't let friends rely on operator precedence.

Reviewed By: yfeldblum

Differential Revision: D4756653

fbshipit-source-id: 7b5360bfc1b26fac06062e4adbfae3a1e477c2dc

folly/Singleton.cpp

index 7d3eeac61cf377d8cce358251c227c48ddfd2e7d..07ec2666bad7cee294f5c097f9bc80b2289e6546 100644 (file)
@@ -38,11 +38,11 @@ namespace folly {
 SingletonVault::Type SingletonVault::defaultVaultType() {
 #if !defined(_WIN32) && !defined(__APPLE__) && !defined(__ANDROID__)
   bool isPython = dlsym(RTLD_DEFAULT, "Py_Main");
-  bool isHaskel = &::hs_init_weak || dlsym(RTLD_DEFAULT, "hs_init");
+  bool isHaskell = &::hs_init_weak || dlsym(RTLD_DEFAULT, "hs_init");
   bool isJVM = dlsym(RTLD_DEFAULT, "JNI_GetCreatedJavaVMs");
   bool isD = dlsym(RTLD_DEFAULT, "_d_run_main");
 
-  return isPython || isHaskel || isJVM || isD ? Type::Relaxed : Type::Strict;
+  return (isPython || isHaskell || isJVM || isD) ? Type::Relaxed : Type::Strict;
 #else
   return Type::Relaxed;
 #endif