This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeFamilies, UndecidableInstances, KindSignatures, DataKinds, TypeOperators, GADTs, RankNTypes, PolyKinds #-} | |
import Data.Kind | |
import Data.Type.Equality | |
data Nat = Z | S Nat | |
data SNat :: Nat -> Type where | |
SZ :: SNat Z | |
SS :: SNat n -> SNat (S n) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds | |
, ScopedTypeVariables | |
, TypeApplications | |
, TypeFamilies | |
, PolyKinds | |
, StandaloneKindSignatures | |
#-} | |
module MaybeBug where |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE GADTs | |
, KindSignatures | |
, DataKinds | |
, PolyKinds | |
, TypeFamilies | |
#-} | |
import GHC.TypeLits hiding (Nat) | |
-- | Store a dict saying that one symbol is smaller than another |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.function.Function; | |
// This is only actually a proof of anything if you assume that null doesn't | |
// exist, and that all functions are pure and terminate | |
public class WeakDNE { | |
// False has no values | |
public static final class False { | |
private final Absurd absurdFun; | |
// Helper interface to encode rank 2 type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Minimal where | |
open import Agda.Builtin.Nat renaming (Nat to ℕ) | |
open import Agda.Primitive | |
open import Agda.Builtin.Bool | |
open import Agda.Builtin.Equality | |
open import Agda.Builtin.Sigma | |
infixr 2 _×_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Combinators where | |
open import Agda.Builtin.Nat renaming (Nat to ℕ) | |
open import Agda.Primitive | |
open import Agda.Builtin.Bool | |
open import Agda.Builtin.Equality | |
open import Agda.Builtin.Sigma | |
renaming (fst to proj₁; snd to proj₂) | |
hiding (module Σ) | |
module Σ = Agda.Builtin.Sigma.Σ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open import Agda.Builtin.Sigma | |
open import Agda.Builtin.Equality | |
lemma : ∀ {a b} {A : Set a} {B : A → Set b} {x x' : A} {p p' : B} | |
→ (x , p) ≡ (x' , p') → ((x ≡ x') , (p ≡ p')) | |
lemma = ? | |
{- | |
Checking Test (/home/user/agda/combinators/Test.agda). | |
/home/user/agda/combinators/Test.agda:4,64-65 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TooLong where | |
open import Agda.Builtin.Nat renaming (Nat to ℕ) | |
open import Agda.Primitive | |
open import Agda.Builtin.Bool | |
open import Agda.Builtin.Equality | |
data SK : Set where | |
S : SK | |
K : SK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS_GHC -Wall -Wno-unticked-promoted-constructors #-} | |
{-# LANGUAGE Haskell2010 | |
, TypeFamilies | |
, DataKinds | |
, PolyKinds | |
, RankNTypes | |
, TypeOperators | |
, TemplateHaskell | |
, GADTs | |
, ScopedTypeVariables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE EmptyCase #-} |