aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/lux/codata/state.lux3
-rw-r--r--source/lux/meta/syntax.lux5
2 files changed, 5 insertions, 3 deletions
diff --git a/source/lux/codata/state.lux b/source/lux/codata/state.lux
index ec0a6bf63..de7220a45 100644
--- a/source/lux/codata/state.lux
+++ b/source/lux/codata/state.lux
@@ -12,7 +12,8 @@
(-> s (, s a)))
## [Structures]
-(defstruct #export State/Functor (Functor State)
+(defstruct #export State/Functor (All [s]
+ (Functor (State s)))
(def (map f ma)
(lambda [state]
(let [[state' a] (ma state)]
diff --git a/source/lux/meta/syntax.lux b/source/lux/meta/syntax.lux
index ee5a37d53..4ee3163b0 100644
--- a/source/lux/meta/syntax.lux
+++ b/source/lux/meta/syntax.lux
@@ -183,13 +183,14 @@
(def #export (|^ p1 p2 tokens)
(All [a b]
- (-> (Parser a) (Parser b) (Parser (Either b))))
+ (-> (Parser a) (Parser b) (Parser (Either a b))))
(case (p1 tokens)
(#;Some [tokens' x1]) (#;Some [tokens' (#;Left x1)])
#;None (run-parser (do Parser/Monad
[x2 p2]
(wrap (#;Right x2)))
- tokens)))
+ tokens)
+ ))
(def #export (||^ ps tokens)
(All [a]