Debian Codegraph @

src/Data/Wrap.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Turn a relation into a record definition so as to remember the things
5 -- being related.
6 -- This module has a readme file: README.Data.Wrap
7 ------------------------------------------------------------------------
8
9 {-# OPTIONS --cubical-compatible --safe #-}
10
11 module Data.Wrap where
12
13 open import Data.Product.Nary.NonDependent
14 open import Function.Nary.NonDependent
15 open import Level using (Level)
16 open import Relation.Nary
17
18 private
19 variable
20 ℓ : Level
21
22 record Wrap′ {n} {ls} {A : Sets n ls} (F : A ⇉ Set ℓ) (xs : Product n A)
23 : Set ℓ where
24 constructor [_]
25 field
26 get : uncurryₙ n F xs
27
28 open Wrap′ public
29
30 Wrap : ∀ {n ls} {A : Sets n ls} → A ⇉ Set ℓ → A ⇉ Set ℓ
31 Wrap {n = n} F = curryₙ n (Wrap′ F)