Skip to content

Commit

Permalink
Proper interfaces / prelude
Browse files Browse the repository at this point in the history
- MetaPrelude~>Meta.Prelude
- Meta~>Meta.Init
  • Loading branch information
omelkonian committed Sep 13, 2024
1 parent 0f49baa commit d55da1f
Show file tree
Hide file tree
Showing 36 changed files with 60 additions and 60 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: omelkonian/setup-agda@master
- uses: omelkonian/setup-agda@v2
with:
agda-version: 2.6.4
stdlib-version: 2.0
libraries: |
omelkonian/agda-stdlib-classes#v2.0
main: Main
agda-version: 2.7.0
stdlib-version: 2.1.1
libraries: omelkonian/agda-stdlib-classes#v2.1.1
main: standard-library-meta
deploy: ${{ github.ref == 'refs/heads/master' }}
token: ${{ secrets.GITHUB_TOKEN }}
ribbon: true
Expand Down
2 changes: 1 addition & 1 deletion Class/MonadError.agda
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

open import Level

open import MetaPrelude
open import Meta.Prelude

open import Class.Monad
open import Reflection using (TC; ErrorPart; typeError; catchTC; strErr)
Expand Down
2 changes: 1 addition & 1 deletion Class/MonadReader.agda
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Class.MonadReader where

open import MetaPrelude
open import Meta.Prelude

open import Class.Monad
open import Class.Functor
Expand Down
2 changes: 1 addition & 1 deletion Class/MonadTC.agda
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Class.MonadTC where

open import MetaPrelude
open import Meta.Prelude

open import Data.List using (map)

Expand Down
2 changes: 1 addition & 1 deletion Meta.agda → Meta/Init.agda
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# OPTIONS --safe --without-K #-}

module Meta where
module Meta.Init where

open import Reflection.Debug public
open import Reflection.TCI public
Expand Down
2 changes: 1 addition & 1 deletion MetaPrelude.agda → Meta/Prelude.agda
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# OPTIONS --safe --without-K #-}

module MetaPrelude where
module Meta.Prelude where

open import Level renaming (_⊔_ to _⊔ˡ_; suc to sucˡ; zero to zeroˡ) public
open import Function public
Expand Down
4 changes: 2 additions & 2 deletions Reflection/AlphaEquality.agda
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

module Reflection.AlphaEquality where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init
open import Relation.Nullary.Decidable using (⌊_⌋)
open import Relation.Binary using (DecidableEquality)

Expand Down
4 changes: 2 additions & 2 deletions Reflection/AntiUnification.agda
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

module Reflection.AntiUnification where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

import Data.Maybe as Maybe
import Data.Nat as Nat
Expand Down
2 changes: 1 addition & 1 deletion Reflection/Debug.agda
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Reflection.Debug where

open import MetaPrelude hiding (⊤; _∧_; _∨_; filter)
open import Meta.Prelude hiding (⊤; _∧_; _∨_; filter)

import Data.Bool as B
import Data.String as S
Expand Down
2 changes: 1 addition & 1 deletion Reflection/Syntax.agda
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Reflection.Syntax where

open import MetaPrelude
open import Meta.Prelude

open import Reflection.AST.Argument public
hiding (map)
Expand Down
2 changes: 1 addition & 1 deletion Reflection/TCI.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module Reflection.TCI where

open import MetaPrelude
open import Meta.Prelude

open import Data.List using (map)

Expand Down
4 changes: 2 additions & 2 deletions Reflection/Tactic.agda
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module Reflection.Tactic where
import Reflection as R
open import Class.Monad hiding (Monad-TC)
open import Class.MonadTC
open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

open MonadTC ⦃...⦄

