egison 2.0.3 → 2.0.4
raw patch · 5 files changed
+23/−40 lines, 5 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Language.Egison.Numerical: floatCeiling :: [EgisonVal] -> ThrowsError EgisonVal
- Language.Egison.Numerical: floatFloor :: [EgisonVal] -> ThrowsError EgisonVal
- Language.Egison.Numerical: floatRound :: [EgisonVal] -> ThrowsError EgisonVal
- Language.Egison.Numerical: floatTruncate :: [EgisonVal] -> ThrowsError EgisonVal
- Language.Egison.Numerical: numExpt :: [EgisonVal] -> ThrowsError EgisonVal
- Language.Egison.Numerical: numSqrt :: [EgisonVal] -> ThrowsError EgisonVal
+ Language.Egison.Numerical: floatRound, floatTruncate, floatCeiling, floatFloor :: [EgisonVal] -> ThrowsError EgisonVal
+ Language.Egison.Numerical: numSqrt, numExpt :: [EgisonVal] -> ThrowsError EgisonVal
Files
- egison.cabal +3/−3
- hs-src/Language/Egison/Core.hs +1/−1
- lib/core/base.egi +9/−33
- lib/core/collection.egi +3/−3
- sample/io-test.egi +7/−0
egison.cabal view
@@ -1,12 +1,12 @@ Name: egison-Version: 2.0.3+Version: 2.0.4 Synopsis: An Interpreter for the Programming Language Egison Description: An interpreter for the programming language Egison. A feature of Egison is the strong pattern match facility. With Egison, you can represent pattern matching for unfree data intuitively, especially for collection data, such as lists, multisets, sets, and so on.- This package include sample Egison program codes "*-test.egi" in "etc/sample/" directory.- This package also include Emacs Lisp file "egison-mode.el" in "etc/elisp/" directory.+ This package include sample Egison program codes "*-test.egi" in "sample/" directory.+ This package also include Emacs Lisp file "egison-mode.el" in "elisp/" directory. Homepage: http://hagi.is.s.u-tokyo.ac.jp/~egi/egison/ License: MIT License-file: LICENSE
hs-src/Language/Egison/Core.hs view
@@ -15,7 +15,7 @@ -- |egison version number egisonVersion :: String-egisonVersion = "2.0.3"+egisonVersion = "2.0.4" -- |A utility function to display the egison console banner showBanner :: IO ()
lib/core/base.egi view
@@ -4,47 +4,23 @@ (define $Something (type {[$var-match (lambda [$tgt] {tgt})]})) -(define $Bool- (type- {[$var-match (lambda [$tgt] {tgt})]- [$inductive-match- (destructor- {[true []- {[<true> {[]}]- [#t {[]}]- [_ {}]}]- [false []- {[<false> {[]}]- [#f {[]}]- [_ {}]}]})]- [$=- (lambda [$val $tgt]- (match [val tgt] [Bool Bool]- {[[<true> <true>] #t]- [[<true> #t] #t]- [[#t <true>] #t]- [[<false> <false>] #t]- [[<false> #f] #t]- [[#f <false>] #t]- [[_ _] <false>]}))]}))- (define $or (lambda [$b1 $b2]- (match b1 Bool- {[<true> #t]- [<false> b2]})))+ (if b1+ #t+ b2))) (define $and (lambda [$b1 $b2]- (match b1 Bool- {[<true> b2]- [<false> #f]})))+ (if b1+ b2+ #f))) (define $not (lambda [$b]- (match b Bool- {[<true> #f]- [<false> #t]})))+ (if b+ #f+ #t))) (define $Order (type
lib/core/collection.egi view
@@ -84,9 +84,9 @@ (define $add (lambda [$a] (lambda [$xs $x]- (match ((member? Integer) x xs) Bool- {[#t xs]- [#f {@xs x}]}))))+ (if ((member? Integer) x xs)+ xs+ {@xs x})))) (define $union (lambda [$a]
sample/io-test.egi view
@@ -55,6 +55,13 @@ :))) (define $main+ (lambda [$: $argv]+ (do {[$: (write-string : "output : ")]+ [$: (write : argv)]+ [$: (write-char : '\n')]}+ :)))++(define $main (lambda [$:] (do {[$: (print : "Return world? (y/n) : ")] [[$: $c] (read-char :)]}