mirror of
https://github.com/facebook/Haxl.git
synced 2024-12-23 08:43:16 +03:00
Derive NFData instance for GenHaxl
Summary: Having an NFData instance allows forcing calls that return a Haxl computation to run. Reviewed By: xich Differential Revision: D3906781 fbshipit-source-id: e49448152695383031af6d315a20dbcd1c10720c
This commit is contained in:
parent
528bba5565
commit
78052b9625
@ -11,6 +11,7 @@
|
||||
{-# LANGUAGE ExistentialQuantification #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE GADTs #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE MagicHash #-}
|
||||
{-# LANGUAGE MultiWayIf #-}
|
||||
@ -182,6 +183,7 @@ emptyEnv = initEnv stateEmpty
|
||||
--
|
||||
newtype GenHaxl u a = GenHaxl
|
||||
{ unHaxl :: Env u -> IORef (RequestStore u) -> IO (Result u a) }
|
||||
deriving NFData
|
||||
|
||||
-- | The result of a computation is either 'Done' with a value, 'Throw'
|
||||
-- with an exception, or 'Blocked' on the result of a data fetch with
|
||||
|
Loading…
Reference in New Issue
Block a user