diff options
| author | aarne <aarne@chalmers.se> | 2009-06-22 15:39:08 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2009-06-22 15:39:08 +0000 |
| commit | e89fdae2fa1626348d8025824a7469252fa85e42 (patch) | |
| tree | c7d46bbd0494043b4bd6f917a25a7687517d0547 /next-lib/src/prelude/Predef.gf | |
| parent | 3049b59b35b25381a7c6787444165c200d66e08b (diff) | |
next-lib renamed to lib, lib to old-lib
Diffstat (limited to 'next-lib/src/prelude/Predef.gf')
| -rw-r--r-- | next-lib/src/prelude/Predef.gf | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/next-lib/src/prelude/Predef.gf b/next-lib/src/prelude/Predef.gf deleted file mode 100644 index d8141ea8c..000000000 --- a/next-lib/src/prelude/Predef.gf +++ /dev/null @@ -1,37 +0,0 @@ ---1 Predefined functions for concrete syntax - --- The definitions of these constants are hard-coded in GF, and defined --- in [AppPredefined.hs ../src/GF/Grammar/AppPredefined.hs]. Applying --- them to run-time variables leads to compiler errors that are often --- only detected at the code generation time. - -resource Predef = { - --- This type of booleans is for internal use only. - - param PBool = PTrue | PFalse ; - - oper Error : Type = variants {} ; -- the empty type - oper Int : Type = variants {} ; -- the type of integers - oper Ints : Int -> Type = variants {} ; -- the type of integers from 0 to n - - oper error : Str -> Error = variants {} ; -- forms error message - oper length : Tok -> Int = variants {} ; -- length of string - oper drop : Int -> Tok -> Tok = variants {} ; -- drop prefix of length - oper take : Int -> Tok -> Tok = variants {} ; -- take prefix of length - oper tk : Int -> Tok -> Tok = variants {} ; -- drop suffix of length - oper dp : Int -> Tok -> Tok = variants {} ; -- take suffix of length - oper eqInt : Int -> Int -> PBool = variants {} ; -- test if equal integers - oper lessInt: Int -> Int -> PBool = variants {} ; -- test order of integers - oper plus : Int -> Int -> Int = variants {} ; -- add integers - oper eqStr : Tok -> Tok -> PBool = variants {} ; -- test if equal strings - oper occur : Tok -> Tok -> PBool = variants {} ; -- test if occurs as substring - oper occurs : Tok -> Tok -> PBool = variants {} ; -- test if any char occurs - oper show : (P : Type) -> P -> Tok = variants {} ; -- convert param to string - oper read : (P : Type) -> Tok -> P = variants {} ; -- convert string to param - oper toStr : (L : Type) -> L -> Str = variants {} ; -- find the "first" string - oper mapStr : (L : Type) -> (Str -> Str) -> L -> L = variants {} ; - -- map all strings in a data structure; experimental --- - -} ; - |
