check quantites of subject and global

- subj qty must be 0 or 1 (atkey)
- global must not be 0 if used at non-0
This commit is contained in:
rhiannon morris 2022-04-27 22:57:56 +02:00
parent 468c3a4c6a
commit 9e76bcc765
3 changed files with 56 additions and 27 deletions

View file

@ -70,3 +70,14 @@ IsQty Qty where
zero = Zero; one = One
(+) = plus; (*) = times
(<=.) = compat
public export
data IsSubj : Qty -> Type where
SZero : IsSubj Zero
SOne : IsSubj One
public export
data IsGlobal : Qty -> Type where
GZero : IsGlobal Zero
GAny : IsGlobal Any