ihaskell-widgets: support singletons-3.0

This commit is contained in:
Vaibhav Sagar 2021-07-04 14:11:22 +10:00
parent 00dbaa527b
commit dcdf4574de
3 changed files with 14 additions and 3 deletions

View File

@ -112,6 +112,9 @@ library
-- so let cabal choose the right one.
, singletons -any
if impl (ghc >= 9.0)
build-depends: singletons-base -any
-- Directories containing source files.
hs-source-dirs: src

View File

@ -18,11 +18,13 @@
module IHaskell.Display.Widgets.Singletons where
#if MIN_VERSION_singletons(3,0,0)
import Data.Singletons.Base.TH
#elif MIN_VERSION_singletons(2,4,0)
import Data.Singletons.TH
#if MIN_VERSION_singletons(2,4,0)
#else
import Data.Singletons.Prelude.Ord
import Data.Singletons.TH
#endif
-- Widget properties

View File

@ -85,13 +85,19 @@ import Data.Vinyl.Functor (Compose(..), Const(..))
import Data.Vinyl.Lens (rget, rput, type ())
import Data.Vinyl.TypeLevel (RecAll)
#if MIN_VERSION_singletons(2,4,0)
#if MIN_VERSION_singletons(3,0,0)
import Data.List.Singletons
#elif MIN_VERSION_singletons(2,4,0)
import Data.Singletons.Prelude.List
#else
import Data.Singletons.Prelude ((:++))
#endif
#if MIN_VERSION_singletons(3,0,0)
import Data.Singletons.Base.TH
#else
import Data.Singletons.TH
#endif
import GHC.IO.Exception