Skip to content
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

allow building with modern ghc versions #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
16 changes: 14 additions & 2 deletions husky.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,20 @@ extra-source-files: README

Executable husky
Build-Depends: base, readline >= 1.0.1.0, containers >= 0.1.0.0,
parsec == 2.1.*, mtl >= 1.1.0.0,
old-locale >= 1.0.0.0, time >= 1.0.0.0
parsec, mtl >= 1.1.0.0,
time >= 1.0.0.0
ghc-options: -O2
Main-Is: husky.hs
hs-source-dirs: src
other-modules: CalculatorParser
CalculatorState
ErrorParser
ExtraFunctions
HelpParser
InfoRoutines
Messages
Parser
PrettyPrint
TokenParser
UnitConversionParser
UnitConverter
1 change: 0 additions & 1 deletion src/InfoRoutines.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import Data.Map
import Data.Time
import Prelude
import System.IO
import System.Locale


-- local imports
Expand Down
5 changes: 5 additions & 0 deletions src/TokenParser.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{-# LANGUAGE CPP #-}

{-----------------------------------------------------------------

(c) 2008-2009 Markus Dittrich
Expand Down Expand Up @@ -61,6 +63,8 @@ import ExtraFunctions



#if (defined(MIN_VERSION_parsec) && MIN_VERSION_parsec(3,0,0))
#else
{- Definitions for Applicative Parsec instance -}

-- | Applicative instance for Monad
Expand All @@ -73,6 +77,7 @@ instance Applicative (GenParser s a) where
instance Alternative (GenParser s a) where
empty = mzero
(<|>) = mplus
#endif



Expand Down
2 changes: 1 addition & 1 deletion src/UnitConverter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ convert_unit value unit1 unit2 unitType =
-- | helper function looking through all unit maps for a matching
-- conversion routine
unit_lookup :: String -> M.Map String UnitMap -> [UnitConverter]
unit_lookup key = M.fold append_val []
unit_lookup key = M.foldr append_val []
where
append_val entry acc = case M.lookup key entry of
Nothing -> acc
Expand Down
1 change: 1 addition & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-9.21