Skip to content

Commit

Permalink
Merge pull request #2 from haskell-works/newhoggy/delete-RenderedError
Browse files Browse the repository at this point in the history
Delete `RenderedError`
  • Loading branch information
newhoggy authored Nov 3, 2024
2 parents f70760a + 7c9eb2b commit bc8a5e1
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 64 deletions.
1 change: 0 additions & 1 deletion hw-prelude.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ library
HaskellWorks.Error.Types
HaskellWorks.Error.Types.All
HaskellWorks.Error.Types.GenericError
HaskellWorks.Error.Types.RenderedError
HaskellWorks.Error.Types.TimedOut
HaskellWorks.IO.Network.NamedPipe
HaskellWorks.IO.Network.Port
Expand Down
4 changes: 0 additions & 4 deletions src/HaskellWorks/Error/Types.hs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
module HaskellWorks.Error.Types
( -- * Error types
GenericError(GenericError),
RenderedError(RenderedError),
TimedOut(TimedOut),

-- * Type classes
ToRenderedError(..),
) where

import HaskellWorks.Error.Types.All
4 changes: 0 additions & 4 deletions src/HaskellWorks/Error/Types/All.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@

module HaskellWorks.Error.Types.All (
GenericError (..),
RenderedError (..),
TimedOut(..),

ToRenderedError (..),
) where

import HaskellWorks.Error.Types.GenericError
import HaskellWorks.Error.Types.RenderedError
import HaskellWorks.Error.Types.TimedOut
11 changes: 0 additions & 11 deletions src/HaskellWorks/Error/Types/GenericError.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,10 @@ module HaskellWorks.Error.Types.GenericError (
GenericError (..),
) where

import Data.Aeson
import Data.Generics.Product.Any
import HaskellWorks.Error.Types.RenderedError
import Lens.Micro

import HaskellWorks.Prelude

newtype GenericError = GenericError
{ message :: Text
}
deriving (Eq, Generic, Show)

instance ToRenderedError GenericError where
toRenderedError e =
RenderedError
{ error = "GenericError"
, payload = toJSON $ e ^. the @"message"
}
32 changes: 0 additions & 32 deletions src/HaskellWorks/Error/Types/RenderedError.hs

This file was deleted.

12 changes: 0 additions & 12 deletions src/HaskellWorks/Error/Types/TimedOut.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,9 @@ module HaskellWorks.Error.Types.TimedOut (
TimedOut (..),
) where

import Data.Aeson
import Data.Generics.Product.Any
import HaskellWorks.Error.Types.RenderedError
import Lens.Micro

import HaskellWorks.Prelude

newtype TimedOut = TimedOut
{ message :: Text
}
deriving (Eq, Generic, Show)

instance ToRenderedError TimedOut where
toRenderedError e =
RenderedError
{ error = "TimedOut"
, payload = toJSON $ e ^. the @"message"
}

0 comments on commit bc8a5e1

Please sign in to comment.