Skip to content

Support GHC 8.8 #19

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 9 additions & 1 deletion Data/Vector/Unboxed/Deriving.hs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ derivingUnbox name argsQ toRepQ fromRepQ = do
# define MAYBE_KIND
# define MAYBE_OVERLAP
#endif
#if MIN_VERSION_template_haskell(2,15,0)
let newtypeMVector = NewtypeInstD [] Nothing (ConT ''MVector `AppT` s `AppT` typ) MAYBE_KIND
#else
let newtypeMVector = NewtypeInstD [] ''MVector [s, typ] MAYBE_KIND
#endif
(NormalC mvName [(lazy, ConT ''MVector `AppT` s `AppT` rep)]) []
let mvCon = ConE mvName
let instanceMVector = InstanceD MAYBE_OVERLAP cxts
Expand All @@ -147,8 +151,13 @@ derivingUnbox name argsQ toRepQ fromRepQ = do
, wrap 'M.basicUnsafeMove [mv, mv'] id
, wrap 'M.basicUnsafeGrow [mv, n] (liftE mvCon) ]

#if MIN_VERSION_template_haskell(2,15,0)
let newtypeVector = NewtypeInstD [] Nothing (ConT ''Vector `AppT` typ) MAYBE_KIND
(NormalC vName [(lazy, ConT ''Vector `AppT` rep)]) []
#else
let newtypeVector = NewtypeInstD [] ''Vector [typ] MAYBE_KIND
(NormalC vName [(lazy, ConT ''Vector `AppT` rep)]) []
#endif
let vCon = ConE vName
let instanceVector = InstanceD MAYBE_OVERLAP cxts
(ConT ''G.Vector `AppT` ConT ''Vector `AppT` typ) $ concat
Expand Down Expand Up @@ -193,4 +202,3 @@ Consult the <https://github.com/liyang/vector-th-unbox/blob/master/tests/sanity.
for a working example.

-}