Source/Packages

Compiler.DependentCore

packages/compiler/src/Compiler/DependentCore.alpha

12,943 lines498 declarations489.0 KiBSHA-256 ef207b0de796

def · lines 6710–6737

reduceCoreBytesLength

Full file
6710def reduceCoreBytesLength : (pi unrestricted argument : (family CoreTerm) . (family CoreTerm)) =
6711  (lambda unrestricted argument : (family CoreTerm) .
6712    (eliminate
6713      CoreLiteralInspection
6714      (lambda unrestricted inspection : (family CoreLiteralInspection) . (family CoreTerm))
6715      (inspectCoreLiteral argument)
6716      (branch
6717        CoreNaturalInspected
6718        value
6719        .
6720        (corePrimitiveApplication (constructor CorePrimitive CoreBytesLength) argument))
6721      (branch
6722        CoreByteInspected
6723        value
6724        .
6725        (corePrimitiveApplication (constructor CorePrimitive CoreBytesLength) argument))
6726      (branch
6727        CoreBytesInspected
6728        value
6729        .
6730        (constructor
6731          CoreTerm
6732          CoreNaturalLiteral
6733          (Compiler.NaturalMagnitudeArithmetic/magnitudeFromNatural (bytes-length value))))
6734      (branch
6735        CoreNotLiteral
6736        .
6737        (corePrimitiveApplication (constructor CorePrimitive CoreBytesLength) argument))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.