Skip to content

Commit

Permalink
import qualified
Browse files Browse the repository at this point in the history
  • Loading branch information
ggreif authored Jul 12, 2018
1 parent 8f842da commit e6c413f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Graphics/UI/Threepenny/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ module Graphics.UI.Threepenny.Core (

import Control.Monad (forM_, forM, void)
import Control.Monad.Fix
import Control.Monad.IO.Class
import Data.Foldable (foldl)

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 @@ -287,8 +286,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 e6c413f

Please sign in to comment.