Skip to content

Commit

Permalink
Merge pull request #74 from purescript/0.11
Browse files Browse the repository at this point in the history
Updates for 0.11
  • Loading branch information
paf31 authored Apr 1, 2017
2 parents 0be116d + 057e348 commit cc9555a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions server/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import GHC.Generics (Generic)
import qualified Language.PureScript as P
import qualified Language.PureScript.Bundle as Bundle
import qualified Language.PureScript.CodeGen.JS as J
import qualified Language.PureScript.CodeGen.JS.Printer as P
import qualified Language.PureScript.CoreFn as CF
import qualified Language.PureScript.Errors.JSON as P
import qualified Language.PureScript.Interactive as I
Expand Down Expand Up @@ -105,13 +106,13 @@ server bundled externs initEnv port = do
Nothing -> Scotty.json $ A.object [ "error" .= ("Cannot parse type" :: Text) ]
Just ty -> do
let elabs = lookupAllConstructors initEnv ty
search = M.toList . TS.typeSearch (Just []) initEnv (P.emptyCheckState initEnv)
search = fst . TS.typeSearch (Just []) initEnv (P.emptyCheckState initEnv)
results = nubBy ((==) `on` fst) $ do
elab <- elabs
let strictMatches = search (replaceTypeVariablesAndDesugar (\nm s -> P.Skolem nm s (P.SkolemScope 0) Nothing) elab)
flexMatches = search (replaceTypeVariablesAndDesugar (const P.TUnknown) elab)
take 50 (strictMatches ++ flexMatches)
Scotty.json $ A.object [ "results" .= [ P.showQualified P.runIdent k
Scotty.json $ A.object [ "results" .= [ P.showQualified id k
| (k, _) <- take 50 results
]
]
Expand Down
3 changes: 2 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ flags: {}
packages:
- '.'
extra-deps:
- purescript-0.10.5
- purescript-0.11.1
- bower-json-1.0.0.1
- language-javascript-0.6.0.9
- optparse-applicative-0.13.2.0
- parsec-3.1.11
3 changes: 2 additions & 1 deletion staging/core/psc-package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "core",
"set": "psc-0.10.2",
"set": "psc-0.11.1",
"source": "https://github.com/purescript/package-sets.git",
"depends": [
"arrays",
Expand Down Expand Up @@ -45,6 +45,7 @@
"tailrec",
"transformers",
"tuples",
"typelevel-prelude",
"unfoldable",
"validation"
]
Expand Down
4 changes: 2 additions & 2 deletions trypurescript.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: trypurescript
version: 0.10.5
version: 0.11.1
cabal-version: >=1.8
build-type: Simple
license: BSD3
Expand All @@ -20,7 +20,7 @@ executable trypurescript
filepath -any,
Glob -any,
scotty -any,
purescript ==0.10.5,
purescript ==0.11.1,
containers -any,
http-types >= 0.8.5,
transformers ==0.4.*,
Expand Down

0 comments on commit cc9555a

Please sign in to comment.