Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleaned up examples, there isn't a Num JsNumber instance, so JavaScri…

…pt versions really work.
  • Loading branch information...
commit 6b41fe6c5f4f6bcfc31dda9d7b26ba2b11c80440 1 parent e46e951
@tomlokhorst authored
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/Main.hs
View
15 src/Main.hs
@@ -25,12 +25,15 @@ f g a b = g a a b
ok = f bool'
-- epicfail = f bool
--- hoi = maybee false (not_) (just true :: JsC1 JsMaybe (Js JsBool))
+hi = maybe false not
+ (just true :: P.Maybe P.Bool)
+ -- (just true :: JsC1 JsMaybe (Js JsBool))
--- yo = eitherr (*5) (const 2) (right false :: JsC2 JsEither (Js JsNumber) (Js JsBool))
+yo = either (P.* 5) (P.const 2)
+ (right false :: P.Either P.Int P.Bool)
+ -- (right false :: JsC2 JsEither (Js JsNumber) (Js JsBool))
--- even' :: (Js JsNumber) -> (Js JsBool)
--- even' x = false
-
--- ahh = tuple2 (\x y -> x `and_` even' y) (ctuple2 true 3 :: JsC2 JsTuple2 (Js JsBool) (Js JsNumber))
+ah = tuple2 (\x y -> x && P.const false y)
+ (ctuple2 true 3 :: (,) P.Bool P.Int)
+ -- (ctuple2 true 3 :: JsC2 JsTuple2 (Js JsBool) (Js JsNumber))
Please sign in to comment.
Something went wrong with that request. Please try again.