mirror of
https://github.com/ilyakooo0/reflex-dom.git
synced 2024-09-11 06:35:30 +03:00
stylish-haskell
This commit is contained in:
parent
e5983b803c
commit
729c605f18
@ -4,8 +4,8 @@ module Foreign.JavaScript.Internal.Utils
|
||||
, js_dataView
|
||||
) where
|
||||
|
||||
import GHCJS.DOM.Types (JSM, JSVal, RequestAnimationFrameCallback (..), Callback (..))
|
||||
import Language.Javascript.JSaddle.Object (freeFunction, new, jsg)
|
||||
import GHCJS.DOM.Types (Callback (..), JSM, JSVal, RequestAnimationFrameCallback (..))
|
||||
import Language.Javascript.JSaddle.Object (freeFunction, jsg, new)
|
||||
|
||||
synchronously :: JSM a -> JSM a
|
||||
synchronously = id
|
||||
|
@ -8,7 +8,7 @@ module Foreign.JavaScript.Internal.Utils
|
||||
) where
|
||||
|
||||
import GHCJS.Concurrent
|
||||
import GHCJS.DOM.Types (JSVal, JSM, RequestAnimationFrameCallback (..))
|
||||
import GHCJS.DOM.Types (JSM, JSVal, RequestAnimationFrameCallback (..))
|
||||
import GHCJS.Foreign.Callback (releaseCallback)
|
||||
|
||||
freeRequestAnimationFrameCallback :: RequestAnimationFrameCallback -> JSM ()
|
||||
|
@ -6,10 +6,10 @@ module Foreign.JavaScript.Orphans where
|
||||
#ifndef ghcjs_HOST_OS
|
||||
|
||||
import Control.Monad.Trans.Class (lift)
|
||||
import GHCJS.DOM.Types (MonadJSM(..))
|
||||
import GHCJS.DOM.Types (MonadJSM (..))
|
||||
import Reflex.DynamicWriter (DynamicWriterT)
|
||||
import Reflex.Host.Class (ReflexHost, HostFrame)
|
||||
import Reflex.PerformEvent.Base (PerformEventT(..))
|
||||
import Reflex.Host.Class (HostFrame, ReflexHost)
|
||||
import Reflex.PerformEvent.Base (PerformEventT (..))
|
||||
import Reflex.PostBuild.Base (PostBuildT)
|
||||
import Reflex.Requester.Base (RequesterT)
|
||||
import Reflex.TriggerEvent.Base
|
||||
|
@ -1,4 +1,5 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE ConstraintKinds #-}
|
||||
{-# LANGUAGE EmptyDataDecls #-}
|
||||
{-# LANGUAGE ExistentialQuantification #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
@ -8,13 +9,12 @@
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE RankNTypes #-}
|
||||
{-# LANGUAGE StandaloneDeriving #-}
|
||||
#ifdef USE_TEMPLATE_HASKELL
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
#endif
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeSynonymInstances #-}
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
{-# LANGUAGE ConstraintKinds #-}
|
||||
#ifdef USE_TEMPLATE_HASKELL
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
#endif
|
||||
#ifdef ghcjs_HOST_OS
|
||||
{-# LANGUAGE ForeignFunctionInterface #-}
|
||||
{-# LANGUAGE JavaScriptFFI #-}
|
||||
@ -25,7 +25,8 @@ module Foreign.JavaScript.TH ( module Foreign.JavaScript.TH
|
||||
#endif
|
||||
) where
|
||||
|
||||
import Prelude hiding((!!))
|
||||
import Foreign.JavaScript.Orphans ()
|
||||
import Prelude hiding ((!!))
|
||||
import Reflex.Class
|
||||
import Reflex.DynamicWriter
|
||||
import Reflex.EventWriter
|
||||
@ -34,17 +35,15 @@ import Reflex.PerformEvent.Base
|
||||
import Reflex.PerformEvent.Class
|
||||
import Reflex.PostBuild.Base
|
||||
import Reflex.Requester.Base
|
||||
import Foreign.JavaScript.Orphans ()
|
||||
|
||||
#ifdef USE_TEMPLATE_HASKELL
|
||||
import Language.Haskell.TH
|
||||
#endif
|
||||
|
||||
import GHCJS.DOM.Types
|
||||
(askJSM, JSContextRef, Node(..))
|
||||
import GHCJS.DOM.Types (JSContextRef, Node (..), askJSM)
|
||||
#ifdef ghcjs_HOST_OS
|
||||
import GHCJS.DOM.Types (MonadJSM)
|
||||
import qualified GHCJS.Buffer as JS
|
||||
import GHCJS.DOM.Types (MonadJSM)
|
||||
import qualified GHCJS.DOM.Types as JS
|
||||
import qualified GHCJS.Foreign as JS
|
||||
import qualified GHCJS.Foreign.Callback as JS
|
||||
@ -61,14 +60,12 @@ import Foreign.C.Types
|
||||
import Foreign.Ptr
|
||||
import Text.Encoding.Z
|
||||
#else
|
||||
import GHCJS.DOM.Types (MonadJSM(..), runJSM, liftJSM, toJSString, toJSVal, JSVal)
|
||||
import Data.Word (Word8)
|
||||
import Control.Lens.Operators ((^.))
|
||||
import Language.Javascript.JSaddle
|
||||
(eval, valMakeString, valToNumber, function,
|
||||
valMakeNumber, valBool, valToText, valToBool, valIsUndefined,
|
||||
valUndefined, valIsNull, Function(..), (!!),
|
||||
js, js1, jss, array, freeFunction)
|
||||
import Data.Word (Word8)
|
||||
import GHCJS.DOM.Types (JSVal, MonadJSM (..), liftJSM, runJSM, toJSString, toJSVal)
|
||||
import Language.Javascript.JSaddle (Function (..), array, eval, freeFunction, function, js, js1, jss, valBool,
|
||||
valIsNull, valIsUndefined, valMakeNumber, valMakeString, valToBool,
|
||||
valToNumber, valToText, valUndefined, (!!))
|
||||
#endif
|
||||
|
||||
import Control.Concurrent
|
||||
|
@ -3,13 +3,13 @@ module Foreign.JavaScript.Utils
|
||||
, bsToArrayBuffer
|
||||
) where
|
||||
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.ByteString (ByteString)
|
||||
import qualified Data.ByteString as BS
|
||||
import Foreign.JavaScript.Internal.Utils (js_dataView)
|
||||
import qualified GHCJS.Buffer as JS
|
||||
import GHCJS.DOM.Types (ArrayBuffer (..))
|
||||
import GHCJS.DOM.Types (ArrayBuffer (..))
|
||||
import qualified JavaScript.TypedArray.ArrayBuffer as JS
|
||||
import Language.Javascript.JSaddle.Types (MonadJSM, liftJSM, ghcjsPure, jsval)
|
||||
import Foreign.JavaScript.Internal.Utils (js_dataView)
|
||||
import Language.Javascript.JSaddle.Types (MonadJSM, ghcjsPure, jsval, liftJSM)
|
||||
|
||||
{-# INLINABLE bsFromMutableArrayBuffer #-}
|
||||
bsFromMutableArrayBuffer :: MonadJSM m => JS.MutableArrayBuffer -> m ByteString
|
||||
|
@ -1,8 +1,8 @@
|
||||
module Reflex.Dom.Builder.Class.TH where
|
||||
|
||||
import Control.Lens
|
||||
import Language.Haskell.TH.Syntax (Name, nameBase)
|
||||
import Language.Haskell.TH.Lib (DecsQ)
|
||||
import Language.Haskell.TH.Syntax (Name, nameBase)
|
||||
|
||||
namer :: [String] -> Name -> [Name] -> Name -> [DefName]
|
||||
namer s n ks t | nameBase t `elem` s = []
|
||||
|
@ -1,10 +1,10 @@
|
||||
module Reflex.Dom.Location (getLocationHost, getLocationProtocol) where
|
||||
|
||||
import Data.Text (Text)
|
||||
import GHCJS.DOM.Types (MonadJSM)
|
||||
import GHCJS.DOM (currentWindowUnchecked)
|
||||
import GHCJS.DOM.Location (getHost, getProtocol)
|
||||
import GHCJS.DOM.Types (MonadJSM)
|
||||
import GHCJS.DOM.Window (getLocation)
|
||||
import GHCJS.DOM.Location (getProtocol, getHost)
|
||||
|
||||
getLocationHost :: (MonadJSM m) => m Text
|
||||
getLocationHost = currentWindowUnchecked >>= getLocation >>= getHost
|
||||
|
@ -4,13 +4,13 @@
|
||||
{-# LANGUAGE GADTs #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||
{-# LANGUAGE PatternSynonyms #-}
|
||||
{-# LANGUAGE RankNTypes #-}
|
||||
{-# LANGUAGE RecursiveDo #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
{-# LANGUAGE PatternSynonyms #-}
|
||||
module Reflex.Dom.Main where
|
||||
|
||||
import Prelude hiding (concat, mapM, mapM_, sequence, sequence_)
|
||||
@ -39,10 +39,10 @@ import Data.Text.Encoding
|
||||
import GHCJS.DOM
|
||||
import GHCJS.DOM.Document
|
||||
import GHCJS.DOM.Element
|
||||
import GHCJS.DOM.NonElementParentNode
|
||||
import GHCJS.DOM.Node
|
||||
import qualified GHCJS.DOM.Types as DOM
|
||||
import GHCJS.DOM.NonElementParentNode
|
||||
import GHCJS.DOM.Types (JSM)
|
||||
import qualified GHCJS.DOM.Types as DOM
|
||||
|
||||
{-# INLINABLE mainWidget #-}
|
||||
mainWidget :: (forall x. Widget x ()) -> JSM ()
|
||||
|
@ -1,8 +1,8 @@
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE RecursiveDo #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
module Reflex.Dom.Widget.Resize where
|
||||
|
||||
@ -25,9 +25,9 @@ import Data.Monoid
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import GHCJS.DOM.Element
|
||||
import qualified GHCJS.DOM.GlobalEventHandlers as Events (scroll)
|
||||
import GHCJS.DOM.EventM (on)
|
||||
import GHCJS.DOM.Types (liftJSM, MonadJSM)
|
||||
import qualified GHCJS.DOM.GlobalEventHandlers as Events (scroll)
|
||||
import GHCJS.DOM.Types (MonadJSM, liftJSM)
|
||||
import qualified GHCJS.DOM.Types as DOM
|
||||
|
||||
-- | A widget that wraps the given widget in a div and fires an event when resized.
|
||||
|
@ -1,7 +1,6 @@
|
||||
module Reflex.Dom (module X) where
|
||||
|
||||
import Reflex.Dom.Core as X hiding
|
||||
(mainWidget, mainWidgetWithHead, mainWidgetWithCss,
|
||||
mainWidgetWithHead', mainWidgetInElementById, runApp')
|
||||
import Reflex.Dom.Core as X hiding (mainWidget, mainWidgetInElementById, mainWidgetWithCss,
|
||||
mainWidgetWithHead, mainWidgetWithHead', runApp')
|
||||
import Reflex.Dom.Internal as X
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user