on master help sign in
add documentation on List Atomable instance
commitec5b8c3cf29862560640fd98bc7791882d1b77b1 authorAgentM <agentm@themactionfaction.com> dateSat 15 Apr 2017, 15:39 (10 years ago) parente3342d9
1 file changed+1−1
docs/new_datatypes.markdown+1−1
docs/new_datatypes.markdown+1−1
@@ -104,6 +104,6 @@ The essential ```Atomable``` typeclass functions are:
104104| ```toAtomType :: a -> AtomType``` | generate a database AtomType for a Haskell datatype |
105105| ```toDatabaseContextExpr :: a -> DatabaseContextExpr``` | generate a ```DatabaseContextExpr``` which can be executed against a database context in order to add the new type |
106106
107−In addition, basic Haskell data types like ```Int```, ```Text```, ```Bool```, ```UTCTime```, and more already have Atomable instances ready-to-go.
107+In addition, basic Haskell data types like ```Int```, ```Double```, ```Text```, ```Day```, ```Bool```, ```UTCTime```, ```ByteString```, and more already have Atomable instances ready-to-go. In addition, an ```Atomable``` instance is available for lists: ```Atomable a => [a]```, though one should be very careful not to use this in a common anti-pattern. Typically, it makes more sense to store one-to-many relationships as discrete relation variables; when storing them as lists, one gives up the various query capabilities and optimizations of the relational algebra.
108108
109109To be clear, these data types are not black boxes once stored in the database. These new types can be scanned and manipulated by Haskell scripts which can be created at runtime. For more information, read about [```AtomFunction```s](/docs/atomfunctions.markdown).