snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

Restore compat with GHC 8.2 / base-4.10 #190

Closed hvr closed 7 years ago

hvr commented 7 years ago

I'm not sure why Config.hs imports Typeable from the .Internal module starting w/ base-4.7... but starting with base-4.10, you have to go via Data.Typeable again.

Otherwise you get the compile failure

Resolving dependencies...
Build profile: -w ghc-8.2.1 -O1
In order, the following will be built (use -v for more details):
 - snap-1.0.0.1 {snap-1.0.0.1-inplace} (lib) (first run)
Configuring library for snap-1.0.0.1..
Preprocessing library for snap-1.0.0.1..
Building library for snap-1.0.0.1..
[ 1 of 27] Compiling Paths_snap       ( /tmp/snap-1.0.0.1/dist-newstyle/build/x86_64-linux/ghc-8.2.1/snap-1.0.0.1/build/autogen/Paths_snap.hs, /tmp/snap-1.0.0.1/dist-newstyle/build/x86_64-linux/ghc-8.2.1/snap-1.0.0.1/build/Paths_snap.o )
[ 2 of 27] Compiling Snap.Snaplet.Config ( src/Snap/Snaplet/Config.hs, /tmp/snap-1.0.0.1/dist-newstyle/build/x86_64-linux/ghc-8.2.1/snap-1.0.0.1/build/Snap/Snaplet/Config.o )

src/Snap/Snaplet/Config.hs:13:1: error:
    Could not find module ‘Data.Typeable.Internal’
    it is a hidden module in the package ‘base-4.10.0.0’
    Use -v to see a list of the files searched for.
   |
13 | import           Data.Typeable.Internal (Typeable)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hvr commented 7 years ago

I've also revised the upper bound on base in https://hackage.haskell.org/package/snap-1.0.0.1/revisions/

While at it, note that as of e5d61d2657f33b00bcc8b93cc9442702d515622d:

$ cabal outdated
Outdated dependencies:
Glob >=0.7.5 && <0.8 (latest: 0.8.0)
QuickCheck >=2.4.2 && <2.10 (latest: 2.10.0.1)
aeson >=0.6 && <1.2 (latest: 1.2.1.0)
time >=1.1 && <1.7 (latest: 1.8.0.2)