Skip to content

Commit

Permalink
Fix typo (generateWaylandProtocols)
Browse files Browse the repository at this point in the history
  • Loading branch information
queezle42 committed Jun 6, 2024
1 parent cb94995 commit ac586de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion quasar-wayland/src/Quasar/Wayland/Protocol/Generated.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Quasar.Prelude
import Quasar.Wayland.Protocol.Core
import Quasar.Wayland.Protocol.TH

$(generateWaylandProcols [
$(generateWaylandProtocols [
"protocols/wayland.xml",
"protocols/xdg-shell.xml",
"protocols/wlr-layer-shell-unstable-v1.xml",
Expand Down
12 changes: 6 additions & 6 deletions quasar-wayland/src/Quasar/Wayland/Protocol/TH.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{-# LANGUAGE TemplateHaskell #-}

module Quasar.Wayland.Protocol.TH (
generateWaylandProcol,
generateWaylandProcols,
generateWaylandProtocol,
generateWaylandProtocols,
) where

import Control.Monad (mapAndUnzipM)
Expand Down Expand Up @@ -111,16 +111,16 @@ withWlDoc (toWlDoc -> Just doc) = withDecDoc doc
withWlDoc _ = id


generateWaylandProcol :: FilePath -> Q [Dec]
generateWaylandProcol protocolFile = do
generateWaylandProtocol :: FilePath -> Q [Dec]
generateWaylandProtocol protocolFile = do
addDependentFile protocolFile
xml <- liftIO (BS.readFile protocolFile)
protocol <- parseProtocol xml
(public, internals) <- mapAndUnzipM interfaceDecs protocol.interfaces
pure $ mconcat public <> mconcat internals

generateWaylandProcols :: [FilePath] -> Q [Dec]
generateWaylandProcols protocolFiles = do
generateWaylandProtocols :: [FilePath] -> Q [Dec]
generateWaylandProtocols protocolFiles = do
mapM_ addDependentFile protocolFiles
xmls <- mapM (liftIO . BS.readFile) protocolFiles
protocol <- mconcat <$> mapM parseProtocol xmls
Expand Down

0 comments on commit ac586de

Please sign in to comment.