Expand Down
4 changes: 2 additions & 2 deletions Reflection/Utils.agda
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{-# OPTIONS --safe --without-K #-}
module Reflection.Utils where

open import MetaPrelude
open import Meta hiding (toℕ)
open import Meta.Prelude
open import Meta.Init hiding (toℕ)

import Reflection.AST.Abstraction as Abs
import Reflection.AST.Name as Name
Expand Down
2 changes: 1 addition & 1 deletion Reflection/Utils/Debug.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{-# OPTIONS --safe --without-K #-}
module Reflection.Utils.Debug where

open import MetaPrelude
open import Meta.Prelude

import Data.String as Str
open import Data.Fin using (Fin)
Expand Down
4 changes: 2 additions & 2 deletions Reflection/Utils/TCI.agda
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# OPTIONS --safe --without-K #-}

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

open import Class.Monad
open import Class.MonadError.Instances
Expand Down
4 changes: 2 additions & 2 deletions Tactic/AnyOf.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

module Tactic.AnyOf where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

open import Reflection.Utils.TCI
open import Reflection.Tactic
Expand Down
6 changes: 3 additions & 3 deletions Tactic/Assumption.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

module Tactic.Assumption where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

open import Class.Functor
open import Class.Monad
Expand Down Expand Up @@ -47,6 +47,6 @@ private
module Test where
test₁ : {A B : Set} A B A
test₁ a b = assumption

test₂ : {A B : Set} A B B
test₂ a b = assumption
4 changes: 2 additions & 2 deletions Tactic/ByEq.agda
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{-# OPTIONS --safe --without-K #-}
module Tactic.ByEq where

open import Meta hiding (TC)
open import MetaPrelude
open import Meta.Init hiding (TC)
open import Meta.Prelude
open import Class.Functor.Core; open import Class.Functor.Instances
open import Class.Monad.Core; open import Class.Monad.Instances
open import Reflection using (TC; withNormalisation; inferType; unify)
Expand Down
4 changes: 2 additions & 2 deletions Tactic/Case.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

module Tactic.Case where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

open import Data.List using (map)

Expand Down
4 changes: 2 additions & 2 deletions Tactic/ClauseBuilder.agda
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{-# OPTIONS --safe --without-K #-}
module Tactic.ClauseBuilder where

open import MetaPrelude hiding ([_,_])
open import Meta hiding (sort)
open import Meta.Prelude hiding ([_,_])
open import Meta.Init hiding (sort)

import Data.List.NonEmpty as NE
open import Data.List using (zipWith)
Expand Down
4 changes: 2 additions & 2 deletions Tactic/Constrs.agda
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

module Tactic.Constrs where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

open import Data.List

Expand Down
2 changes: 1 addition & 1 deletion Tactic/Defaults.agda
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# OPTIONS --safe --without-K #-}
module Tactic.Defaults where

open import MetaPrelude
open import Meta.Prelude

open import Class.MonadTC
open import Reflection.Debug
Expand Down
4 changes: 2 additions & 2 deletions Tactic/Derive.agda
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

{-# OPTIONS -v allTactics:100 #-}
{-# OPTIONS --safe --without-K #-}
open import Meta
open import Meta.Init

module Tactic.Derive (className : Name) (projName : Name) where

open import MetaPrelude
open import Meta.Prelude

open import Agda.Builtin.Reflection using () renaming (primShowQName to showName)

Expand Down
4 changes: 2 additions & 2 deletions Tactic/Derive/DecEq.agda
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
{-# OPTIONS --safe #-}
module Tactic.Derive.DecEq where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

import Data.List as L
import Data.List.NonEmpty as NE
Expand Down
4 changes: 2 additions & 2 deletions Tactic/Derive/Show.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
{-# OPTIONS --safe #-}
module Tactic.Derive.Show where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

open import Agda.Builtin.Reflection using (primShowQName)

Expand Down
5 changes: 3 additions & 2 deletions Tactic/Derive/TestTypes.agda
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
{-# OPTIONS -v allTactics:100 #-}
module Tactic.Derive.TestTypes where

open import MetaPrelude
open import Data.Fin
open import Meta

open import Meta.Prelude
open import Meta.Init

data E0 : Set where

Expand Down
2 changes: 1 addition & 1 deletion Tactic/EquationalReasoning.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module Tactic.EquationalReasoning where

open import MetaPrelude
open import Meta.Prelude

import Relation.Binary.PropositionalEquality as ≡
open import Agda.Builtin.Reflection
Expand Down
4 changes: 2 additions & 2 deletions Tactic/Eta.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

module Tactic.Eta where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

open import Data.List
open import Data.Fin
Expand Down
2 changes: 1 addition & 1 deletion Tactic/Existentials.agda
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Tactic.Existentials where

open import MetaPrelude
open import Meta.Prelude

open import Reflection hiding (_>>=_; _>>_; _≟_)
open import Reflection.Syntax
Expand Down
2 changes: 1 addition & 1 deletion Tactic/Extra.agda
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# OPTIONS -v extra:100 #-}
module Tactic.Extra where

open import MetaPrelude
open import Meta.Prelude

open import Data.Integer as Int using (ℤ)
open import Data.List using (List; drop; map; [_]; [])
Expand Down
4 changes: 2 additions & 2 deletions Tactic/Intro.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

module Tactic.Intro where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

open import Class.Monad
open import Class.MonadTC.Instances
Expand Down
2 changes: 1 addition & 1 deletion Tactic/J.agda
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ open import Meta

module Tactic.J (J-name refl-name : Name) where

open import MetaPrelude
open import Meta.Prelude

open import Class.Monad
open import Class.MonadError
Expand Down
4 changes: 2 additions & 2 deletions Tactic/ReduceDec.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

module Tactic.ReduceDec where

open import MetaPrelude
open import Meta
open import Meta.Prelude
open import Meta.Init

open import Reflection.Tactic
open import Reflection.Utils
Expand Down
2 changes: 1 addition & 1 deletion Tactic/Rewrite.agda
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# OPTIONS -v rewrite:100 #-}
module Tactic.Rewrite where

open import MetaPrelude hiding (_^_)
open import Meta.Prelude hiding (_^_)

open import Data.List.Membership.DecPropositional using (_∈?_)
open import Data.List.NonEmpty using (List⁺; _∷_)
Expand Down
2 changes: 1 addition & 1 deletion Tactic/Try.agda
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# OPTIONS -v try:100 #-}
module Tactic.Try where

open import MetaPrelude
open import Meta.Prelude

open import Data.List
open import Reflection hiding (_>>=_; _>>_; _≟_)
Expand Down
2 changes: 1 addition & 1 deletion Main.agda → standard-library-meta.agda
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Main where
module standard-library-meta where

open import Algebra.Function

Expand Down

0 comments on commit d55da1f

Please sign in to comment.