fix: eq, show method

This commit is contained in:
orion 2023-11-28 11:18:16 -06:00
parent deb995015d
commit 87ac008ea6
Signed by: orion
GPG Key ID: 6D4165AE4C928719

View File

@ -20,11 +20,14 @@ import Prelude
import Control.Promise (Promise) import Control.Promise (Promise)
import Control.Promise as Promise import Control.Promise as Promise
import Data.ArrayBuffer.Types (ArrayBuffer) import Data.ArrayBuffer.Types (ArrayBuffer)
import Data.Eq.Generic (genericEq)
import Data.Generic.Rep (class Generic)
import Data.Map (Map) import Data.Map (Map)
import Data.Map as Map import Data.Map as Map
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Newtype (unwrap) import Data.Newtype (unwrap)
import Data.Nullable as Nullable import Data.Nullable as Nullable
import Data.Show.Generic (genericShow)
import Data.Tuple.Containing (extract) import Data.Tuple.Containing (extract)
import Data.Tuple.Nested (type (/\)) import Data.Tuple.Nested (type (/\))
import Data.URL (URL) import Data.URL (URL)
@ -108,6 +111,13 @@ data Method
| DELETE | DELETE
| PATCH | PATCH
derive instance Generic Method _
instance Eq Method where
eq = genericEq
instance Show Method where
show = genericShow
class Request :: Type -> Constraint class Request :: Type -> Constraint
class Request a where class Request a where
requestUrl :: forall m. MonadAff m => a -> m URL requestUrl :: forall m. MonadAff m => a -> m URL