parsley-core-1.6.0.0: A fast parser combinator library backed by Typed Template Haskell
LicenseBSD-3-Clause
MaintainerJamie Willis
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Parsley.Internal.Backend.Analysis.Relevancy

Description

Exposes an analysis that can determine whether each of the values present on the stack for a given machine are actually used or not. This information may be useful in the future to calculate whether a register is "dead" or not.

Since: 1.5.0.0

Synopsis

Documentation

relevancy :: SingNat (Length xs) => Fix4 (Instr o) xs n r a -> Vec (Length xs) Bool Source #

Provides a conservative estimate on whether or not each of the elements of the stack on entry to a machine are actually used in the computation.

Since: 1.5.0.0

type family Length (xs :: [Type]) :: Nat where ... Source #

Computes the length of a type-level list. Used to index a Vec.

Since: 1.5.0.0

Equations

Length '[] = Zero 
Length (_ ': xs) = Succ (Length xs)