git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Working
commit3241629241b4fc02e581cd76b1ce83a4ed84961f authorBenjamin Kovach] <bkovach5@uga.edu> dateSat 2 Aug 2014, 10:14 (12 years ago) parent0692ca0
20 files changed+1179−2
.psci_modules/node_modules/Control.Monad.Eff.Unsafe/externs.purs+5 .psci_modules/node_modules/Control.Monad.Eff.Unsafe/index.js+6 .psci_modules/node_modules/Control.Monad.Eff/externs.purs+17 .psci_modules/node_modules/Control.Monad.Eff/index.js+48 .psci_modules/node_modules/Control.Monad.ST/externs.purs+16 .psci_modules/node_modules/Control.Monad.ST/index.js+22 .psci_modules/node_modules/Data.Eq/externs.purs+7 .psci_modules/node_modules/Data.Eq/index.js+41 .psci_modules/node_modules/Data.Function/externs.purs+37 .psci_modules/node_modules/Data.Function/index.js+58 .psci_modules/node_modules/Debug.Trace/externs.purs+7 .psci_modules/node_modules/Debug.Trace/index.js+12 .psci_modules/node_modules/Main/externs.purs+4 .psci_modules/node_modules/Main/index.js+8 .psci_modules/node_modules/Prelude.Unsafe/externs.purs+4 .psci_modules/node_modules/Prelude.Unsafe/index.js+6 .psci_modules/node_modules/Prelude/externs.purs+126 .psci_modules/node_modules/Prelude/index.js+736 psci/Main.hs+18−1 psci/Parser.hs+1−1
.psci_modules/node_modules/Control.Monad.Eff.Unsafe/externs.pursnew file+5
@@ -0,0 +1,5 @@
1+module Control.Monad.Eff.Unsafe where
2+import Prim ()
3+import Prelude ()
4+import Control.Monad.Eff ()
5+foreign import unsafeInterleaveEff :: forall eff1 eff2 a. Control.Monad.Eff.Eff eff1 a -> Control.Monad.Eff.Eff eff2 a
.psci_modules/node_modules/Control.Monad.Eff.Unsafe/index.jsnew file+6
@@ -0,0 +1,6 @@
1+"use strict";
2+var Prelude = require("Prelude");
3+function unsafeInterleaveEff(f) { return f;};
4+module.exports = {
5+ unsafeInterleaveEff: unsafeInterleaveEff
6+};
.psci_modules/node_modules/Control.Monad.Eff/externs.pursnew file+17
@@ -0,0 +1,17 @@
1+module Control.Monad.Eff where
2+import Prim ()
3+import Prelude ()
4+type Pure a = forall e. Control.Monad.Eff.Eff e a
5+foreign import data Eff :: # ! -> * -> *
6+foreign import foreachE :: forall e a. [a] -> (a -> Control.Monad.Eff.Eff e Prelude.Unit) -> Control.Monad.Eff.Eff e Prelude.Unit
7+foreign import forE :: forall e. Prim.Number -> Prim.Number -> (Prim.Number -> Control.Monad.Eff.Eff e Prelude.Unit) -> Control.Monad.Eff.Eff e Prelude.Unit
8+foreign import whileE :: forall e a. Control.Monad.Eff.Eff e Prim.Boolean -> Control.Monad.Eff.Eff e a -> Control.Monad.Eff.Eff e Prelude.Unit
9+foreign import untilE :: forall e. Control.Monad.Eff.Eff e Prim.Boolean -> Control.Monad.Eff.Eff e Prelude.Unit
10+foreign import runPure :: forall a. Control.Monad.Eff.Pure a -> a
11+foreign import bindE :: forall e a b. Control.Monad.Eff.Eff e a -> (a -> Control.Monad.Eff.Eff e b) -> Control.Monad.Eff.Eff e b
12+foreign import returnE :: forall e a. a -> Control.Monad.Eff.Eff e a
13+foreign import instance functorEff :: Prelude.Functor (Control.Monad.Eff.Eff e)
14+foreign import instance applyEff :: Prelude.Apply (Control.Monad.Eff.Eff e)
15+foreign import instance applicativeEff :: Prelude.Applicative (Control.Monad.Eff.Eff e)
16+foreign import instance bindEff :: Prelude.Bind (Control.Monad.Eff.Eff e)
17+foreign import instance monadEff :: Prelude.Monad (Control.Monad.Eff.Eff e)
.psci_modules/node_modules/Control.Monad.Eff/index.jsnew file+48
@@ -0,0 +1,48 @@
1+"use strict";
2+var Prelude = require("Prelude");
3+function returnE(a) { return function() { return a; };};
4+function bindE(a) { return function(f) { return function() { return f(a())(); }; };};
5+function runPure(f) { return f();};
6+function untilE(f) { return function() { while (!f()) { } return {}; };};
7+function whileE(f) { return function(a) { return function() { while (f()) { a(); } return {}; }; };};
8+function forE(lo) { return function(hi) { return function(f) { return function() { for (var i = lo; i < hi; i++) { f(i)(); } }; }; };};
9+function foreachE(as) { return function(f) { return function() { for (var i = 0; i < as.length; i++) { f(as[i])(); } }; };};
10+var applicativeEff = function (_) {
11+ return new Prelude.Applicative(function (_) {
12+ return applyEff({});
13+ }, returnE);
14+};
15+var applyEff = function (_) {
16+ return new Prelude.Apply(Prelude.ap(monadEff({})), function (_) {
17+ return functorEff({});
18+ });
19+};
20+var monadEff = function (_) {
21+ return new Prelude.Monad(function (_) {
22+ return applicativeEff({});
23+ }, function (_) {
24+ return bindEff({});
25+ });
26+};
27+var bindEff = function (_) {
28+ return new Prelude.Bind(bindE, function (_) {
29+ return applyEff({});
30+ });
31+};
32+var functorEff = function (_) {
33+ return new Prelude.Functor(Prelude.liftA1(applicativeEff({})));
34+};
35+module.exports = {
36+ foreachE: foreachE,
37+ forE: forE,
38+ whileE: whileE,
39+ untilE: untilE,
40+ runPure: runPure,
41+ bindE: bindE,
42+ returnE: returnE,
43+ functorEff: functorEff,
44+ applyEff: applyEff,
45+ applicativeEff: applicativeEff,
46+ bindEff: bindEff,
47+ monadEff: monadEff
48+};
.psci_modules/node_modules/Control.Monad.ST/externs.pursnew file+16
@@ -0,0 +1,16 @@
1+module Control.Monad.ST where
2+import Prim ()
3+import Prelude ()
4+import Control.Monad.Eff ()
5+foreign import data STArray :: * -> * -> *
6+foreign import data STRef :: * -> * -> *
7+foreign import data ST :: * -> !
8+foreign import runSTArray :: forall a r. (forall h. Control.Monad.Eff.Eff (st :: Control.Monad.ST.ST h | r) (Control.Monad.ST.STArray h a)) -> Control.Monad.Eff.Eff r [a]
9+foreign import runST :: forall a r. (forall h. Control.Monad.Eff.Eff (st :: Control.Monad.ST.ST h | r) a) -> Control.Monad.Eff.Eff r a
10+foreign import pokeSTArray :: forall a h r. Control.Monad.ST.STArray h a -> Prim.Number -> a -> Control.Monad.Eff.Eff (st :: Control.Monad.ST.ST h | r) a
11+foreign import peekSTArray :: forall a h r. Control.Monad.ST.STArray h a -> Control.Monad.Eff.Eff (st :: Control.Monad.ST.ST h | r) a
12+foreign import newSTArray :: forall a h r. Prim.Number -> a -> Control.Monad.Eff.Eff (st :: Control.Monad.ST.ST h | r) (Control.Monad.ST.STArray h a)
13+foreign import writeSTRef :: forall a h r. Control.Monad.ST.STRef h a -> a -> Control.Monad.Eff.Eff (st :: Control.Monad.ST.ST h | r) a
14+foreign import modifySTRef :: forall a h r. Control.Monad.ST.STRef h a -> (a -> a) -> Control.Monad.Eff.Eff (st :: Control.Monad.ST.ST h | r) a
15+foreign import readSTRef :: forall a h r. Control.Monad.ST.STRef h a -> Control.Monad.Eff.Eff (st :: Control.Monad.ST.ST h | r) a
16+foreign import newSTRef :: forall a h r. a -> Control.Monad.Eff.Eff (st :: Control.Monad.ST.ST h | r) (Control.Monad.ST.STRef h a)
.psci_modules/node_modules/Control.Monad.ST/index.jsnew file+22
@@ -0,0 +1,22 @@
1+"use strict";
2+var Prelude = require("Prelude");
3+function newSTRef(val) { return function () { return { value: val }; };};
4+function readSTRef(ref) { return function() { return ref.value; };};
5+function modifySTRef(ref) { return function(f) { return function() { return ref.value = f(ref.value); }; };};
6+function writeSTRef(ref) { return function(a) { return function() { return ref.value = a; }; };};
7+function newSTArray(len) { return function(a) { return function() { var arr = []; for (var i = 0; i < len; i++) { arr[i] = a; }; return arr; }; };};
8+function peekSTArray(arr) { return function(i) { return function() { return arr[i]; }; };};
9+function pokeSTArray(arr) { return function(i) { return function(a) { return function() { return arr[i] = a; }; }; };};
10+function runST(f) { return f;};
11+function runSTArray(f) { return f;};
12+module.exports = {
13+ runSTArray: runSTArray,
14+ runST: runST,
15+ pokeSTArray: pokeSTArray,
16+ peekSTArray: peekSTArray,
17+ newSTArray: newSTArray,
18+ writeSTRef: writeSTRef,
19+ modifySTRef: modifySTRef,
20+ readSTRef: readSTRef,
21+ newSTRef: newSTRef
22+};
.psci_modules/node_modules/Data.Eq/externs.pursnew file+7
@@ -0,0 +1,7 @@
1+module Data.Eq where
2+import Prim ()
3+import Prelude ()
4+newtype Ref a = Ref a
5+foreign import liftRef :: forall a b. (a -> a -> b) -> Data.Eq.Ref a -> Data.Eq.Ref a -> b
6+foreign import instance eqRef :: Prelude.Eq (Data.Eq.Ref a)
7+foreign import instance functorRef :: Prelude.Functor Data.Eq.Ref
.psci_modules/node_modules/Data.Eq/index.jsnew file+41
@@ -0,0 +1,41 @@
1+"use strict";
2+var Prelude = require("Prelude");
3+var Ref = {
4+ create: function (value) {
5+ return value;
6+ }
7+};
8+var liftRef = function (_24) {
9+ return function (_25) {
10+ return function (_26) {
11+ return (function (_62, _63, _64) {
12+ var f = _62;
13+ var x = _63;
14+ var y = _64;
15+ return f(x)(y);
16+ throw new Error("Failed pattern match");
17+ })(_24, _25, _26);
18+ };
19+ };
20+};
21+var functorRef = function (_) {
22+ return new Prelude.Functor(function (_27) {
23+ return function (_28) {
24+ return (function (_65, _66) {
25+ var f = _65;
26+ var x = _66;
27+ return f(x);
28+ throw new Error("Failed pattern match");
29+ })(_27, _28);
30+ };
31+ });
32+};
33+var eqRef = function (_) {
34+ return new Prelude.Eq(liftRef(Prelude.refIneq), liftRef(Prelude.refEq));
35+};
36+module.exports = {
37+ Ref: Ref,
38+ liftRef: liftRef,
39+ eqRef: eqRef,
40+ functorRef: functorRef
41+};
.psci_modules/node_modules/Data.Function/externs.pursnew file+37
@@ -0,0 +1,37 @@
1+module Data.Function where
2+import Prim ()
3+import Prelude ()
4+foreign import data Fn10 :: * -> * -> * -> * -> * -> * -> * -> * -> * -> * -> * -> *
5+foreign import data Fn9 :: * -> * -> * -> * -> * -> * -> * -> * -> * -> * -> *
6+foreign import data Fn8 :: * -> * -> * -> * -> * -> * -> * -> * -> * -> *
7+foreign import data Fn7 :: * -> * -> * -> * -> * -> * -> * -> * -> *
8+foreign import data Fn6 :: * -> * -> * -> * -> * -> * -> * -> *
9+foreign import data Fn5 :: * -> * -> * -> * -> * -> * -> *
10+foreign import data Fn4 :: * -> * -> * -> * -> * -> *
11+foreign import data Fn3 :: * -> * -> * -> * -> *
12+foreign import data Fn2 :: * -> * -> * -> *
13+foreign import data Fn1 :: * -> * -> *
14+foreign import data Fn0 :: * -> *
15+foreign import runFn10 :: forall a b c d e f g h i j k. Data.Function.Fn10 a b c d e f g h i j k -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k
16+foreign import runFn9 :: forall a b c d e f g h i j. Data.Function.Fn9 a b c d e f g h i j -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j
17+foreign import runFn8 :: forall a b c d e f g h i. Data.Function.Fn8 a b c d e f g h i -> a -> b -> c -> d -> e -> f -> g -> h -> i
18+foreign import runFn7 :: forall a b c d e f g h. Data.Function.Fn7 a b c d e f g h -> a -> b -> c -> d -> e -> f -> g -> h
19+foreign import runFn6 :: forall a b c d e f g. Data.Function.Fn6 a b c d e f g -> a -> b -> c -> d -> e -> f -> g
20+foreign import runFn5 :: forall a b c d e f. Data.Function.Fn5 a b c d e f -> a -> b -> c -> d -> e -> f
21+foreign import runFn4 :: forall a b c d e. Data.Function.Fn4 a b c d e -> a -> b -> c -> d -> e
22+foreign import runFn3 :: forall a b c d. Data.Function.Fn3 a b c d -> a -> b -> c -> d
23+foreign import runFn2 :: forall a b c. Data.Function.Fn2 a b c -> a -> b -> c
24+foreign import runFn1 :: forall a b. Data.Function.Fn1 a b -> a -> b
25+foreign import runFn0 :: forall a. Data.Function.Fn0 a -> a
26+foreign import mkFn10 :: forall a b c d e f g h i j k. (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) -> Data.Function.Fn10 a b c d e f g h i j k
27+foreign import mkFn9 :: forall a b c d e f g h i j. (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) -> Data.Function.Fn9 a b c d e f g h i j
28+foreign import mkFn8 :: forall a b c d e f g h i. (a -> b -> c -> d -> e -> f -> g -> h -> i) -> Data.Function.Fn8 a b c d e f g h i
29+foreign import mkFn7 :: forall a b c d e f g h. (a -> b -> c -> d -> e -> f -> g -> h) -> Data.Function.Fn7 a b c d e f g h
30+foreign import mkFn6 :: forall a b c d e f g. (a -> b -> c -> d -> e -> f -> g) -> Data.Function.Fn6 a b c d e f g
31+foreign import mkFn5 :: forall a b c d e f. (a -> b -> c -> d -> e -> f) -> Data.Function.Fn5 a b c d e f
32+foreign import mkFn4 :: forall a b c d e. (a -> b -> c -> d -> e) -> Data.Function.Fn4 a b c d e
33+foreign import mkFn3 :: forall a b c d. (a -> b -> c -> d) -> Data.Function.Fn3 a b c d
34+foreign import mkFn2 :: forall a b c. (a -> b -> c) -> Data.Function.Fn2 a b c
35+foreign import mkFn1 :: forall a b. (a -> b) -> Data.Function.Fn1 a b
36+foreign import mkFn0 :: forall a. (Prelude.Unit -> a) -> Data.Function.Fn0 a
37+foreign import on :: forall a b c. (b -> b -> c) -> (a -> b) -> a -> a -> c
.psci_modules/node_modules/Data.Function/index.jsnew file+58
@@ -0,0 +1,58 @@
1+"use strict";
2+var Prelude = require("Prelude");
3+function mkFn0(fn) { return function() { return fn({}); };};
4+function mkFn1(fn) { return function(a) { return fn(a); };};
5+function mkFn2(fn) { return function(a, b) { return fn(a)(b); };};
6+function mkFn3(fn) { return function(a, b, c) { return fn(a)(b)(c); };};
7+function mkFn4(fn) { return function(a, b, c, d) { return fn(a)(b)(c)(d); };};
8+function mkFn5(fn) { return function(a, b, c, d, e) { return fn(a)(b)(c)(d)(e); };};
9+function mkFn6(fn) { return function(a, b, c, d, e, f) { return fn(a)(b)(c)(d)(e)(f); };};
10+function mkFn7(fn) { return function(a, b, c, d, e, f, g) { return fn(a)(b)(c)(d)(e)(f)(g); };};
11+function mkFn8(fn) { return function(a, b, c, d, e, f, g, h) { return fn(a)(b)(c)(d)(e)(f)(g)(h); };};
12+function mkFn9(fn) { return function(a, b, c, d, e, f, g, h, i) { return fn(a)(b)(c)(d)(e)(f)(g)(h)(i); };};
13+function mkFn10(fn) { return function(a, b, c, d, e, f, g, h, i, j) { return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j); };};
14+function runFn0(fn) { return fn();};
15+function runFn1(fn) { return function(a) { return fn(a); };};
16+function runFn2(fn) { return function(a) { return function(b) { return fn(a, b); }; };};
17+function runFn3(fn) { return function(a) { return function(b) { return function(c) { return fn(a, b, c); }; }; };};
18+function runFn4(fn) { return function(a) { return function(b) { return function(c) { return function(d) { return fn(a, b, c, d); }; }; }; };};
19+function runFn5(fn) { return function(a) { return function(b) { return function(c) { return function(d) { return function(e) { return fn(a, b, c, d, e); }; }; }; }; };};
20+function runFn6(fn) { return function(a) { return function(b) { return function(c) { return function(d) { return function(e) { return function(f) { return fn(a, b, c, d, e, f); }; }; }; }; }; };};
21+function runFn7(fn) { return function(a) { return function(b) { return function(c) { return function(d) { return function(e) { return function(f) { return function(g) { return fn(a, b, c, d, e, f, g); }; }; }; }; }; }; };};
22+function runFn8(fn) { return function(a) { return function(b) { return function(c) { return function(d) { return function(e) { return function(f) { return function(g) { return function(h) { return fn(a, b, c, d, e, f, g, h); }; }; }; }; }; }; }; };};
23+function runFn9(fn) { return function(a) { return function(b) { return function(c) { return function(d) { return function(e) { return function(f) { return function(g) { return function(h) { return function(i) { return fn(a, b, c, d, e, f, g, h, i); }; }; }; }; }; }; }; }; };};
24+function runFn10(fn) { return function(a) { return function(b) { return function(c) { return function(d) { return function(e) { return function(f) { return function(g) { return function(h) { return function(i) { return function(j) { return fn(a, b, c, d, e, f, g, h, i, j); }; }; }; }; }; }; }; }; }; };};
25+var on = function (f) {
26+ return function (g) {
27+ return function (x) {
28+ return function (y) {
29+ return f(g(x))(g(y));
30+ };
31+ };
32+ };
33+};
34+module.exports = {
35+ runFn10: runFn10,
36+ runFn9: runFn9,
37+ runFn8: runFn8,
38+ runFn7: runFn7,
39+ runFn6: runFn6,
40+ runFn5: runFn5,
41+ runFn4: runFn4,
42+ runFn3: runFn3,
43+ runFn2: runFn2,
44+ runFn1: runFn1,
45+ runFn0: runFn0,
46+ mkFn10: mkFn10,
47+ mkFn9: mkFn9,
48+ mkFn8: mkFn8,
49+ mkFn7: mkFn7,
50+ mkFn6: mkFn6,
51+ mkFn5: mkFn5,
52+ mkFn4: mkFn4,
53+ mkFn3: mkFn3,
54+ mkFn2: mkFn2,
55+ mkFn1: mkFn1,
56+ mkFn0: mkFn0,
57+ on: on
58+};
.psci_modules/node_modules/Debug.Trace/externs.pursnew file+7
@@ -0,0 +1,7 @@
1+module Debug.Trace where
2+import Prim ()
3+import Prelude ()
4+import Control.Monad.Eff ()
5+foreign import data Trace :: !
6+foreign import print :: forall a r. (Prelude.Show a) => a -> Control.Monad.Eff.Eff (trace :: Debug.Trace.Trace | r) Prelude.Unit
7+foreign import trace :: forall r. Prim.String -> Control.Monad.Eff.Eff (trace :: Debug.Trace.Trace | r) Prelude.Unit
.psci_modules/node_modules/Debug.Trace/index.jsnew file+12
@@ -0,0 +1,12 @@
1+"use strict";
2+var Prelude = require("Prelude");
3+function trace(s) { return function() { console.log(s); return {}; };};
4+var print = function (__dict_Show_0) {
5+ return function (o) {
6+ return trace(Prelude.show(__dict_Show_0)(o));
7+ };
8+};
9+module.exports = {
10+ print: print,
11+ trace: trace
12+};
.psci_modules/node_modules/Main/externs.pursnew file+4
@@ -0,0 +1,4 @@
1+module Main where
2+import Prim ()
3+import Prelude ()
4+foreign import it :: forall t1. t1 -> t1
.psci_modules/node_modules/Main/index.jsnew file+8
@@ -0,0 +1,8 @@
1+"use strict";
2+var Prelude = require("Prelude");
3+var it = function (x) {
4+ return x;
5+};
6+module.exports = {
7+ it: it
8+};
.psci_modules/node_modules/Prelude.Unsafe/externs.pursnew file+4
@@ -0,0 +1,4 @@
1+module Prelude.Unsafe where
2+import Prim ()
3+import Prelude ()
4+foreign import unsafeIndex :: forall a. [a] -> Prim.Number -> a
.psci_modules/node_modules/Prelude.Unsafe/index.jsnew file+6
@@ -0,0 +1,6 @@
1+"use strict";
2+var Prelude = require("Prelude");
3+function unsafeIndex(xs) { return function(n) { return xs[n]; };};
4+module.exports = {
5+ unsafeIndex: unsafeIndex
6+};
.psci_modules/node_modules/Prelude/externs.pursnew file+126
@@ -0,0 +1,126 @@
1+module Prelude where
2+import Prim ()
3+infixr 9 >>>
4+infixr 9 <<<
5+infixr 0 $
6+infixl 0 #
7+infixr 6 :
8+infixl 4 <$>
9+infixl 4 <*>
10+infixl 3 <|>
11+infixl 1 >>=
12+infixl 7 *
13+infixl 7 /
14+infixl 7 %
15+infixl 6 -
16+infixl 6 +
17+infix 4 ==
18+infix 4 /=
19+infixl 4 <
20+infixl 4 >
21+infixl 4 <=
22+infixl 4 >=
23+infixl 10 &
24+infixl 10 |
25+infixl 10 ^
26+infixr 2 ||
27+infixr 3 &&
28+infixr 5 <>
29+infixr 5 ++
30+newtype Unit = Unit { }
31+data Ordering = LT | GT | EQ
32+class Semigroup a where
33+ (<>) :: a -> a -> a
34+class BoolLike b where
35+ (&&) :: b -> b -> b
36+ (||) :: b -> b -> b
37+ not :: b -> b
38+class Bits b where
39+ (&) :: b -> b -> b
40+ (|) :: b -> b -> b
41+ (^) :: b -> b -> b
42+ shl :: b -> Prim.Number -> b
43+ shr :: b -> Prim.Number -> b
44+ zshr :: b -> Prim.Number -> b
45+ complement :: b -> b
46+class (Prelude.Eq a) <= Ord a where
47+ compare :: a -> a -> Prelude.Ordering
48+class Eq a where
49+ (==) :: a -> a -> Prim.Boolean
50+ (/=) :: a -> a -> Prim.Boolean
51+class Num a where
52+ (+) :: a -> a -> a
53+ (-) :: a -> a -> a
54+ (*) :: a -> a -> a
55+ (/) :: a -> a -> a
56+ (%) :: a -> a -> a
57+ negate :: a -> a
58+class (Prelude.Applicative m, Prelude.Bind m) <= Monad m where
59+class (Prelude.Apply m) <= Bind m where
60+ (>>=) :: forall a b. m a -> (a -> m b) -> m b
61+class Alternative f where
62+ empty :: forall a. f a
63+ (<|>) :: forall a. f a -> f a -> f a
64+class (Prelude.Apply f) <= Applicative f where
65+ pure :: forall a. a -> f a
66+class (Prelude.Functor f) <= Apply f where
67+ (<*>) :: forall a b. f (a -> b) -> f a -> f b
68+class Functor f where
69+ (<$>) :: forall a b. (a -> b) -> f a -> f b
70+class Show a where
71+ show :: a -> Prim.String
72+class (Prelude.Semigroupoid a) <= Category a where
73+ id :: forall t. a t t
74+class Semigroupoid a where
75+ (<<<) :: forall b c d. a c d -> a b c -> a b d
76+foreign import unit :: Prelude.Unit
77+foreign import (++) :: forall s. (Prelude.Semigroup s) => s -> s -> s
78+foreign import (>=) :: forall a. (Prelude.Ord a) => a -> a -> Prim.Boolean
79+foreign import (<=) :: forall a. (Prelude.Ord a) => a -> a -> Prim.Boolean
80+foreign import (>) :: forall a. (Prelude.Ord a) => a -> a -> Prim.Boolean
81+foreign import (<) :: forall a. (Prelude.Ord a) => a -> a -> Prim.Boolean
82+foreign import refIneq :: forall a. a -> a -> Prim.Boolean
83+foreign import refEq :: forall a. a -> a -> Prim.Boolean
84+foreign import ap :: forall m a b. (Prelude.Monad m) => m (a -> b) -> m a -> m b
85+foreign import liftM1 :: forall m a b. (Prelude.Monad m) => (a -> b) -> m a -> m b
86+foreign import return :: forall m a. (Prelude.Monad m) => a -> m a
87+foreign import liftA1 :: forall f a b. (Prelude.Applicative f) => (a -> b) -> f a -> f b
88+foreign import void :: forall f a. (Prelude.Functor f) => f a -> f Prelude.Unit
89+foreign import cons :: forall a. a -> [a] -> [a]
90+foreign import (:) :: forall a. a -> [a] -> [a]
91+foreign import (#) :: forall a b. a -> (a -> b) -> b
92+foreign import ($) :: forall a b. (a -> b) -> a -> b
93+foreign import (>>>) :: forall a b c d. (Prelude.Semigroupoid a) => a b c -> a c d -> a b d
94+foreign import asTypeOf :: forall a. a -> a -> a
95+foreign import const :: forall a b. a -> b -> a
96+foreign import flip :: forall a b c. (a -> b -> c) -> b -> a -> c
97+foreign import instance semigroupoidArr :: Prelude.Semigroupoid Prim.Function
98+foreign import instance categoryArr :: Prelude.Category Prim.Function
99+foreign import instance showUnit :: Prelude.Show Prelude.Unit
100+foreign import instance showString :: Prelude.Show Prim.String
101+foreign import instance showBoolean :: Prelude.Show Prim.Boolean
102+foreign import instance showNumber :: Prelude.Show Prim.Number
103+foreign import instance showArray :: (Prelude.Show a) => Prelude.Show [a]
104+foreign import instance functorArr :: Prelude.Functor (Prim.Function r)
105+foreign import instance applyArr :: Prelude.Apply (Prim.Function r)
106+foreign import instance applicativeArr :: Prelude.Applicative (Prim.Function r)
107+foreign import instance bindArr :: Prelude.Bind (Prim.Function r)
108+foreign import instance monadArr :: Prelude.Monad (Prim.Function r)
109+foreign import instance numNumber :: Prelude.Num Prim.Number
110+foreign import instance eqUnit :: Prelude.Eq Prelude.Unit
111+foreign import instance eqString :: Prelude.Eq Prim.String
112+foreign import instance eqNumber :: Prelude.Eq Prim.Number
113+foreign import instance eqBoolean :: Prelude.Eq Prim.Boolean
114+foreign import instance eqArray :: (Prelude.Eq a) => Prelude.Eq [a]
115+foreign import instance eqOrdering :: Prelude.Eq Prelude.Ordering
116+foreign import instance showOrdering :: Prelude.Show Prelude.Ordering
117+foreign import instance ordUnit :: Prelude.Ord Prelude.Unit
118+foreign import instance ordBoolean :: Prelude.Ord Prim.Boolean
119+foreign import instance ordNumber :: Prelude.Ord Prim.Number
120+foreign import instance ordString :: Prelude.Ord Prim.String
121+foreign import instance ordArray :: (Prelude.Ord a) => Prelude.Ord [a]
122+foreign import instance bitsNumber :: Prelude.Bits Prim.Number
123+foreign import instance boolLikeBoolean :: Prelude.BoolLike Prim.Boolean
124+foreign import instance semigroupUnit :: Prelude.Semigroup Prelude.Unit
125+foreign import instance semigroupString :: Prelude.Semigroup Prim.String
126+foreign import instance semigroupArr :: (Prelude.Semigroup s') => Prelude.Semigroup (s -> s')
.psci_modules/node_modules/Prelude/index.jsnew file+736
@@ -0,0 +1,736 @@
1+"use strict";
2+var Unit = {
3+ create: function (value) {
4+ return value;
5+ }
6+};
7+function LT() {
8+
9+};
10+LT.value = new LT();
11+function GT() {
12+
13+};
14+GT.value = new GT();
15+function EQ() {
16+
17+};
18+EQ.value = new EQ();
19+function Semigroupoid($less$less$less) {
20+ this["<<<"] = $less$less$less;
21+};
22+function Category(__superclass_Prelude$dotSemigroupoid_0, id) {
23+ this["__superclass_Prelude.Semigroupoid_0"] = __superclass_Prelude$dotSemigroupoid_0;
24+ this.id = id;
25+};
26+function Show(show) {
27+ this.show = show;
28+};
29+function Functor($less$dollar$greater) {
30+ this["<$>"] = $less$dollar$greater;
31+};
32+function Apply($less$times$greater, __superclass_Prelude$dotFunctor_0) {
33+ this["<*>"] = $less$times$greater;
34+ this["__superclass_Prelude.Functor_0"] = __superclass_Prelude$dotFunctor_0;
35+};
36+function Applicative(__superclass_Prelude$dotApply_0, pure) {
37+ this["__superclass_Prelude.Apply_0"] = __superclass_Prelude$dotApply_0;
38+ this.pure = pure;
39+};
40+function Alternative($less$bar$greater, empty) {
41+ this["<|>"] = $less$bar$greater;
42+ this.empty = empty;
43+};
44+function Bind($greater$greater$eq, __superclass_Prelude$dotApply_0) {
45+ this[">>="] = $greater$greater$eq;
46+ this["__superclass_Prelude.Apply_0"] = __superclass_Prelude$dotApply_0;
47+};
48+function Monad(__superclass_Prelude$dotApplicative_0, __superclass_Prelude$dotBind_1) {
49+ this["__superclass_Prelude.Applicative_0"] = __superclass_Prelude$dotApplicative_0;
50+ this["__superclass_Prelude.Bind_1"] = __superclass_Prelude$dotBind_1;
51+};
52+function Num($percent, $times, $plus, $minus, $div, negate) {
53+ this["%"] = $percent;
54+ this["*"] = $times;
55+ this["+"] = $plus;
56+ this["-"] = $minus;
57+ this["/"] = $div;
58+ this.negate = negate;
59+};
60+function Eq($div$eq, $eq$eq) {
61+ this["/="] = $div$eq;
62+ this["=="] = $eq$eq;
63+};
64+function Ord(__superclass_Prelude$dotEq_0, compare) {
65+ this["__superclass_Prelude.Eq_0"] = __superclass_Prelude$dotEq_0;
66+ this.compare = compare;
67+};
68+function Bits($amp, $up, complement, shl, shr, zshr, $bar) {
69+ this["&"] = $amp;
70+ this["^"] = $up;
71+ this.complement = complement;
72+ this.shl = shl;
73+ this.shr = shr;
74+ this.zshr = zshr;
75+ this["|"] = $bar;
76+};
77+function BoolLike($amp$amp, not, $bar$bar) {
78+ this["&&"] = $amp$amp;
79+ this.not = not;
80+ this["||"] = $bar$bar;
81+};
82+function Semigroup($less$greater) {
83+ this["<>"] = $less$greater;
84+};
85+function cons(e) { return function (l) { return [e].concat(l); };};
86+function showStringImpl(s) { return JSON.stringify(s);};
87+function showNumberImpl(n) { return n.toString();};
88+function showArrayImpl (f) { return function (xs) { var ss = []; for (var i = 0, l = xs.length; i < l; i++) { ss[i] = f(xs[i]); } return '[' + ss.join(',') + ']'; };};
89+function numAdd(n1) { return function(n2) { return n1 + n2; };};
90+function numSub(n1) { return function(n2) { return n1 - n2; };};
91+function numMul(n1) { return function(n2) { return n1 * n2; };};
92+function numDiv(n1) { return function(n2) { return n1 / n2; };};
93+function numMod(n1) { return function(n2) { return n1 % n2; };};
94+function numNegate(n) { return -n;};
95+function refEq(r1) { return function(r2) { return r1 === r2; };};
96+function refIneq(r1) { return function(r2) { return r1 !== r2; };};
97+function eqArrayImpl(f) { return function(xs) { return function(ys) { if (xs.length !== ys.length) return false; for (var i = 0; i < xs.length; i++) { if (!f(xs[i])(ys[i])) return false; } return true; }; };};
98+function unsafeCompareImpl(lt) { return function (eq) { return function (gt) { return function (x) { return function (y) { return x < y ? lt : x > y ? gt : eq; }; }; }; };};
99+function numShl(n1) { return function(n2) { return n1 << n2; };};
100+function numShr(n1) { return function(n2) { return n1 >> n2; };};
101+function numZshr(n1) { return function(n2) { return n1 >>> n2; };};
102+function numAnd(n1) { return function(n2) { return n1 & n2; };};
103+function numOr(n1) { return function(n2) { return n1 | n2; };};
104+function numXor(n1) { return function(n2) { return n1 ^ n2; };};
105+function numComplement(n) { return ~n;};
106+function boolAnd(b1) { return function(b2) { return b1 && b2; };};
107+function boolOr(b1) { return function(b2) { return b1 || b2; };};
108+function boolNot(b) { return !b;};
109+function concatString(s1) { return function(s2) { return s1 + s2; };};
110+var $bar$bar = function (dict) {
111+ return dict["||"];
112+};
113+var $bar = function (dict) {
114+ return dict["|"];
115+};
116+var $up = function (dict) {
117+ return dict["^"];
118+};
119+var $greater$greater$eq = function (dict) {
120+ return dict[">>="];
121+};
122+var $eq$eq = function (dict) {
123+ return dict["=="];
124+};
125+var $less$bar$greater = function (dict) {
126+ return dict["<|>"];
127+};
128+var $less$greater = function (dict) {
129+ return dict["<>"];
130+};
131+var $less$less$less = function (dict) {
132+ return dict["<<<"];
133+};
134+var $greater$greater$greater = function (__dict_Semigroupoid_0) {
135+ return function (f) {
136+ return function (g) {
137+ return $less$less$less(__dict_Semigroupoid_0)(g)(f);
138+ };
139+ };
140+};
141+var $less$times$greater = function (dict) {
142+ return dict["<*>"];
143+};
144+var $less$dollar$greater = function (dict) {
145+ return dict["<$>"];
146+};
147+var $colon = cons;
148+var $div$eq = function (dict) {
149+ return dict["/="];
150+};
151+var $div = function (dict) {
152+ return dict["/"];
153+};
154+var $minus = function (dict) {
155+ return dict["-"];
156+};
157+var $plus$plus = function (__dict_Semigroup_1) {
158+ return $less$greater(__dict_Semigroup_1);
159+};
160+var $plus = function (dict) {
161+ return dict["+"];
162+};
163+var $times = function (dict) {
164+ return dict["*"];
165+};
166+var $amp$amp = function (dict) {
167+ return dict["&&"];
168+};
169+var $amp = function (dict) {
170+ return dict["&"];
171+};
172+var $percent = function (dict) {
173+ return dict["%"];
174+};
175+var $dollar = function (f) {
176+ return function (x) {
177+ return f(x);
178+ };
179+};
180+var $hash = function (x) {
181+ return function (f) {
182+ return f(x);
183+ };
184+};
185+var zshr = function (dict) {
186+ return dict.zshr;
187+};
188+var unsafeCompare = unsafeCompareImpl(LT.value)(EQ.value)(GT.value);
189+var unit = {};
190+var shr = function (dict) {
191+ return dict.shr;
192+};
193+var showUnit = function (_) {
194+ return new Show(function (_7) {
195+ return (function (_29) {
196+ return "Unit {}";
197+ throw new Error("Failed pattern match");
198+ })(_7);
199+ });
200+};
201+var showString = function (_) {
202+ return new Show(showStringImpl);
203+};
204+var showOrdering = function (_) {
205+ return new Show(function (_15) {
206+ return (function (_30) {
207+ if (_30 instanceof LT) {
208+ return "LT";
209+ };
210+ if (_30 instanceof GT) {
211+ return "GT";
212+ };
213+ if (_30 instanceof EQ) {
214+ return "EQ";
215+ };
216+ throw new Error("Failed pattern match");
217+ })(_15);
218+ });
219+};
220+var showNumber = function (_) {
221+ return new Show(showNumberImpl);
222+};
223+var showBoolean = function (_) {
224+ return new Show(function (_8) {
225+ return (function (_31) {
226+ if (_31) {
227+ return "true";
228+ };
229+ if (!_31) {
230+ return "false";
231+ };
232+ throw new Error("Failed pattern match");
233+ })(_8);
234+ });
235+};
236+var show = function (dict) {
237+ return dict.show;
238+};
239+var showArray = function (__dict_Show_2) {
240+ return new Show(showArrayImpl(show(__dict_Show_2)));
241+};
242+var shl = function (dict) {
243+ return dict.shl;
244+};
245+var semigroupoidArr = function (_) {
246+ return new Semigroupoid(function (f) {
247+ return function (g) {
248+ return function (x) {
249+ return f(g(x));
250+ };
251+ };
252+ });
253+};
254+var semigroupUnit = function (_) {
255+ return new Semigroup(function (_22) {
256+ return function (_23) {
257+ return (function (_32, _33) {
258+ return {};
259+ throw new Error("Failed pattern match");
260+ })(_22, _23);
261+ };
262+ });
263+};
264+var semigroupString = function (_) {
265+ return new Semigroup(concatString);
266+};
267+var semigroupArr = function (__dict_Semigroup_3) {
268+ return new Semigroup(function (f) {
269+ return function (g) {
270+ return function (x) {
271+ return $less$greater(__dict_Semigroup_3)(f(x))(g(x));
272+ };
273+ };
274+ });
275+};
276+var pure = function (dict) {
277+ return dict.pure;
278+};
279+var $$return = function (__dict_Monad_4) {
280+ return pure(__dict_Monad_4["__superclass_Prelude.Applicative_0"]({}));
281+};
282+var numNumber = function (_) {
283+ return new Num(numMod, numMul, numAdd, numSub, numDiv, numNegate);
284+};
285+var not = function (dict) {
286+ return dict.not;
287+};
288+var negate = function (dict) {
289+ return dict.negate;
290+};
291+var liftM1 = function (__dict_Monad_5) {
292+ return function (f) {
293+ return function (a) {
294+ return $greater$greater$eq(__dict_Monad_5["__superclass_Prelude.Bind_1"]({}))(a)(function (_0) {
295+ return (function (_34) {
296+ var a$prime = _34;
297+ return $$return(__dict_Monad_5)(f(a$prime));
298+ throw new Error("Failed pattern match");
299+ })(_0);
300+ });
301+ };
302+ };
303+};
304+var liftA1 = function (__dict_Applicative_6) {
305+ return function (f) {
306+ return function (a) {
307+ return $less$times$greater(__dict_Applicative_6["__superclass_Prelude.Apply_0"]({}))(pure(__dict_Applicative_6)(f))(a);
308+ };
309+ };
310+};
311+var id = function (dict) {
312+ return dict.id;
313+};
314+var functorArr = function (_) {
315+ return new Functor($less$less$less(semigroupoidArr({})));
316+};
317+var flip = function (f) {
318+ return function (b) {
319+ return function (a) {
320+ return f(a)(b);
321+ };
322+ };
323+};
324+var eqUnit = function (_) {
325+ return new Eq(function (_11) {
326+ return function (_12) {
327+ return (function (_35, _36) {
328+ return false;
329+ throw new Error("Failed pattern match");
330+ })(_11, _12);
331+ };
332+ }, function (_9) {
333+ return function (_10) {
334+ return (function (_37, _38) {
335+ return true;
336+ throw new Error("Failed pattern match");
337+ })(_9, _10);
338+ };
339+ });
340+};
341+var ordUnit = function (_) {
342+ return new Ord(function (_) {
343+ return eqUnit({});
344+ }, function (_16) {
345+ return function (_17) {
346+ return (function (_39, _40) {
347+ return EQ.value;
348+ throw new Error("Failed pattern match");
349+ })(_16, _17);
350+ };
351+ });
352+};
353+var eqString = function (_) {
354+ return new Eq(refIneq, refEq);
355+};
356+var ordString = function (_) {
357+ return new Ord(function (_) {
358+ return eqString({});
359+ }, unsafeCompare);
360+};
361+var eqNumber = function (_) {
362+ return new Eq(refIneq, refEq);
363+};
364+var ordNumber = function (_) {
365+ return new Ord(function (_) {
366+ return eqNumber({});
367+ }, unsafeCompare);
368+};
369+var eqBoolean = function (_) {
370+ return new Eq(refIneq, refEq);
371+};
372+var ordBoolean = function (_) {
373+ return new Ord(function (_) {
374+ return eqBoolean({});
375+ }, function (_18) {
376+ return function (_19) {
377+ return (function (_41, _42) {
378+ if (!_41) {
379+ if (!_42) {
380+ return EQ.value;
381+ };
382+ };
383+ if (!_41) {
384+ if (_42) {
385+ return LT.value;
386+ };
387+ };
388+ if (_41) {
389+ if (_42) {
390+ return EQ.value;
391+ };
392+ };
393+ if (_41) {
394+ if (!_42) {
395+ return GT.value;
396+ };
397+ };
398+ throw new Error("Failed pattern match");
399+ })(_18, _19);
400+ };
401+ });
402+};
403+var empty = function (dict) {
404+ return dict.empty;
405+};
406+var $$const = function (_3) {
407+ return function (_4) {
408+ return (function (_43, _44) {
409+ var a = _43;
410+ return a;
411+ throw new Error("Failed pattern match");
412+ })(_3, _4);
413+ };
414+};
415+var $$void = function (__dict_Functor_8) {
416+ return function (fa) {
417+ return $less$dollar$greater(__dict_Functor_8)($$const(unit))(fa);
418+ };
419+};
420+var complement = function (dict) {
421+ return dict.complement;
422+};
423+var compare = function (dict) {
424+ return dict.compare;
425+};
426+var $less = function (__dict_Ord_10) {
427+ return function (a1) {
428+ return function (a2) {
429+ return (function (_45) {
430+ if (_45 instanceof LT) {
431+ return true;
432+ };
433+ return false;
434+ throw new Error("Failed pattern match");
435+ })(compare(__dict_Ord_10)(a1)(a2));
436+ };
437+ };
438+};
439+var $less$eq = function (__dict_Ord_11) {
440+ return function (a1) {
441+ return function (a2) {
442+ return (function (_46) {
443+ if (_46 instanceof GT) {
444+ return false;
445+ };
446+ return true;
447+ throw new Error("Failed pattern match");
448+ })(compare(__dict_Ord_11)(a1)(a2));
449+ };
450+ };
451+};
452+var $greater = function (__dict_Ord_12) {
453+ return function (a1) {
454+ return function (a2) {
455+ return (function (_47) {
456+ if (_47 instanceof GT) {
457+ return true;
458+ };
459+ return false;
460+ throw new Error("Failed pattern match");
461+ })(compare(__dict_Ord_12)(a1)(a2));
462+ };
463+ };
464+};
465+var $greater$eq = function (__dict_Ord_13) {
466+ return function (a1) {
467+ return function (a2) {
468+ return (function (_48) {
469+ if (_48 instanceof LT) {
470+ return false;
471+ };
472+ return true;
473+ throw new Error("Failed pattern match");
474+ })(compare(__dict_Ord_13)(a1)(a2));
475+ };
476+ };
477+};
478+var categoryArr = function (_) {
479+ return new Category(function (_) {
480+ return semigroupoidArr({});
481+ }, function (x) {
482+ return x;
483+ });
484+};
485+var boolLikeBoolean = function (_) {
486+ return new BoolLike(boolAnd, boolNot, boolOr);
487+};
488+var eqArray = function (__dict_Eq_7) {
489+ return new Eq(function (xs) {
490+ return function (ys) {
491+ return not(boolLikeBoolean({}))($eq$eq(eqArray(__dict_Eq_7))(xs)(ys));
492+ };
493+ }, function (xs) {
494+ return function (ys) {
495+ return eqArrayImpl($eq$eq(__dict_Eq_7))(xs)(ys);
496+ };
497+ });
498+};
499+var ordArray = function (__dict_Ord_9) {
500+ return new Ord(function (_) {
501+ return eqArray(__dict_Ord_9["__superclass_Prelude.Eq_0"]({}));
502+ }, function (_20) {
503+ return function (_21) {
504+ return (function (_49, _50) {
505+ if (_49.length === 0) {
506+ if (_50.length === 0) {
507+ return EQ.value;
508+ };
509+ };
510+ if (_49.length === 0) {
511+ return LT.value;
512+ };
513+ if (_50.length === 0) {
514+ return GT.value;
515+ };
516+ if (_49.length > 0) {
517+ var _54 = _49[0];
518+ var _55 = _49.slice(1);
519+ var xs = _55;
520+ var x = _54;
521+ if (_50.length > 0) {
522+ var _52 = _50[0];
523+ var _53 = _50.slice(1);
524+ var ys = _53;
525+ var y = _52;
526+ return (function (_51) {
527+ if (_51 instanceof EQ) {
528+ return compare(ordArray(__dict_Ord_9))(xs)(ys);
529+ };
530+ var other = _51;
531+ return other;
532+ throw new Error("Failed pattern match");
533+ })(compare(__dict_Ord_9)(x)(y));
534+ };
535+ };
536+ throw new Error("Failed pattern match");
537+ })(_20, _21);
538+ };
539+ });
540+};
541+var eqOrdering = function (_) {
542+ return new Eq(function (x) {
543+ return function (y) {
544+ return not(boolLikeBoolean({}))($eq$eq(eqOrdering({}))(x)(y));
545+ };
546+ }, function (_13) {
547+ return function (_14) {
548+ return (function (_56, _57) {
549+ if (_56 instanceof LT) {
550+ if (_57 instanceof LT) {
551+ return true;
552+ };
553+ };
554+ if (_56 instanceof GT) {
555+ if (_57 instanceof GT) {
556+ return true;
557+ };
558+ };
559+ if (_56 instanceof EQ) {
560+ if (_57 instanceof EQ) {
561+ return true;
562+ };
563+ };
564+ var _ = _56;
565+ return false;
566+ throw new Error("Failed pattern match");
567+ })(_13, _14);
568+ };
569+ });
570+};
571+var bitsNumber = function (_) {
572+ return new Bits(numAnd, numXor, numComplement, numShl, numShr, numZshr, numOr);
573+};
574+var asTypeOf = function (_5) {
575+ return function (_6) {
576+ return (function (_58, _59) {
577+ var x = _58;
578+ return x;
579+ throw new Error("Failed pattern match");
580+ })(_5, _6);
581+ };
582+};
583+var applyArr = function (_) {
584+ return new Apply(function (f) {
585+ return function (g) {
586+ return function (x) {
587+ return f(x)(g(x));
588+ };
589+ };
590+ }, function (_) {
591+ return functorArr({});
592+ });
593+};
594+var bindArr = function (_) {
595+ return new Bind(function (m) {
596+ return function (f) {
597+ return function (x) {
598+ return f(m(x))(x);
599+ };
600+ };
601+ }, function (_) {
602+ return applyArr({});
603+ });
604+};
605+var applicativeArr = function (_) {
606+ return new Applicative(function (_) {
607+ return applyArr({});
608+ }, $$const);
609+};
610+var monadArr = function (_) {
611+ return new Monad(function (_) {
612+ return applicativeArr({});
613+ }, function (_) {
614+ return bindArr({});
615+ });
616+};
617+var ap = function (__dict_Monad_14) {
618+ return function (f) {
619+ return function (a) {
620+ return $greater$greater$eq(__dict_Monad_14["__superclass_Prelude.Bind_1"]({}))(f)(function (_2) {
621+ return (function (_60) {
622+ var f$prime = _60;
623+ return $greater$greater$eq(__dict_Monad_14["__superclass_Prelude.Bind_1"]({}))(a)(function (_1) {
624+ return (function (_61) {
625+ var a$prime = _61;
626+ return $$return(__dict_Monad_14)(f$prime(a$prime));
627+ throw new Error("Failed pattern match");
628+ })(_1);
629+ });
630+ throw new Error("Failed pattern match");
631+ })(_2);
632+ });
633+ };
634+ };
635+};
636+module.exports = {
637+ Unit: Unit,
638+ LT: LT,
639+ GT: GT,
640+ EQ: EQ,
641+ Semigroup: Semigroup,
642+ BoolLike: BoolLike,
643+ Bits: Bits,
644+ Ord: Ord,
645+ Eq: Eq,
646+ Num: Num,
647+ Monad: Monad,
648+ Bind: Bind,
649+ Alternative: Alternative,
650+ Applicative: Applicative,
651+ Apply: Apply,
652+ Functor: Functor,
653+ Show: Show,
654+ Category: Category,
655+ Semigroupoid: Semigroupoid,
656+ unit: unit,
657+ "++": $plus$plus,
658+ "<>": $less$greater,
659+ not: not,
660+ "||": $bar$bar,
661+ "&&": $amp$amp,
662+ complement: complement,
663+ zshr: zshr,
664+ shr: shr,
665+ shl: shl,
666+ "^": $up,
667+ "|": $bar,
668+ "&": $amp,
669+ ">=": $greater$eq,
670+ "<=": $less$eq,
671+ ">": $greater,
672+ "<": $less,
673+ compare: compare,
674+ refIneq: refIneq,
675+ refEq: refEq,
676+ "/=": $div$eq,
677+ "==": $eq$eq,
678+ negate: negate,
679+ "%": $percent,
680+ "/": $div,
681+ "*": $times,
682+ "-": $minus,
683+ "+": $plus,
684+ ap: ap,
685+ liftM1: liftM1,
686+ "return": $$return,
687+ ">>=": $greater$greater$eq,
688+ "<|>": $less$bar$greater,
689+ empty: empty,
690+ liftA1: liftA1,
691+ pure: pure,
692+ "<*>": $less$times$greater,
693+ "void": $$void,
694+ "<$>": $less$dollar$greater,
695+ show: show,
696+ cons: cons,
697+ ":": $colon,
698+ "#": $hash,
699+ "$": $dollar,
700+ id: id,
701+ ">>>": $greater$greater$greater,
702+ "<<<": $less$less$less,
703+ asTypeOf: asTypeOf,
704+ "const": $$const,
705+ flip: flip,
706+ semigroupoidArr: semigroupoidArr,
707+ categoryArr: categoryArr,
708+ showUnit: showUnit,
709+ showString: showString,
710+ showBoolean: showBoolean,
711+ showNumber: showNumber,
712+ showArray: showArray,
713+ functorArr: functorArr,
714+ applyArr: applyArr,
715+ applicativeArr: applicativeArr,
716+ bindArr: bindArr,
717+ monadArr: monadArr,
718+ numNumber: numNumber,
719+ eqUnit: eqUnit,
720+ eqString: eqString,
721+ eqNumber: eqNumber,
722+ eqBoolean: eqBoolean,
723+ eqArray: eqArray,
724+ eqOrdering: eqOrdering,
725+ showOrdering: showOrdering,
726+ ordUnit: ordUnit,
727+ ordBoolean: ordBoolean,
728+ ordNumber: ordNumber,
729+ ordString: ordString,
730+ ordArray: ordArray,
731+ bitsNumber: bitsNumber,
732+ boolLikeBoolean: boolLikeBoolean,
733+ semigroupUnit: semigroupUnit,
734+ semigroupString: semigroupString,
735+ semigroupArr: semigroupArr
736+};
psci/Main.hs+18−1
@@ -24,6 +24,7 @@ import Control.Monad
2424import Control.Monad.Trans.Class
2525import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT)
2626import Control.Monad.Trans.State.Strict
27+import qualified Control.Monad.Trans.State.Lazy as L
2728import Control.Monad.Error (ErrorT(..), MonadError)
2829import Control.Monad.Error.Class (MonadError(..))
2930
@@ -300,7 +301,23 @@ handleTypeOf value = do
300301-- Takes a value and prints its kind
301302--
302303handleKindOf :: P.Value -> PSCI ()
303−handleKindOf value = outputStrLn "Command not yet implemented"
304+handleKindOf value = do
305+ st <- PSCI $ lift get
306+ let m = createTemporaryModule False st value
307+ modName = P.ModuleName [P.ProperName "Main"]
308+ e <- psciIO . runMake $ P.make modulesDir options (psciLoadedModules st ++ [("Main.purs", m)])
309+ case e of
310+ Left err -> PSCI $ outputStrLn err
311+ Right env' ->
312+ case M.lookup (modName, P.Ident "it") (P.names env') of
313+ Just (ty, _, _) -> do
314+ let st = P.CheckState env' 1 1 (Just modName)
315+ k = L.runStateT (P.unCheck (P.kindOf modName ty)) st
316+ case k of
317+ Left errStack -> PSCI . outputStrLn . P.prettyPrintErrorStack False $ errStack
318+ Right (kind, _) -> PSCI . outputStrLn . P.prettyPrintKind $ kind
319+ Nothing -> PSCI $ outputStrLn "Could not find kind"
320+
304321-- Commands
305322
306323-- |
psci/Parser.hs+1−1
@@ -42,7 +42,7 @@ psciLet = Let <$> (P.Let <$> (P.reserved "let" *> P.indented *> C.mark (many1 (C
4242--
4343parseCommand :: String -> Either ParseError Command
4444parseCommand = P.runIndentParser "" $ choice
45− [ P.whiteSpace *> char ':' *> (psciHelp <|> psciImport <|> psciLoadFile <|> psciQuit <|> psciReload <|> psciTypeOf)
45+ [ P.whiteSpace *> char ':' *> (psciHelp <|> psciImport <|> psciLoadFile <|> psciQuit <|> psciReload <|> psciTypeOf <|> psciKindOf)
4646 , try psciLet
4747 , psciExpression
4848 ] <* eof