on develop help sign in
Merge pull request #101 from hamishmack/develop
0cb3ffcRyan Trinkle
default.nix+1−1
@@ -10,7 +10,7 @@
10mkDerivation {
10mkDerivation {
11 pname = "reflex";
11 pname = "reflex";
12 version = "0.5.0";
12 version = "0.5.0";
13− src = builtins.filterSource (path: type: baseNameOf path != ".git") ./.;
13+ src = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [ ".git" "dist" ])) ./.;
14 libraryHaskellDepends = [
14 libraryHaskellDepends = [
15 base bifunctors containers dependent-map dependent-sum
15 base bifunctors containers dependent-map dependent-sum
16 exception-transformers lens
16 exception-transformers lens
reflex.cabal+2−2
@@ -107,8 +107,8 @@ library
107 cpp-options: -DUSE_TEMPLATE_HASKELL
107 cpp-options: -DUSE_TEMPLATE_HASKELL
108 build-depends:
108 build-depends:
109 dependent-sum >= 0.3 && < 0.5,
109 dependent-sum >= 0.3 && < 0.5,
110− haskell-src-exts >= 1.16 && < 1.18,
110+ haskell-src-exts >= 1.16 && < 1.19,
111− haskell-src-meta == 0.6.*,
111+ haskell-src-meta >= 0.6 && < 0.8,
112 template-haskell >= 2.9 && < 2.12
112 template-haskell >= 2.9 && < 2.12
113 exposed-modules:
113 exposed-modules:
114 Reflex.Dynamic.TH
114 Reflex.Dynamic.TH
src/Reflex/Dynamic/TH.hs+10
@@ -88,12 +88,22 @@ mkDynExp s = case Hs.parseExpWithMode (Hs.defaultParseMode { Hs.extensions = [ H
88 Hs.ParseFailed (Hs.SrcLoc _ l c) err -> fail $ "mkDyn:" <> show l <> ":" <> show c <> ": " <> err
88 Hs.ParseFailed (Hs.SrcLoc _ l c) err -> fail $ "mkDyn:" <> show l <> ":" <> show c <> ": " <> err
89 Hs.ParseOk e -> qDynPure $ return $ everywhere (id `extT` reinstateUnqDyn) $ Hs.toExp $ everywhere (id `extT` antiE) e
89 Hs.ParseOk e -> qDynPure $ return $ everywhere (id `extT` reinstateUnqDyn) $ Hs.toExp $ everywhere (id `extT` antiE) e
90 where TH.Name (TH.OccName occName) (TH.NameG _ _ (TH.ModName modName)) = 'unqMarker
90 where TH.Name (TH.OccName occName) (TH.NameG _ _ (TH.ModName modName)) = 'unqMarker
91+#if MIN_VERSION_haskell_src_exts(1,18,0)
92+ antiE :: Hs.Exp Hs.SrcSpanInfo -> Hs.Exp Hs.SrcSpanInfo
93+ antiE x = case x of
94+ Hs.SpliceExp l se ->
95+ Hs.App l (Hs.Var l $ Hs.Qual l (Hs.ModuleName l modName) (Hs.Ident l occName)) $ case se of
96+ Hs.IdSplice l2 v -> Hs.Var l2 $ Hs.UnQual l2 $ Hs.Ident l2 v
97+ Hs.ParenSplice _ ps -> ps
98+ _ -> x
99+#else
91 antiE x = case x of
100 antiE x = case x of
92 Hs.SpliceExp se ->
101 Hs.SpliceExp se ->
93 Hs.App (Hs.Var $ Hs.Qual (Hs.ModuleName modName) (Hs.Ident occName)) $ case se of
102 Hs.App (Hs.Var $ Hs.Qual (Hs.ModuleName modName) (Hs.Ident occName)) $ case se of
94 Hs.IdSplice v -> Hs.Var $ Hs.UnQual $ Hs.Ident v
103 Hs.IdSplice v -> Hs.Var $ Hs.UnQual $ Hs.Ident v
95 Hs.ParenSplice ps -> ps
104 Hs.ParenSplice ps -> ps
96 _ -> x
105 _ -> x
106+#endif
97 reinstateUnqDyn (TH.Name (TH.OccName occName') (TH.NameQ (TH.ModName modName')))
107 reinstateUnqDyn (TH.Name (TH.OccName occName') (TH.NameQ (TH.ModName modName')))
98 | modName == modName' && occName == occName' = 'unqMarker
108 | modName == modName' && occName == occName' = 'unqMarker
99 reinstateUnqDyn x = x
109 reinstateUnqDyn x = x
src/Reflex/Patch.hs+1−1
@@ -205,7 +205,7 @@ mapEditSetMoved moved = \case
205-- * The same source key may not be moved to two destination keys.
205-- * The same source key may not be moved to two destination keys.
206-- * Any key that is the source of a Move must also be edited
206-- * Any key that is the source of a Move must also be edited
207-- (otherwise, the Move would duplicate it)
207-- (otherwise, the Move would duplicate it)
208−data PatchMapWithMove k v = PatchMapWithMove (Map k (MapEdit k v)) deriving (Show, Eq, Ord, Functor, Foldable, Traversable)
208+newtype PatchMapWithMove k v = PatchMapWithMove (Map k (MapEdit k v)) deriving (Show, Eq, Ord, Functor, Foldable, Traversable)
209
209
210unPatchMapWithMove :: PatchMapWithMove k v -> Map k (MapEdit k v)
210unPatchMapWithMove :: PatchMapWithMove k v -> Map k (MapEdit k v)
211unPatchMapWithMove (PatchMapWithMove p) = p
211unPatchMapWithMove (PatchMapWithMove p) = p
src/Reflex/Spider/Internal.hs+2
@@ -8,7 +8,9 @@
8{-# LANGUAGE FunctionalDependencies #-}
8{-# LANGUAGE FunctionalDependencies #-}
9{-# LANGUAGE GADTs #-}
9{-# LANGUAGE GADTs #-}
10{-# LANGUAGE GeneralizedNewtypeDeriving #-}
10{-# LANGUAGE GeneralizedNewtypeDeriving #-}
11+#if defined(DEBUG) || defined(DEBUG_CYCLES)
11{-# LANGUAGE LambdaCase #-}
12{-# LANGUAGE LambdaCase #-}
13+#endif
12{-# LANGUAGE MagicHash #-}
14{-# LANGUAGE MagicHash #-}
13{-# LANGUAGE MultiParamTypeClasses #-}
15{-# LANGUAGE MultiParamTypeClasses #-}
14{-# LANGUAGE MultiWayIf #-}
16{-# LANGUAGE MultiWayIf #-}
test/GC.hs+1−1
@@ -1,4 +1,4 @@
1−{-# LANGUAGE OverloadedStrings, FlexibleContexts, GADTs, TypeFamilies, RankNTypes, ScopedTypeVariables, LambdaCase #-}
1+{-# LANGUAGE OverloadedStrings, FlexibleContexts, GADTs, TypeFamilies, RankNTypes, ScopedTypeVariables #-}
2module Main where
2module Main where
3
3
4import Control.Monad
4import Control.Monad
test/Reflex/Test/CrossImpl.hs−1
@@ -4,7 +4,6 @@
4{-# LANGUAGE FlexibleInstances #-}
4{-# LANGUAGE FlexibleInstances #-}
5{-# LANGUAGE FunctionalDependencies #-}
5{-# LANGUAGE FunctionalDependencies #-}
6{-# LANGUAGE GADTs #-}
6{-# LANGUAGE GADTs #-}
7−{-# LANGUAGE LambdaCase #-}
8{-# LANGUAGE MultiParamTypeClasses #-}
7{-# LANGUAGE MultiParamTypeClasses #-}
9{-# LANGUAGE NoMonomorphismRestriction #-}
8{-# LANGUAGE NoMonomorphismRestriction #-}
10{-# LANGUAGE RankNTypes #-}
9{-# LANGUAGE RankNTypes #-}