Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed scalar(To|From)Object

  • Loading branch information...
commit 00e389d2807fa0093bd439f186a8211c215ad53e 1 parent 473ceee
@snoyberg authored
Showing with 0 additions and 21 deletions.
  1. +0 −21 Data/Object/Base.hs
View
21 Data/Object/Base.hs
@@ -53,10 +53,6 @@ module Data.Object.Base
, fromObjectWrap
-- * Helper functions
, lookupObject
- -- ** Scalar/Object conversions
- -- $scalarToFromObject
- , scalarToObject
- , scalarFromObject
) where
import Control.Arrow
@@ -385,20 +381,3 @@ lookupObject :: ( ConvertSuccess k' k
-> [(k, Object k v)]
-> Attempt o
lookupObject key pairs = A.lookup (convertSuccess key) pairs >>= fromObject
-
--- $scalarToFromObject
--- Due to overlapping instances, we cannot automatically make all instances of
--- 'ConvertSuccess' instances of 'ToObject' (and same with
--- 'ConvertAttempt'/'FromObject'), even though the implementation is standard. Just
--- use the following functions whenever you declare 'ConvertSuccess'/'ConvertAttempt'
--- instance and you should be good.
-
--- | An appropriate 'toObject' function for any types x and y which have a
--- 'ConvertSuccess' x y instance.
-scalarToObject :: ConvertSuccess x y => x -> Object k y
-scalarToObject = Scalar . convertSuccess
-
--- | An appropriate 'fromObject' function for any types x and y which have a
--- 'ConvertAttempt' x y instance.
-scalarFromObject :: ConvertAttempt y x => Object k y -> Attempt x
-scalarFromObject = convertAttempt <=< fromScalar
Please sign in to comment.
Something went wrong with that request. Please try again.