Skip to content

Commit

Permalink
Remove more redundant imports, * -> Type
Browse files Browse the repository at this point in the history
  • Loading branch information
dmjio committed Feb 20, 2025
1 parent ac16074 commit 9c851d7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/Miso/FFI/SSE.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module Miso.FFI.SSE

import GHCJS.Types

import Miso.FFI (JSM)
import qualified Miso.FFI as FFI
import Miso.String

Expand Down
1 change: 0 additions & 1 deletion src/Miso/FFI/WebSocket.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import GHCJS.Types

import Language.Javascript.JSaddle hiding (create)

import Miso.FFI (JSM)
import qualified Miso.FFI as FFI
import Miso.String
import Miso.WebSocket
Expand Down
13 changes: 7 additions & 6 deletions src/Miso/Router.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ module Miso.Router
) where

import qualified Data.ByteString.Char8 as BS
import Data.Kind
import Data.Proxy
import Data.Text (Text)
import qualified Data.Text as T
import Data.Text (Text)
import qualified Data.Text as T
import Data.Text.Encoding
import GHC.TypeLits
import Network.HTTP.Types hiding (Header)
import Network.HTTP.Types hiding (Header)
import Network.URI
import Servant.API
import Web.HttpApiData

import Miso.Html hiding (text)
import Miso.Html hiding (text)

-- | Router terminator.
-- The 'HasRouter' instance for 'View' finalizes the router.
Expand Down Expand Up @@ -79,7 +80,7 @@ data Router a where
-- 'Router' is returned, to be interpretted by 'routeLoc'.
class HasRouter layout where
-- | A mkRouter handler.
type RouteT layout a :: *
type RouteT layout a :: Type
-- | Transform a mkRouter handler into a 'Router'.
mkRouter :: Proxy layout -> Proxy a -> RouteT layout a -> Router a

Expand Down Expand Up @@ -119,7 +120,7 @@ instance (HasRouter sublayout, KnownSymbol sym)
(\x -> mkRouter (Proxy :: Proxy sublayout) a (f x))

-- | Header
instance HasRouter sublayout => HasRouter (Header sym (x :: *) :> sublayout) where
instance HasRouter sublayout => HasRouter (Header sym (x :: Type) :> sublayout) where
type RouteT (Header sym x :> sublayout) a = Maybe x -> RouteT sublayout a
mkRouter _ a f = mkRouter (Proxy :: Proxy sublayout) a (f Nothing)

Expand Down
2 changes: 1 addition & 1 deletion src/Miso/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.State.Strict (StateT(StateT), execStateT, mapStateT)
import Control.Monad.Trans.Writer.Strict (WriterT(WriterT), Writer, runWriter, tell, mapWriter)
import Data.Bifunctor (second)
import Data.Foldable (Foldable, for_)
import Data.Foldable (for_)
import qualified Data.Map as M
import Miso.Effect
import Miso.FFI (JSM)
Expand Down

0 comments on commit 9c851d7

Please sign in to comment.