Skip to content

Commit

Permalink
import for older GHCs
Browse files Browse the repository at this point in the history
  • Loading branch information
ggreif committed Jul 12, 2018
1 parent 7228b37 commit 7b00a55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Graphics/UI/Threepenny/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import Control.Monad.Fix
import Control.Monad.IO.Class

import qualified Control.Monad.Catch as E
import qualified Data.Foldable as F
import qualified Data.Aeson as JSON
import qualified Foreign.JavaScript as JS
import qualified Graphics.UI.Threepenny.Internal as Core
Expand Down Expand Up @@ -286,8 +287,8 @@ infixl 8 #.
(#.) mx s = mx # set (attr "class") s

-- | Convenient combinator for bulk setting of attributes on element creation.
(#=) :: Foldable t => UI x -> t (ReadWriteAttr x i o, i) -> UI x
(#=) e = ($ e) . foldl (\f p -> f . uncurry set p) id
(#=) :: F.Foldable t => UI x -> t (ReadWriteAttr x i o, i) -> UI x
(#=) e = ($ e) . F.foldl (\f p -> f . uncurry set p) id

-- | Attributes can be 'set' and 'get'.
type Attr x a = ReadWriteAttr x a a
Expand Down

0 comments on commit 7b00a55

Please sign in to comment.