mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 17:28:46 +03:00
Move HasField to DA.Record in the stdlib docs. (#2764)
This commit is contained in:
parent
ed39800a9f
commit
a50e0c2e0e
@ -5,6 +5,8 @@
|
||||
{-# LANGUAGE AllowAmbiguousTypes #-} -- setField doesn't mention x, because we pass it as a type application
|
||||
|
||||
daml 1.2
|
||||
|
||||
-- | MOVE DA.Record
|
||||
module DA.Internal.Record(HasField(..), Symbol, getFieldPrim, setFieldPrim) where
|
||||
|
||||
import GHC.Types
|
||||
@ -15,9 +17,11 @@ class HasField (x : Symbol) r a | x r -> a where
|
||||
getField : r -> a
|
||||
setField : a -> r -> r
|
||||
|
||||
-- | HIDE Not re-exported in DA.Record
|
||||
getFieldPrim : forall (f : Symbol) rec fld. rec -> fld
|
||||
getFieldPrim = getFieldPrim
|
||||
|
||||
-- | HIDE Not re-exported in DA.Record
|
||||
setFieldPrim : forall (f : Symbol) rec fld. fld -> rec -> rec
|
||||
setFieldPrim = setFieldPrim
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user