diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
 # Changelog
 
+## [0.0.0.4] - 2023-10-04
+
+### Changelog
+
+* Removed use of partial function `head`.
+
 ## [0.0.0.3] - 2023-04-29
 
 ### Changed
diff --git a/LICENSE.md b/LICENSE.md
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,5 +1,5 @@
 # Sydtest License
 
-Copyright (c) 2020-2021 Tom Sydney Kerckhove
+Copyright (c) 2020-2023 Tom Sydney Kerckhove
 
 See the Sydtest License at https://github.com/NorfairKing/sydtest/blob/master/sydtest/LICENSE.md for the full license text.
diff --git a/src/Test/Syd/Discover.hs b/src/Test/Syd/Discover.hs
--- a/src/Test/Syd/Discover.hs
+++ b/src/Test/Syd/Discover.hs
@@ -31,7 +31,13 @@
 
 -- we're traversing up the file tree until we find a directory that doesn't start with an uppercase letter
 findTestBaseDir :: Path Abs a -> Path Abs Dir
-findTestBaseDir specSourceFile = if isUpper (head (toFilePath $ dirname directParent)) then findTestBaseDir directParent else directParent
+findTestBaseDir specSourceFile =
+  case listToMaybe (toFilePath $ dirname directParent) of
+    Nothing -> directParent
+    Just c ->
+      if isUpper c
+        then findTestBaseDir directParent
+        else directParent
   where
     directParent = parent specSourceFile
 
@@ -174,8 +180,8 @@
     if null fs
       then ["spec = Prelude.pure ()"]
       else
-        "spec = do" :
-        map moduleSpecLine fs
+        "spec = do"
+          : map moduleSpecLine fs
 
 moduleSpecLine :: SpecModule -> String
 moduleSpecLine rf = unwords [" ", "describe", "\"" <> specModuleModuleName rf <> "\"", specFunctionName rf]
diff --git a/sydtest-discover.cabal b/sydtest-discover.cabal
--- a/sydtest-discover.cabal
+++ b/sydtest-discover.cabal
@@ -1,18 +1,18 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.34.7.
+-- This file has been generated from package.yaml by hpack version 0.35.2.
 --
 -- see: https://github.com/sol/hpack
 
 name:           sydtest-discover
-version:        0.0.0.3
+version:        0.0.0.4
 synopsis:       Automatic test suite discovery for sydtest
 category:       Testing
 homepage:       https://github.com/NorfairKing/sydtest#readme
 bug-reports:    https://github.com/NorfairKing/sydtest/issues
 author:         Tom Sydney Kerckhove
 maintainer:     syd@cs-syd.eu
-copyright:      Copyright (c) 2020-2021 Tom Sydney Kerckhove
+copyright:      Copyright (c) 2020-2023 Tom Sydney Kerckhove
 license:        OtherLicense
 license-file:   LICENSE.md
 build-type:     Simple
