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

Support GHC-8.8.1 #50

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
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ before_cache:
- rm -rfv $CABALHOME/packages/head.hackage
matrix:
include:
- compiler: ghc-8.8.1
addons:
apt:
sources:
- hvr-ghc
packages:
- ghc-8.8.1
- cabal-install-3.0
- ffmpeg
- libavutil-dev
- libavformat-dev
- libavcodec-dev
- libswscale-dev
- libavdevice-dev
- compiler: ghc-8.4.2
addons:
apt:
Expand Down
4 changes: 2 additions & 2 deletions ffmpeg-light.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description: Stream frames from an encoded video, or stream frames to
> go = do (getFrame, cleanup) <- imageReader "myVideo.mov"
> (fmap ImageRGB8 <$> getFrame) <* cleanup
.
Tested with FFmpeg 3.1 - 3.4.2
Tested with FFmpeg 3.1 - 3.4.6

license: BSD3
license-file: LICENSE
Expand All @@ -28,7 +28,7 @@ category: Codec
build-type: Simple
extra-source-files: src/hscMacros.h, src/nameCompat.h, CHANGELOG.md
cabal-version: >=1.10
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.2
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.2, GHC == 8.8.1

source-repository head
type: git
Expand Down
4 changes: 2 additions & 2 deletions src/Codec/FFmpeg/Decode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import Codec.FFmpeg.Scaler
import Codec.FFmpeg.Types
import Control.Arrow (first)
import Control.Monad (when, void)
import Control.Monad.Except
import Control.Monad.Trans.Maybe
import Control.Monad.Except (MonadIO, MonadError, liftIO, throwError, catchError)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For ghc-8.8.1, without using explicit imports here, somehow when and void get imported here, leading to a warning about unnecessary imports for Control.Monad (when, void).

import Control.Monad.Trans.Maybe (MaybeT(MaybeT))
import Foreign.C.String
import Foreign.C.Types
import Foreign.Marshal.Alloc (alloca, free, mallocBytes)
Expand Down
7 changes: 3 additions & 4 deletions src/Codec/FFmpeg/Juicy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ import Codec.FFmpeg.Internal.Linear (V2(..))
import Codec.FFmpeg.Types
import Control.Arrow (first)
import Control.Monad ((>=>))
import Control.Monad.Except
import Control.Monad.Trans.Maybe
import Control.Monad.Except (MonadIO, MonadError, lift, guard, runExceptT)
import Control.Monad.Trans.Maybe (MaybeT(MaybeT), runMaybeT)
import Data.Foldable (traverse_)
import qualified Data.Vector.Storable as V
import qualified Data.Vector.Storable.Mutable as VM
import Foreign.C.Types
import Foreign.C.Types (CUChar)
import Foreign.Storable (sizeOf)
import Data.Maybe (maybe)


-- | Convert 'AVFrame' to a 'Vector'.
Expand Down
8 changes: 4 additions & 4 deletions src/Codec/FFmpeg/Probe.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ module Codec.FFmpeg.Probe (
dictFoldM_
) where

import Control.Applicative ( Applicative )
import Control.Monad.Catch ( MonadMask, finally )
import Control.Monad.Reader
import Control.Monad.Trans.Except
import Control.Monad.Reader ( MonadIO, ReaderT, MonadReader, MonadTrans, liftM
, liftIO, ask, runReaderT )
import Control.Monad.Trans.Except ( runExceptT )
import Data.Int ( Int64 )
import Foreign.C.String ( CString, peekCString, withCString )
import Foreign.C.Types ( CInt(..) )
import Foreign.Marshal.Utils ( with )
import Foreign.Ptr ( Ptr, nullPtr )
import Foreign.Storable
import Foreign.Storable ( peekByteOff, peekElemOff )

import Codec.FFmpeg.Enums
import Codec.FFmpeg.Decode
Expand Down
7 changes: 3 additions & 4 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
resolver: nightly-2016-06-21
resolver: nightly-2019-10-06

packages:
- '.'

# Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3)
extra-deps:
- Rasterific-0.6.1.1
- FontyFruity-0.5.3.2
- sdl2-2.1.3
- FontyFruity-0.5.3.5@sha256:d0bbbc5bef14f229c8e90271365916b1b470bc0928ff4670f7d1885aec3378cf,2166
- Rasterific-0.7.4.4@sha256:05ca492a2c95e65da8d120281f5e579321cfe47b586a5730dce54ae1c52d1557,6008

# Override default flag values for local packages and extra-deps
flags:
Expand Down