Skip to content

Commit

Permalink
refactor: simplify definitions/exports (#2480)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmckinna authored Sep 11, 2024
1 parent 9a5ec9f commit 577008e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Data/List/Relation/Unary/Unique/Propositional.agda
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
module Data.List.Relation.Unary.Unique.Propositional {a} {A : Set a} where

open import Relation.Binary.PropositionalEquality.Properties using (setoid)
open import Data.List.Relation.Unary.Unique.Setoid as SetoidUnique

------------------------------------------------------------------------
-- Re-export the contents of setoid uniqueness

open SetoidUnique (setoid A) public
open import Data.List.Relation.Unary.Unique.Setoid (setoid A) public

12 changes: 3 additions & 9 deletions src/Data/List/Relation/Unary/Unique/Setoid.agda
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,17 @@

{-# OPTIONS --cubical-compatible --safe #-}

open import Relation.Binary.Core using (Rel)
open import Relation.Binary.Bundles using (Setoid)
open import Relation.Nullary.Negation using (¬_)

module Data.List.Relation.Unary.Unique.Setoid {a ℓ} (S : Setoid a ℓ) where

open Setoid S renaming (Carrier to A)
open Setoid S using (_≉_)

------------------------------------------------------------------------
-- Definition

private
Distinct : Rel A ℓ
Distinct x y = ¬ (x ≈ y)

open import Data.List.Relation.Unary.AllPairs.Core Distinct public
open import Data.List.Relation.Unary.AllPairs.Core _≉_ public
renaming (AllPairs to Unique)

open import Data.List.Relation.Unary.AllPairs {R = Distinct} public
open import Data.List.Relation.Unary.AllPairs {R = _≉_} public
using (head; tail)

0 comments on commit 577008e

Please sign in to comment.