diff --git a/quasar-wayland/src/Quasar/Wayland/Protocol/Generated.hs b/quasar-wayland/src/Quasar/Wayland/Protocol/Generated.hs index 1d77bae..92baf42 100644 --- a/quasar-wayland/src/Quasar/Wayland/Protocol/Generated.hs +++ b/quasar-wayland/src/Quasar/Wayland/Protocol/Generated.hs @@ -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", diff --git a/quasar-wayland/src/Quasar/Wayland/Protocol/TH.hs b/quasar-wayland/src/Quasar/Wayland/Protocol/TH.hs index bdaa2b9..1efdfe0 100644 --- a/quasar-wayland/src/Quasar/Wayland/Protocol/TH.hs +++ b/quasar-wayland/src/Quasar/Wayland/Protocol/TH.hs @@ -1,8 +1,8 @@ {-# LANGUAGE TemplateHaskell #-} module Quasar.Wayland.Protocol.TH ( - generateWaylandProcol, - generateWaylandProcols, + generateWaylandProtocol, + generateWaylandProtocols, ) where import Control.Monad (mapAndUnzipM) @@ -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