{-# OPTIONS --safe --without-K #-}

module Prelude.Coercion where

open import Prelude.Level

record Coercion (A : Set ) (B : A  Set ℓ') : Set (  ℓ') where
  field
    ⇑_ : (x : A)  B x

  
open Coercion ⦃...⦄ public

Coercion' : (A : Set )  (B : Set ℓ')  Set (  ℓ')
Coercion' A B = Coercion A λ _  B

coerce_to_ : {A : Set }  (x : A)  (B : A  Set ℓ')   _ : Coercion A B   B x
coerce x to B =  x

coerce'_to_ : {A : Set }  (x : A)  (B : Set ℓ')   _ : Coercion' A B   B
coerce' x to B =  x