diff --git a/server/Main.hs b/server/Main.hs index 7ecc8b46..4e487642 100644 --- a/server/Main.hs +++ b/server/Main.hs @@ -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 @@ -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 ] ] diff --git a/stack.yaml b/stack.yaml index daa0b481..2168e995 100644 --- a/stack.yaml +++ b/stack.yaml @@ -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 diff --git a/staging/core/psc-package.json b/staging/core/psc-package.json index 5444ab54..a755f151 100644 --- a/staging/core/psc-package.json +++ b/staging/core/psc-package.json @@ -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", @@ -45,6 +45,7 @@ "tailrec", "transformers", "tuples", + "typelevel-prelude", "unfoldable", "validation" ] diff --git a/trypurescript.cabal b/trypurescript.cabal index 490ba0d8..46706058 100644 --- a/trypurescript.cabal +++ b/trypurescript.cabal @@ -1,5 +1,5 @@ name: trypurescript -version: 0.10.5 +version: 0.11.1 cabal-version: >=1.8 build-type: Simple license: BSD3 @@ -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.*,