diff --git a/lib/GHCup/Utils.hs b/lib/GHCup/Utils.hs
index b64117f5802a1684c695ebd73ba73f4c4427ab41..5945f0b6906e9ade00f445a535cbb5531773d75d 100644
--- a/lib/GHCup/Utils.hs
+++ b/lib/GHCup/Utils.hs
@@ -317,10 +317,10 @@ ghcSet mtarget = do
            MP.setInput rest
            pure x
          )
-        <* pathSep
+        <* MP.some pathSep
         <* MP.takeRest
         <* MP.eof
-    ghcSubPath = pathSep <* MP.chunk "ghc" *> pathSep
+    ghcSubPath = MP.some pathSep <* MP.chunk "ghc" *> MP.some pathSep
 
 -- | Get all installed GHCs by reading ~/.ghcup/ghc/<dir>.
 -- If a dir cannot be parsed, returns left.
@@ -398,10 +398,10 @@ cabalSet = do
   cabalParse = MP.chunk "cabal-" *> version'
   -- parses any path component ending with path separator,
   -- e.g. "foo/"
-  stripPathComponet = parseUntil1 pathSep *> pathSep
+  stripPathComponet = parseUntil1 pathSep *> MP.some pathSep
   -- parses an absolute path up until the last path separator,
   -- e.g. "/bar/baz/foo" -> "/bar/baz/", leaving "foo"
-  stripAbsolutePath = pathSep *> MP.many (MP.try stripPathComponet)
+  stripAbsolutePath = MP.some pathSep *> MP.many (MP.try stripPathComponet)
   -- parses a relative path up until the last path separator,
   -- e.g. "bar/baz/foo" -> "bar/baz/", leaving "foo"
   stripRelativePath = MP.many (MP.try stripPathComponet)
@@ -492,10 +492,10 @@ stackSet = do
     cabalParse = MP.chunk "stack-" *> version'
     -- parses any path component ending with path separator,
     -- e.g. "foo/"
-    stripPathComponet = parseUntil1 pathSep *> pathSep
+    stripPathComponet = parseUntil1 pathSep *> MP.some pathSep
     -- parses an absolute path up until the last path separator,
     -- e.g. "/bar/baz/foo" -> "/bar/baz/", leaving "foo"
-    stripAbsolutePath = pathSep *> MP.many (MP.try stripPathComponet)
+    stripAbsolutePath = MP.some pathSep *> MP.many (MP.try stripPathComponet)
     -- parses a relative path up until the last path separator,
     -- e.g. "bar/baz/foo" -> "bar/baz/", leaving "foo"
     stripRelativePath = MP.many (MP.try stripPathComponet)
@@ -543,10 +543,10 @@ hlsSet = do
     cabalParse = MP.chunk "haskell-language-server-wrapper-" *> version'
     -- parses any path component ending with path separator,
     -- e.g. "foo/"
-    stripPathComponet = parseUntil1 pathSep *> pathSep
+    stripPathComponet = parseUntil1 pathSep *> MP.some pathSep
     -- parses an absolute path up until the last path separator,
     -- e.g. "/bar/baz/foo" -> "/bar/baz/", leaving "foo"
-    stripAbsolutePath = pathSep *> MP.many (MP.try stripPathComponet)
+    stripAbsolutePath = MP.some pathSep *> MP.many (MP.try stripPathComponet)
     -- parses a relative path up until the last path separator,
     -- e.g. "bar/baz/foo" -> "bar/baz/", leaving "foo"
     stripRelativePath = MP.many (MP.try stripPathComponet)