diff --git a/.travis.yml b/.travis.yml index 97b5fac..2c606c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js dist: trusty sudo: required -node_js: 6 +node_js: stable install: - npm install -g bower - npm install diff --git a/README.md b/README.md index 0f9dea7..595d987 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # purescript-browserfeatures -[![Latest release](http://img.shields.io/bower/v/purescript-browserfeatures.svg)](https://github.com/slamdata/purescript-browserfeatures/releases) -[![Build Status](https://travis-ci.org/slamdata/purescript-browserfeatures.svg?branch=master)](https://travis-ci.org/slamdata/purescript-browserfeatures) -[![Dependency Status](https://www.versioneye.com/user/projects/579a398a3815c8003b2a6cb4/badge.svg?style=flat)](https://www.versioneye.com/user/projects/579a398a3815c8003b2a6cb4) +[![Latest release](http://img.shields.io/github/release/slamdata/purescript-browserfeatures.svg)](https://github.com/slamdata/purescript-browserfeatures/releases) +[![Build status](https://travis-ci.org/slamdata/purescript-browserfeatures.svg?branch=master)](https://travis-ci.org/slamdata/purescript-browserfeatures) A data type for browser features and detectors to test for the features. diff --git a/bower.json b/bower.json index 0f572d4..fecc538 100644 --- a/bower.json +++ b/bower.json @@ -14,13 +14,13 @@ ], "license": "Apache-2.0", "dependencies": { - "purescript-dom": "^2.0.0", - "purescript-exceptions": "^1.0.0", - "purescript-maps": "^1.1.0", - "purescript-prelude": "^1.0.1", - "purescript-refs": "^1.0.0" + "purescript-dom": "^3.1.0", + "purescript-exceptions": "^2.0.0", + "purescript-maps": "^2.0.1", + "purescript-prelude": "^2.1.0", + "purescript-refs": "^2.0.0" }, "devDependencies": { - "purescript-console": "^1.0.0" + "purescript-console": "^2.0.0" } } diff --git a/package.json b/package.json index a028af5..a437488 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,10 @@ "devDependencies": { "easyimage": "^2.1.0", "jscs": "^3.0.7", - "jshint": "^2.9.2", + "jshint": "^2.9.4", "pulp": "^9.0.1", "purescript-psa": "^0.3.9", - "purescript": "^0.9.2", + "purescript": "^0.10.1", "rimraf": "^2.5.4" } } diff --git a/src/DOM/BrowserFeatures/Detectors.purs b/src/DOM/BrowserFeatures/Detectors.purs index a863d56..e25ba47 100644 --- a/src/DOM/BrowserFeatures/Detectors.purs +++ b/src/DOM/BrowserFeatures/Detectors.purs @@ -34,14 +34,14 @@ type InputTypeMap = M.Map IT.InputType Boolean -- | effect. memoizeEff :: forall i e o. (Ord i) => (i -> Eff e o) -> i -> Eff e o memoizeEff f = - runPure <<< Unsafe.unsafeInterleaveEff $ do + runPure <<< Unsafe.unsafeCoerceEff $ do cacheRef <- newRef M.empty - pure \i -> Unsafe.unsafeInterleaveEff $ do + pure \i -> Unsafe.unsafeCoerceEff $ do cache <- readRef cacheRef case M.lookup i cache of Just o -> pure o Nothing -> do - o <- Unsafe.unsafeInterleaveEff $ f i + o <- Unsafe.unsafeCoerceEff $ f i modifyRef cacheRef (M.insert i o) pure o @@ -59,7 +59,7 @@ detectInputTypeSupport = pure $ ty == ty' detectInputTypeSupportMap :: forall e. Eff (dom :: DOM | e) InputTypeMap -detectInputTypeSupportMap = M.fromList <$> traverse (\t -> Tuple t <$> detectInputTypeSupport t) inputTypes +detectInputTypeSupportMap = M.fromFoldable <$> traverse (\t -> Tuple t <$> detectInputTypeSupport t) inputTypes where inputTypes :: L.List IT.InputType inputTypes = foldr L.Cons L.Nil IT.allInputTypes