24 lines
549 B
Idris
24 lines
549 B
Idris
module Quox.OPE.Cover
|
|
|
|
import Quox.OPE.Basics
|
|
import Quox.OPE.Length
|
|
import Quox.OPE.Sub
|
|
|
|
%default total
|
|
|
|
|
|
public export
|
|
data Cover_ : (overlap : Bool) -> xs `Sub` zs -> ys `Sub` zs -> Type where
|
|
CE : Cover_ ov End End
|
|
CL : Cover_ ov p q -> Cover_ ov (Keep p) (Drop q)
|
|
CR : Cover_ ov p q -> Cover_ ov (Drop p) (Keep q)
|
|
C2 : Cover_ ov p q -> Cover_ True (Keep p) (Keep q)
|
|
|
|
public export
|
|
Cover : xs `Sub` zs -> ys `Sub` zs -> Type
|
|
Cover = Cover_ True
|
|
|
|
public export
|
|
Partition : xs `Sub` zs -> ys `Sub` zs -> Type
|
|
Partition = Cover_ False
|
|
|