mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-10-29 02:13:18 -06:00
The new Decimal API
This commit is contained in:
1 parent
58da8deca8
commit
fb398c603e
147 files changed
+918
-188
No files matched your search
@@ -1,4 +1,4 @@
|
||||
concrete NumeralHun of Numeral = CatHun [Numeral,Digits] **
|
||||
concrete NumeralHun of Numeral = CatHun [Numeral,Digits,Decimal] **
|
||||
open Prelude, ResHun in {
|
||||
|
||||
lincat
|
||||
@@ -115,6 +115,13 @@ oper
|
||||
D_8 = mkDig "8" ;
|
||||
D_9 = mkDig "9" ;
|
||||
|
||||
PosDecimal d = d ** {hasDot=False} ;
|
||||
NegDecinal d = {
|
||||
s = \\x => "-" ++ BIND ++ d.s ! x ;
|
||||
n = numNumber ;
|
||||
hasDot=False
|
||||
} ;
|
||||
|
||||
oper
|
||||
mkDig : Str -> TDigit = \s -> {
|
||||
s = s ;
|
||||
|
||||
Reference in new issue
Block a user