git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
final for now
commit0f8bef9913f8d3bb788a898f47bd31bce7974f51 authorBenjamin Kovach] <bkovach5@uga.edu> dateSat 2 Aug 2014, 17:33 (12 years ago) parent3241629
5 files changed+9−10
.gitignore+1 .psci_modules/node_modules/Main/externs.purs+1−1 .psci_modules/node_modules/Main/index.js+1−3 psci/Main.hs+5−5 src/Language/PureScript/TypeChecker/Kinds.hs+1−1
.gitignore+1
@@ -8,3 +8,4 @@ cabal.sandbox.config
88*.chs.h
99*.lksh*
1010.virthualenv
11+.psci_modules/
.psci_modules/node_modules/Main/externs.purs+1−1
@@ -1,4 +1,4 @@
11module Main where
22import Prim ()
33import Prelude ()
4−foreign import it :: forall t1. t1 -> t1
4+foreign import it :: { } -> Prelude.Unit
.psci_modules/node_modules/Main/index.js+1−3
@@ -1,8 +1,6 @@
11"use strict";
22var Prelude = require("Prelude");
3−var it = function (x) {
4− return x;
5−};
3+var it = Prelude.Unit.create;
64module.exports = {
75 it: it
86};
psci/Main.hs+5−5
@@ -303,16 +303,16 @@ handleTypeOf value = do
303303handleKindOf :: P.Value -> PSCI ()
304304handleKindOf value = do
305305 st <- PSCI $ lift get
306− let m = createTemporaryModule False st value
307− modName = P.ModuleName [P.ProperName "Main"]
306+ let m = createTemporaryModule False st value
307+ mName = P.ModuleName [P.ProperName "Main"]
308308 e <- psciIO . runMake $ P.make modulesDir options (psciLoadedModules st ++ [("Main.purs", m)])
309309 case e of
310310 Left err -> PSCI $ outputStrLn err
311311 Right env' ->
312− case M.lookup (modName, P.Ident "it") (P.names env') of
312+ case M.lookup (mName, P.Ident "it") (P.names env') of
313313 Just (ty, _, _) -> do
314− let st = P.CheckState env' 1 1 (Just modName)
315− k = L.runStateT (P.unCheck (P.kindOf modName ty)) st
314+ let st = P.CheckState env' 0 0 (Just mName)
315+ k = L.runStateT (P.unCheck (P.kindOf mName ty)) st
316316 case k of
317317 Left errStack -> PSCI . outputStrLn . P.prettyPrintErrorStack False $ errStack
318318 Right (kind, _) -> PSCI . outputStrLn . P.prettyPrintKind $ kind
src/Language/PureScript/TypeChecker/Kinds.hs+1−1
@@ -61,7 +61,7 @@ instance Unifiable Check Kind where
6161 k =?= KUnknown u = u =:= k
6262 Star =?= Star = return ()
6363 Bang =?= Bang = return ()
64− Row k1 =?= Row k2 = k1 =?= k2
64+ Row k1 =?= Row k2 = k1 =?= ks
6565 FunKind k1 k2 =?= FunKind k3 k4 = do
6666 k1 =?= k3
6767 k2 =?= k4