@@ -174,6 +174,7 @@ import Data.Kind
174import Data.List
174import Data.List
175import Data.Maybe
175import Data.Maybe
176import Data.Proxy
176import Data.Proxy
177import Data.Void
178import Data.Void
178import GHC.TypeLits
179import GHC.TypeLits
179import Data.Type.Equality
180import Data.Type.Equality
@@ -315,11 +316,11 @@ class FromLists cols rows where
315 -- error if the dimensions do not match.
316 -- error if the dimensions do not match.
316 fromLists :: [[e]] -> Matrix e cols rows
317 fromLists :: [[e]] -> Matrix e cols rows
318−instance {-# OVERLAPPING #-} FromLists () () where
319+instance FromLists () () where
319 fromLists [[e]] = One e
320 fromLists [[e]] = One e
320 fromLists _ = error "Wrong dimensions"
321 fromLists _ = error "Wrong dimensions"
322−instance {-# OVERLAPPING #-} (FromLists cols ()) => FromLists (Either () cols) () where
323+instance (FromLists cols ()) => FromLists (Either () cols) () where
323 fromLists [h : t] = Join (One h) (fromLists [t])
324 fromLists [h : t] = Join (One h) (fromLists [t])
324 fromLists _ = error "Wrong dimensions"
325 fromLists _ = error "Wrong dimensions"
@@ -329,7 +330,7 @@ instance {-# OVERLAPPABLE #-} (FromLists a (), FromLists b (), Countable a) => F
329 in Join (fromLists [take rowsA l]) (fromLists [drop rowsA l])
330 in Join (fromLists [take rowsA l]) (fromLists [drop rowsA l])
330 fromLists _ = error "Wrong dimensions"
331 fromLists _ = error "Wrong dimensions"
332−instance {-# OVERLAPPING #-} (FromLists () rows) => FromLists () (Either () rows) where
333+instance (FromLists () rows) => FromLists () (Either () rows) where
333 fromLists ([h] : t) = Fork (One h) (fromLists t)
334 fromLists ([h] : t) = Fork (One h) (fromLists t)
334 fromLists _ = error "Wrong dimensions"
335 fromLists _ = error "Wrong dimensions"
@@ -339,7 +340,7 @@ instance {-# OVERLAPPABLE #-} (FromLists () a, FromLists () b, Countable a) => F
339 in Fork (fromLists (take rowsA l)) (fromLists (drop rowsA l))
340 in Fork (fromLists (take rowsA l)) (fromLists (drop rowsA l))
340 fromLists _ = error "Wrong dimensions"
341 fromLists _ = error "Wrong dimensions"
342−instance {-# OVERLAPPABLE #-} (FromLists (Either a b) c, FromLists (Either a b) d, Countable c) => FromLists (Either a b) (Either c d) where
343+instance (FromLists (Either a b) c, FromLists (Either a b) d, Countable c) => FromLists (Either a b) (Either c d) where
343 fromLists l@(h : t) =
344 fromLists l@(h : t) =
344 let lh = length h
345 let lh = length h
345 rowsC = fromInteger (natVal (Proxy :: Proxy (Count c)))
346 rowsC = fromInteger (natVal (Proxy :: Proxy (Count c)))