on develop help sign in
Add unsafeDynamic
c9bb6e6Ryan Trinkle
src/Reflex/Dynamic.hs+5
@@ -33,6 +33,8 @@ module Reflex.Dynamic ( Dynamic -- Abstract so we can preserve the law that the
33 , HList (..)
33 , HList (..)
34 , FHList (..)
34 , FHList (..)
35 , distributeFHListOverDyn
35 , distributeFHListOverDyn
36+ -- Unsafe
37+ , unsafeDynamic
36 ) where
38 ) where
37
39
38import Reflex.Class
40import Reflex.Class
@@ -89,6 +91,9 @@ instance HBuild' (a ': l) r
89data Dynamic t a
91data Dynamic t a
90 = Dynamic (Behavior t a) (Event t a)
92 = Dynamic (Behavior t a) (Event t a)
91
93
94+unsafeDynamic :: Behavior t a -> Event t a -> Dynamic t a
95+unsafeDynamic = Dynamic
96+
92current :: Dynamic t a -> Behavior t a
97current :: Dynamic t a -> Behavior t a
93current (Dynamic b _) = b
98current (Dynamic b _) = b
94
99