packages feed

egison 3.8.1 → 3.8.2

raw patch · 3 files changed

+18/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

egison.cabal view
@@ -1,5 +1,5 @@ Name:                egison-Version:             3.8.1+Version:             3.8.2 Synopsis:            Programming language with non-linear pattern-matching against non-free data Description:   An interpreter for Egison, a **pattern-matching-oriented**, purely functional programming language.
hs-src/Language/Egison.hs view
@@ -139,4 +139,5 @@   , "lib/core/io.egi"   , "lib/core/random.egi"   , "lib/core/string.egi"+  , "lib/core/maybe.egi"   ]
+ lib/core/maybe.egi view
@@ -0,0 +1,16 @@+;;;;;+;;;;;+;;;;; Maybe (Option)+;;;;;+;;;;;++(define $Nothing {})+(define $Just (lambda [$x] {x}))++(define $nothing (pattern-function [] <nil>))+(define $just (pattern-function [$pat] <cons pat _>))++(define $maybe (lambda [$a] (list a)))++;(match-all (Just 1) (maybe integer) [(nothing) "error"]) ; {}+;(match-all (Just 1) (maybe integer) [(just $x) x]) ; {1}