Skip to content
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
13 changes: 7 additions & 6 deletions src/Data/Scientific.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
{-# LANGUAGE Trustworthy #-}

#if __GLASGOW_HASKELL__ >= 800
{-# LANGUAGE DeriveLift #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskellQuotes #-}
#else
{-# LANGUAGE TemplateHaskell #-}
#endif
Expand Down Expand Up @@ -191,13 +190,15 @@ scientific = Scientific
-- Instances
----------------------------------------------------------------------

#if __GLASGOW_HASKELL__ >= 800
-- | @since 0.3.7.0
deriving instance Lift Scientific
#else
instance Lift Scientific where
lift (Scientific c e) = [| Scientific c e |]
#if MIN_VERSION_template_haskell(2,16,0)
liftTyped s = [|| Scientific c e ||]
#else
lift s = [| Scientific c e |]
#endif
where
Scientific c e = normalize s


instance NFData Scientific where
Expand Down