mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-17 00:10:31 +03:00
13 lines
236 B
Idris
13 lines
236 B
Idris
%default total
|
|
|
|
data Singleton : {a : Type} -> a -> Type where
|
|
Val : (x : a) -> Singleton x
|
|
|
|
-- data constructors
|
|
f : Singleton (MkPair True) -> Bool
|
|
f (Val _) = True
|
|
|
|
-- type constructors
|
|
g : Singleton Maybe -> Bool
|
|
g (Val _) = True
|