# HG changeset patch # User wenzelm # Date 1601501478 -7200 # Node ID e7284278796b4bc70597eafd8fd15a3edebc038f # Parent 7d3a96acae287ea0f9c3d90e6196a1ce38b5b1bd clarified signature; diff -r 7d3a96acae28 -r e7284278796b src/Pure/System/isabelle_platform.scala --- a/src/Pure/System/isabelle_platform.scala Wed Sep 30 23:08:57 2020 +0200 +++ b/src/Pure/System/isabelle_platform.scala Wed Sep 30 23:31:18 2020 +0200 @@ -35,6 +35,8 @@ })) } } + + lazy val self: Isabelle_Platform = apply() } class Isabelle_Platform private(val settings: List[(String, String)]) @@ -49,9 +51,17 @@ val ISABELLE_WINDOWS_PLATFORM32: String = get("ISABELLE_WINDOWS_PLATFORM32") val ISABELLE_WINDOWS_PLATFORM64: String = get("ISABELLE_WINDOWS_PLATFORM64") - val is_linux: Boolean = ISABELLE_PLATFORM_FAMILY == "linux" - val is_macos: Boolean = ISABELLE_PLATFORM_FAMILY == "macos" - val is_windows: Boolean = ISABELLE_PLATFORM_FAMILY == "windows" + def is_intel: Boolean = + ISABELLE_PLATFORM32.startsWith("x86-") || + ISABELLE_PLATFORM64.startsWith("x86_64-") + + def is_arm: Boolean = + ISABELLE_PLATFORM32.startsWith("arm32-") || + ISABELLE_PLATFORM64.startsWith("arm64-") + + def is_linux: Boolean = ISABELLE_PLATFORM_FAMILY == "linux" + def is_macos: Boolean = ISABELLE_PLATFORM_FAMILY == "macos" + def is_windows: Boolean = ISABELLE_PLATFORM_FAMILY == "windows" override def toString: String = ISABELLE_PLATFORM_FAMILY }