git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
more fixes
commit0fc343d6aed1721cda2b6a67db7c713be2db90b6 authorfaineance <faineance@users.noreply.github.com> dateFri 18 Mar 2016, 08:36 (11 years ago) parent0c5b8cc
3 files changed+6−7
src/Language/PureScript/TypeChecker/Monad.hs+1−2 tests/TestDocs.hs+4−4 tests/TestPscPublish.hs+1−1
src/Language/PureScript/TypeChecker/Monad.hs+1−2
@@ -224,8 +224,7 @@ runCheck = runCheck' initEnvironment
224224
225225-- | Run a computation in the typechecking monad, failing with an error, or succeeding with a return value and the final @Environment@.
226226runCheck' :: (Functor m) => Environment -> StateT CheckState m a -> m (a, Environment)
227−runCheck' env check = fmap (second checkEnv) $ runStateT check (emptyCheckState env)
228−
227+runCheck' env check = second checkEnv <$> runStateT check (emptyCheckState env)
229228-- | Make an assertion, failing with an error message
230229guardWith :: (MonadError e m) => e -> Bool -> m ()
231230guardWith _ True = return ()
tests/TestDocs.hs+4−4
@@ -35,10 +35,10 @@ main = do
3535 forM_ testCases $ \(P.moduleNameFromString -> mn, pragmas) ->
3636 let mdl = takeJust ("module not found in docs: " ++ P.runModuleName mn)
3737 (find ((==) mn . Docs.modName) pkgModules)
38− in forM_ pragmas (flip runAssertionIO mdl)
38+ in forM_ pragmas (`runAssertionIO` mdl)
3939
4040takeJust :: String -> Maybe a -> a
41−takeJust msg = maybe (error msg) id
41+takeJust msg = fromMaybe (error msg)
4242
4343data Assertion
4444 -- | Assert that a particular declaration is documented with the given
@@ -254,8 +254,8 @@ testCases =
254254
255255 , ("ExplicitTypeSignatures",
256256 [ ValueShouldHaveTypeSignature (n "ExplicitTypeSignatures") "explicit" (ShowFn (hasTypeVar "something"))
257− , ValueShouldHaveTypeSignature (n "ExplicitTypeSignatures") "anInt" (ShowFn ((==) P.tyInt))
258− , ValueShouldHaveTypeSignature (n "ExplicitTypeSignatures") "aNumber" (ShowFn ((==) P.tyNumber))
257+ , ValueShouldHaveTypeSignature (n "ExplicitTypeSignatures") "anInt" (ShowFn (P.tyInt ==))
258+ , ValueShouldHaveTypeSignature (n "ExplicitTypeSignatures") "aNumber" (ShowFn (P.tyNumber ==))
259259 ])
260260 ]
261261
tests/TestPscPublish.hs+1−1
@@ -62,5 +62,5 @@ testPackage dir = do
6262 pure ()
6363 other -> do
6464 putStrLn ("psc-publish tests failed on " ++ dir ++ ":")
65− putStrLn (show other)
65+ print other
6666 exitFailure