Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Serialization
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Haskell=== In Haskell, serialization is supported for types that are members of the Read and Show [[type class]]es. Every type that is a member of the <code>Read</code> type class defines a function that will extract the data from the string representation of the dumped data. The <code>Show</code> type class, in turn, contains the <code>show</code> function from which a string representation of the object can be generated. The programmer need not define the functions explicitly—merely declaring a type to be deriving Read or deriving Show, or both, can make the compiler generate the appropriate functions for many cases (but not all: function types, for example, cannot automatically derive Show or Read). The auto-generated instance for Show also produces valid source code, so the same Haskell value can be generated by running the code produced by show in, for example, a Haskell interpreter.<ref>{{cite web|url=http://hackage.haskell.org/package/base-4.6.0.1/docs/Text-Show.html#t:Show|access-date=15 January 2014 |title=Text.Show Documentation}}</ref> For more efficient serialization, there are haskell libraries that allow high-speed serialization in binary format, e.g. [http://hackage.haskell.org/package/binary binary].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)