## Erratic hole type resolution

I recently found out that type holes combined with pattern matching on proofs provides a pretty nice Agda-like experience in Haskell. For example:

{-# LANGUAGE

DataKinds, PolyKinds, TypeFamilies, …

Technical knowledge for tech readers and developers

dependent-type

I recently found out that type holes combined with pattern matching on proofs provides a pretty nice Agda-like experience in Haskell. For example:

{-# LANGUAGE

DataKinds, PolyKinds, TypeFamilies, …

I am implementing a simple dependently-typed language, similar to the one described by Lennart Augustsson, while also using bound to manage bindings.

When typechecking a dependent lambda term, such …

I’m generalizing this n-ary complement to an n-ary compose, but I’m having trouble making the interface nice. Namely, I can’t figure out how to use numeric literals at the type level while still …

Dependent types are often advertised as a way to enable you to assert that a program is correct up to a specification. So, for example, you are asked to write a code that sorts a list – you are able …

In the Idris Effects library effects are represented as

||| This type is parameterised by:

||| + The return type of the computation.

||| + The input resource.

||| + The computation to run on the …

The following code is Idris:

natAssociative : (a : Nat) -> (b : Nat) -> (c : Nat) -> (a + b) + c = a + (b + c)

natAssociative Z b c = the (b + c = b + c) refl

natAssociative (S k) b c = …

I want to create a data structure to store items tagged on type level using Symbol. This:

data Store e (ss :: [Symbol]) where

Nil :: Store e ‘[]

Cons :: e s -> Store e ss -> Store e (s ‘: …

There is an Idris tutorial, an Agda tutorial and many other tutorial style papers and introductory material with never ending references to things yet to learn. I’m kind of crawling in the middle of …

I am new to dependent types and am confused about the difference between the two. It seems people usually say a type is parameterized by another type and indexed by some value. But isn’t there no …

Since the _+_-Operation for Nat is usually defined recursively in the first argument, its obviously non-trivial for the type-checker to know that i + 0 == i. However, I frequently run into this issue …