Skip to content

Commit

Permalink
Fix lts-2 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
psibi committed Mar 19, 2017
1 parent 845b626 commit f4a4fe3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{-#LANGUAGE CPP#-}

module Main where

import Tldr
Expand Down Expand Up @@ -81,7 +83,15 @@ getPagePath page = do
homeDir <- getHomeDirectory
let pageDir = homeDir </> tldrDirName </> "tldr" </> "pages"
x@(f1:f2:f3:[]) = map (\x -> pageDir </> x </> page <.> "md") checkDirs
#if MIN_VERSION_base(4,7,0)
f1' <- pageExists f1
f2' <- pageExists f2
f3' <- pageExists f3
return $ f1' <|> f2' <|> f3'
#else
pageExists f1 <|> pageExists f2 <|> pageExists f3
#endif


main :: IO ()
main = do
Expand Down
4 changes: 3 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# resolver:
# name: custom-snapshot
# location: "./custom-snapshot.yaml"
resolver: lts-8.5
resolver: lts-2.22



Expand Down Expand Up @@ -44,6 +44,8 @@ packages:
extra-deps:
- shell-conduit-4.6.1
- cmark-0.5.5
- process-1.6.0.0
- optparse-applicative-0.13.2.0

# Override default flag values for local packages and extra-deps
flags: {}
Expand Down
1 change: 0 additions & 1 deletion tldr.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ executable tldr
, directory
, filepath
, shell-conduit >= 4.6.0
, process >= 1.2.1.0
, semigroups
default-language: Haskell2010

Expand Down

0 comments on commit f4a4fe3

Please sign in to comment.