Idris2/libs/contrib/Control/Delayed.idr

15 lines
354 B
Idris
Raw Normal View History

2021-05-22 18:51:47 +03:00
||| Utilities functions for conditionally delaying values.
2020-05-18 15:59:07 +03:00
module Control.Delayed
||| Type-level function for a conditionally infinite type.
public export
inf : Bool -> Type -> Type
inf False t = t
inf True t = Inf t
||| Type-level function for a conditionally lazy type.
public export
lazy : Bool -> Type -> Type
lazy False t = t
lazy True t = Lazy t