packages feed

egison 0.2.0.1 → 0.2.0.2

raw patch · 3 files changed

+2/−41 lines, 3 files

Files

Egison.hs view
@@ -11,7 +11,7 @@ main :: IO () main = do args <- getArgs           case length args of-              0 -> do flushStr "Egison, version 0.2.0.1 : http://hagi.is.s.u-tokyo.ac.jp/~egi/egison/\nWelcome to Egison Interpreter!\n"+              0 -> do flushStr "Egison, version 0.2.0.2 : http://hagi.is.s.u-tokyo.ac.jp/~egi/egison/\nWelcome to Egison Interpreter!\n"                       defsRef <- newIORef []                       runRepl defsRef               _ -> putStrLn "Program takes only 0 argument!"
egison.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version:             0.2.0.1+Version:             0.2.0.2  -- A short (one-line) description of the package. Synopsis:            An Interpreter for the Programming Language Egison
etc/sample/collection-test.egi view
@@ -430,12 +430,6 @@ (test (match-all {<x> <y> <z> <w>} (List Something)         [<join $hs <cons $x $ts>> [hs x ts]])) -(test (match-all {<x> <y> <z>} (Multiset Something)-        [<join $hs  $ts> [hs x ts]]))--(test (match-all {<x> <y> <z>} (Set Something)-        [<join $hs $ts> [hs ts]]))- (test ((remove-collection Suit) {<club> <heart> <diamond>} {<club> <diamond>}))  (test (subcollections {<x> <y> <z>}))@@ -464,36 +458,3 @@                     <card <heart> 1>                     <card <diamond> 3>})) --(define $Stick-  (lambda [$a]-    (type-      {[$var-match (lambda [$tgt] {tgt})]-       [$inductive-match-        (deconstructor-          {[nil []-            {[$tgt (match-all tgt (List a) [<nil> []])]-             }]-           [cons [a (List a)]-            {[$tgt {@(match-all tgt (List a) [<cons $x $xs> [x xs]])-                    @(match-all (reverse tgt) (List a) [<cons $x $xs> [x xs]])}]-             }]-           [join [(List a) (List a)]-            {[$tgt {@(match-all tgt (List a) [<join $xs $ys> [xs ys]])-                    @(match-all (reverse tgt) (List a) [<join $xs $ys> [xs ys]])}]-             }]-           })]-       [$equal? (lambda [$val $tgt]-                  (or ((type-ref (List a) equal?) val tgt)-                      ((type-ref (List a) equal?) val (reverse tgt))))]-       })))--(test (match-all {1 2 3} (Stick Int) [<cons $x $xs> [x xs]]))-(test (match-all {1 2 3} (Stick Int) [<join $xs $ys> [xs ys]]))-(test (match-all {1 2 3 4} (Stick Int) [<join $xs <cons $w $ys>> [xs w ys]]))-(test (match-all {1 2 3} (Stick Int) [,{3 2 1} <ok>]))---(test (match {1} (Multiset Int)-        {[<cons (where $n (lambda [$x] (= x 1))) <nil>> <ok>]-         [_ <not-ok>]}))