Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #15 from garyb/0.10-updates
Browse files Browse the repository at this point in the history
Updates for PureScript 0.10
  • Loading branch information
garyb authored Nov 8, 2016
2 parents 649ee09 + 5e9c047 commit 7db9428
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
dist: trusty
sudo: required
node_js: 6
node_js: stable
install:
- npm install -g bower
- npm install
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
12 changes: 6 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
8 changes: 4 additions & 4 deletions src/DOM/BrowserFeatures/Detectors.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 7db9428

Please sign in to comment.