forked from GitHub/gf-core
two versions of optStr
This commit is contained in:
@@ -20,7 +20,8 @@ oper
|
|||||||
|
|
||||||
nonExist : Str = variants {} ;
|
nonExist : Str = variants {} ;
|
||||||
|
|
||||||
optStr : Str -> Str = \s -> variants {s ; []} ;
|
optStr : Str -> Str = \s -> variants {[] ; s} ;
|
||||||
|
strOpt : Str -> Str = \s -> variants {s ; []} ;
|
||||||
|
|
||||||
constTable : (A,B : Type) -> B -> A => B = \_,_,b -> \\_ => b ;
|
constTable : (A,B : Type) -> B -> A => B = \_,_,b -> \\_ => b ;
|
||||||
constStr : (A : Type) -> Str -> A => Str = \A -> constTable A Str ;
|
constStr : (A : Type) -> Str -> A => Str = \A -> constTable A Str ;
|
||||||
|
|||||||
Reference in New Issue
Block a user