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 #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
import Data.Constraint | |
import Data.Function |
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 Zippy where | |
data Desc : Set₁ where | |
`σ : (A : Set) (d : A → Desc) → Desc | |
`r : Desc → Desc | |
`q : Desc | |
open import Size | |
open import Data.Unit | |
open import Data.Product |
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 Printf | |
import Lightyear.Char | |
import Lightyear.Core | |
import Lightyear.Combinators | |
import Lightyear.Strings | |
%access public export | |
%default total |
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 #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
-- We need undecidable instances for the definition of @Foldr@, | |
-- and @Domains@ and @CoDomain@ using @If@ for instance. |
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 Subst1 where | |
open import Term | |
infixl 20 _-_ | |
_-_ : {σ : Ty} → (Γ : Con) → Var Γ σ → Con | |
ε - () | |
(Γ , σ) - vz = Γ | |
(Γ , τ) - vs x = (Γ - x) , τ | |
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
record Default {ℓ} (A : Set ℓ) (a : A) : Set ℓ where | |
constructor _! | |
field value : A | |
instance | |
default : ∀ {ℓ} {A : Set ℓ} a → Default A a | |
default a = record { value = a } | |
open import Agda.Builtin.Nat |
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 List | |
let bind (xs : 'a list) (f : 'a -> 'b list) : 'b list = | |
concat (map f xs) | |
let rec parts : 'a list -> 'a list list list = function | |
| [] -> [[]] | |
| [c] -> [[[c]]] | |
| c :: cs -> | |
bind (parts cs) (fun (p :: ps) -> |
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 Compiled-252 where | |
data U : Set where | |
z : U | |
s : U → U | |
{-# IMPORT Compiled.URaw #-} | |
{-# COMPILED_DATA U Compiled.URaw.U Compiled.URaw.Z Compiled.URaw.S #-} |
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 KindSignatures #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE RankNTypes #-} | |
module ModularParser3 where | |
import Data.Function |
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 #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE ScopedTypeVariables #-} |