Agda-2.5.2: A dependently typed functional programming language and proof assistant

Safe Haskell | None
Language | Haskell2010

Agda.Benchmarking

Contents

- Benchmarking in the IO monad.
- Orphan instances

Description

Agda-specific benchmarking structure.

Synopsis

- data Phase
  - = Parsing
  - | Import
  - | Deserialization
  - | Scoping
  - | Typing
  - | Termination
  - | Positivity
  - | Injectivity
  - | ProjectionLikeness
  - | Coverage
  - | Highlighting
  - | Serialization
  - | DeadCode
  - | Graph
  - | RecCheck
  - | Reduce
  - | Level
  - | Compare
  - | With
  - | ModuleName
  - | BuildInterface
  - | Sort
  - | BinaryEncode
  - | Compress
  - | Operators
  - | Free
  - | OccursCheck
  - | CheckLHS
  - | CheckRHS
  - | TypeSig
  - | UnifyIndices
  - | InverseScopeLookup
- type Benchmark = Benchmark Phase
- type Account = Account Phase
- benchmarks :: IORef Benchmark
- billToIO :: Account -> IO a -> IO a
- billToPure :: Account -> a -> a

# Documentation

data Phase #

Phases to allocate CPU time to.

Constructors

Parsing | Happy parsing and operator parsing.
Import | Import chasing.
Deserialization | Reading interface files.
Scoping | Scope checking and translation to abstract syntax.
Typing | Type checking and translation to internal syntax.
Termination | Termination checking.
Positivity | Positivity checking and polarity computation.
Injectivity | Injectivity checking.
ProjectionLikeness | Checking for projection likeness.
Coverage | Coverage checking and compilation to case trees.
Highlighting | Generating highlighting info.
Serialization | Writing interface files.
DeadCode | Deac code elimination.
Graph | Subphase for `Termination`.
RecCheck | Subphase for `Termination`.
Reduce | Subphase for `Termination`.
Level | Subphase for `Termination`.
Compare | Subphase for `Termination`.
With | Subphase for `Termination`.
ModuleName | Subphase for `Import`.
BuildInterface | Subphase for `Serialization`.
Sort | Subphase for `Serialization`.
BinaryEncode | Subphase for `Serialization`.
Compress | Subphase for `Serialization`.
Operators | Subphase for `Parsing`.
Free | Subphase for `Typing`: free variable computation.
OccursCheck | Subphase for `Typing`: occurs check for solving metas.
CheckLHS | Subphase for `Typing`: checking the LHS
CheckRHS | Subphase for `Typing`: checking the RHS
TypeSig | Subphase for `Typing`: checking a type signature
UnifyIndices | Subphase for `CheckLHS`: unification of the indices
InverseScopeLookup | Pretty printing names.

Instances

Bounded Phase # |
Methods minBound :: Phase # maxBound :: Phase #
Enum Phase # |
Methods succ :: Phase -> Phase # pred :: Phase -> Phase # toEnum :: Int -> Phase # fromEnum :: Phase -> Int # enumFrom :: Phase -> [Phase] # enumFromThen :: Phase -> Phase -> [Phase] # enumFromTo :: Phase -> Phase -> [Phase] # enumFromThenTo :: Phase -> Phase -> Phase -> [Phase] #
Eq Phase # |
Methods (==) :: Phase -> Phase -> Bool # (/=) :: Phase -> Phase -> Bool #
Ord Phase # |
Methods compare :: Phase -> Phase -> Ordering # (<) :: Phase -> Phase -> Bool # (<=) :: Phase -> Phase -> Bool # (>) :: Phase -> Phase -> Bool # (>=) :: Phase -> Phase -> Bool # max :: Phase -> Phase -> Phase # min :: Phase -> Phase -> Phase #
Show Phase # |
Methods showsPrec :: Int -> Phase -> ShowS # show :: Phase -> String # showList :: [Phase] -> ShowS #
Pretty Phase # |
Methods pretty :: Phase -> Doc # prettyPrec :: Int -> Phase -> Doc #
MonadBench Phase TCM # | We store benchmark statistics in an IORef. This enables benchmarking pure computation, see Agda.Benchmarking.
Methods getBenchmark :: TCM (Benchmark Phase) # getsBenchmark :: (Benchmark Phase -> c) -> TCM c # putBenchmark :: Benchmark Phase -> TCM () # modifyBenchmark :: (Benchmark Phase -> Benchmark Phase) -> TCM () # finally :: TCM b -> TCM c -> TCM b #
MonadBench Phase TerM # |
Methods getBenchmark :: TerM (Benchmark Phase) # getsBenchmark :: (Benchmark Phase -> c) -> TerM c # putBenchmark :: Benchmark Phase -> TerM () # modifyBenchmark :: (Benchmark Phase -> Benchmark Phase) -> TerM () # finally :: TerM b -> TerM c -> TerM b #

type Benchmark = Benchmark Phase #

type Account = Account Phase #

# Benchmarking in the IO monad.

benchmarks :: IORef Benchmark #

Global variable to store benchmark statistics.

billToIO :: Account -> IO a -> IO a #

Benchmark an IO computation and bill it to the given account.

billToPure :: Account -> a -> a #

Benchmark a pure computation and bill it to the given account.

# Orphan instances

MonadBench Phase IO # |
Methods getBenchmark :: IO (Benchmark Phase) # getsBenchmark :: (Benchmark Phase -> c) -> IO c # putBenchmark :: Benchmark Phase -> IO () # modifyBenchmark :: (Benchmark Phase -> Benchmark Phase) -> IO () # finally :: IO b -> IO c -> IO b #