Skip to content

Updates for 0.11 #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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