mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
f48c882521
This abstracts `CircularT`'s test cases to work against "any" memoizer, and then runs them against `MemoizeT` as well. Surprisingly (or not), this works without issue; `MemoizeT` passes all tests with a couple of extra instances. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5780 GitOrigin-RevId: 461880caf9220dc3f52d622a22e8b8bcd594e404
16 lines
342 B
Haskell
16 lines
342 B
Haskell
{-# OPTIONS_GHC -Wno-orphans #-}
|
|
|
|
module Control.Monad.CircularSpec (spec) where
|
|
|
|
import Control.Monad.Circular
|
|
import Control.Monad.MemoizationSpecDefinition
|
|
import Hasura.Prelude
|
|
import Test.Hspec
|
|
|
|
instance Memoizer CircularT where
|
|
runMemoizer = runCircularT
|
|
memoize = const withCircular
|
|
|
|
spec :: Spec
|
|
spec = memoizationSpec @CircularT
|