Skip to content

Commit

Permalink
update to work with hint-0.4 (now required)
Browse files Browse the repository at this point in the history
  • Loading branch information
byorgey committed Mar 15, 2014
1 parent ec0145a commit b1fdd82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions diagrams-builder.cabal
Expand Up @@ -50,15 +50,16 @@ library
build-depends: base >=4.2 && < 4.8,
mtl >= 2.1 && < 2.2,
diagrams-lib >=0.6 && < 1.2,
hint ==0.3.*,
hint >= 0.4 && < 0.5,
directory,
filepath,
transformers >= 0.3 && < 0.4,
split >= 0.2 && < 0.3,
haskell-src-exts >= 1.14 && < 1.15,
cmdargs >= 0.6 && < 0.11,
lens >= 3.9 && < 4.1,
hashable >= 1.1 && < 1.3
hashable >= 1.1 && < 1.3,
exceptions >= 0.3 && < 0.4
hs-source-dirs: src
default-language: Haskell2010
other-extensions: StandaloneDeriving,
Expand Down
4 changes: 2 additions & 2 deletions src/Diagrams/Builder.hs
Expand Up @@ -45,7 +45,7 @@ module Diagrams.Builder

import Control.Lens ((^.))
import Control.Monad (guard, mplus, mzero)
import Control.Monad.Error (catchError)
import Control.Monad.Catch (catchAll)
import Control.Monad.Trans.Maybe (MaybeT, runMaybeT)
import Data.Hashable (Hashable (..))
import Data.List (foldl', nub)
Expand Down Expand Up @@ -138,7 +138,7 @@ interpretDiagram bopts m = do
-- b v and IO (Diagram b v). Take whichever one typechecks,
-- running the IO action in the second case to produce a
-- diagram.
d <- interpret dexp (as :: Diagram b v) `catchError` const (interpret dexp (as :: IO (Diagram b v)) >>= liftIO)
d <- interpret dexp (as :: Diagram b v) `catchAll` const (interpret dexp (as :: IO (Diagram b v)) >>= liftIO)

-- Finally, call renderDia.
return $ renderDia (backendToken bopts) (bopts ^. backendOpts) ((bopts ^. postProcess) d)
Expand Down

0 comments on commit b1fdd82

Please sign in to comment.