From 38999d0f746a9939ef95d1a8178cb67607b76d0d Mon Sep 17 00:00:00 2001 From: Phil Freeman Date: Sat, 1 Apr 2017 10:58:55 -0700 Subject: [PATCH] Updates for 0.11 (#294) --- pursuit.cabal | 4 ++-- src/Handler/Search.hs | 2 +- src/TemplateHelpers.hs | 2 +- stack.yaml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pursuit.cabal b/pursuit.cabal index 605f563..cf9bc18 100644 --- a/pursuit.cabal +++ b/pursuit.cabal @@ -1,5 +1,5 @@ name: pursuit -version: 0.4.13 +version: 0.5.0 cabal-version: >= 1.8 build-type: Simple license: MIT @@ -99,7 +99,7 @@ library , containers , vector , time - , purescript >= 0.10.7 + , purescript >= 0.11.1 , bower-json >= 1.0.0.1 , blaze-builder , blaze-markup diff --git a/src/Handler/Search.hs b/src/Handler/Search.hs index 10264e3..163b161 100644 --- a/src/Handler/Search.hs +++ b/src/Handler/Search.hs @@ -145,7 +145,7 @@ searchForType ty = do typeComplexity :: P.Type -> Int typeComplexity (P.TypeApp a b) = 1 + typeComplexity a + typeComplexity b typeComplexity (P.ForAll _ t _) = 1 + typeComplexity t - typeComplexity (P.ConstrainedType cs t) = typeComplexity t + length cs + typeComplexity (P.ConstrainedType _ t) = typeComplexity t + 1 typeComplexity P.REmpty = 0 typeComplexity (P.RCons _ t r) = 1 + typeComplexity t + typeComplexity r typeComplexity (P.KindedType t _) = typeComplexity t diff --git a/src/TemplateHelpers.hs b/src/TemplateHelpers.hs index 8b8a4f0..a3a1d94 100644 --- a/src/TemplateHelpers.hs +++ b/src/TemplateHelpers.hs @@ -180,7 +180,7 @@ getHtmlRenderContext = do { currentModuleName = currentMn , buildDocLink = D.getLink linksContext currentMn , renderDocLink = renderUrl . docLinkRoute linksContext currentMn - , renderSourceLink = renderSourceLink' linksContext + , renderSourceLink = Just . renderSourceLink' linksContext } renderSourceLink' :: D.LinksContext -> P.SourceSpan -> Text diff --git a/stack.yaml b/stack.yaml index b7b0c13..ad3c45e 100644 --- a/stack.yaml +++ b/stack.yaml @@ -11,8 +11,8 @@ extra-deps: - http-client-0.4.31.2 - http-client-tls-0.2.4.1 - http-conduit-2.1.11 -- optparse-applicative-0.13.0.0 +- optparse-applicative-0.13.2.0 - pipes-4.2.0 - pipes-http-1.0.5 -- purescript-0.10.7 +- purescript-0.11.1 - websockets-0.9.8.2