-
Notifications
You must be signed in to change notification settings - Fork 150
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
Remove outdated CPP #519
Remove outdated CPP #519
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,11 +25,7 @@ import Prelude hiding (null) | |
import Data.Coerce | ||
import Data.Default | ||
import Data.Map (Map) | ||
#if MIN_VERSION_containers(0,5,11) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We directly require |
||
import qualified Data.Map.Internal.Debug as Map (showTree, showTreeWith) | ||
#else | ||
import qualified Data.Map as Map (showTree, showTreeWith) | ||
#endif | ||
|
||
import Data.Map.Monoidal | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,23 +89,14 @@ | |
mkDynExp s = case Hs.parseExpWithMode Hs.defaultParseMode { Hs.extensions = [ Hs.EnableExtension Hs.TemplateHaskell ] } s of | ||
Hs.ParseFailed (Hs.SrcLoc _ l c) err -> fail $ "mkDyn:" <> show l <> ":" <> show c <> ": " <> err | ||
Hs.ParseOk e -> qDynPure $ return $ everywhere (id `extT` reinstateUnqDyn) $ Hs.toExp $ everywhere (id `extT` antiE) e | ||
where TH.Name (TH.OccName occName) (TH.NameG _ _ (TH.ModName modName)) = 'unqMarker | ||
Check warning on line 92 in src/Reflex/Dynamic/TH.hs
|
||
#if MIN_VERSION_haskell_src_exts(1,18,0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://hackage.haskell.org/package/haskell-src-exts-1.18.0 has |
||
antiE :: Hs.Exp Hs.SrcSpanInfo -> Hs.Exp Hs.SrcSpanInfo | ||
antiE x = case x of | ||
Hs.SpliceExp l se -> | ||
Hs.App l (Hs.Var l $ Hs.Qual l (Hs.ModuleName l modName) (Hs.Ident l occName)) $ case se of | ||
Check warning on line 96 in src/Reflex/Dynamic/TH.hs
|
||
Hs.IdSplice l2 v -> Hs.Var l2 $ Hs.UnQual l2 $ Hs.Ident l2 v | ||
Hs.ParenSplice _ ps -> ps | ||
_ -> x | ||
#else | ||
antiE x = case x of | ||
Hs.SpliceExp se -> | ||
Hs.App (Hs.Var $ Hs.Qual (Hs.ModuleName modName) (Hs.Ident occName)) $ case se of | ||
Hs.IdSplice v -> Hs.Var $ Hs.UnQual $ Hs.Ident v | ||
Hs.ParenSplice ps -> ps | ||
_ -> x | ||
#endif | ||
reinstateUnqDyn (TH.Name (TH.OccName occName') (TH.NameQ (TH.ModName modName'))) | ||
| modName == modName' && occName == occName' = 'unqMarker | ||
reinstateUnqDyn x = x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We require
base >= 4.11
and https://hackage.haskell.org/package/deepseq-1.4.2.0 only supports< 4.10
so we always use newer versions