@@ -206,6 +206,8 @@ data Core (t :: Ty -> K.Type) (a :: Ty) where
206206 StrToIntBase :: t 'TyInteger -> t 'TyStr -> Core t 'TyInteger
207207 StrContains :: t 'TyStr -> t 'TyStr -> Core t 'TyBool
208208
209+ Enumerate :: t 'TyInteger -> t 'TyInteger -> t 'TyInteger -> Core t ('TyList 'TyInteger)
210+
209211 -- numeric ops
210212 Numerical :: Numerical t a -> Core t a
211213
@@ -721,6 +723,7 @@ showsPrecCore ty p core = showParen (p > 10) $ case core of
721723 StrToInt a -> showString " StrToInt " . showsTm 11 a
722724 StrToIntBase a b -> showString " StrToIntBase " . showsTm 11 a . showChar ' ' . showsTm 11 b
723725 StrContains a b -> showString " StrContains " . showsTm 11 a . showChar ' ' . showsTm 11 b
726+ Enumerate a b c -> showString " Enumerate " . showsTm 11 a . showChar ' ' . showsTm 11 b . showChar ' ' . showsTm 11 c
724727 Numerical a -> showString " Numerical " . showsNumerical ty 11 a
725728 IntAddTime a b -> showString " IntAddTime " . showsTm 11 a . showChar ' ' . showsTm 11 b
726729 DecAddTime a b -> showString " DecAddTime " . showsTm 11 a . showChar ' ' . showsTm 11 b
@@ -964,6 +967,7 @@ prettyCore ty = \case
964967 StrToIntBase b s -> parensSep [pretty SStringToInteger , prettyTm b, prettyTm s]
965968 StrContains needle haystack
966969 -> parensSep [pretty SContains , prettyTm needle, prettyTm haystack]
970+ Enumerate x y z -> parensSep [pretty SEnumerate , prettyTm x, prettyTm y, prettyTm z]
967971 Numerical tm -> prettyNumerical ty tm
968972 IntAddTime x y -> parensSep [pretty STemporalAddition , prettyTm x, prettyTm y]
969973 DecAddTime x y -> parensSep [pretty STemporalAddition , prettyTm x, prettyTm y]
@@ -1830,6 +1834,8 @@ propToInvariant (CoreProp core) = CoreInvariant <$> case core of
18301834 StrToIntBase <$> f tm1 <*> f tm2
18311835 StrContains tm1 tm2 ->
18321836 StrContains <$> f tm1 <*> f tm2
1837+ Enumerate tm1 tm2 tm3 ->
1838+ Enumerate <$> f tm1 <*> f tm2 <*> f tm3
18331839 Numerical num ->
18341840 Numerical <$> numF num
18351841 IntAddTime tm1 tm2 ->
0 commit comments