{-# OPTIONS --cubical-compatible #-}
module Test.Coercions where
open import Class.Prelude
open import Class.Coercions
π = β€ β β€
pattern π = injβ tt; pattern β = injβ tt
instance
βBool : π β Bool
βBool .to = Ξ» where
π β true
β β false
Boolβ : Bool β π
Boolβ .to = Ξ» where
true β π
false β β
_ : Bool
_ = to π
_ : π
_ = to true
_ : Bool β Bool
_ = not β to[ Bool ] β to[ π ]