[Haskell-cafe] Serialize to Haskell

Corentin Dupont corentin.dupont at gmail.com
Fri Aug 7 23:04:12 UTC 2015


Hi Matthew,
yes that's exactly that.
I want to do exactly what you would do with a JSON file (read, write), but
with a data format that would be valid Haskell (instead of valid
javascript).


On Fri, Aug 7, 2015 at 8:06 PM, Matthew Pickering <
matthewtpickering at gmail.com> wrote:

> Hi Corentin,
>
> I don't quite understand your question please can you explain a bit
> more.  Do you want to read a valid haskell source file, perform some
> changes to the file and then print out a valid source file?
>
> I am a bit confused about the bit about turing-completeness.
>
> Matt
>
> On Fri, Aug 7, 2015 at 7:55 PM, Corentin Dupont
> <corentin.dupont at gmail.com> wrote:
> > Hello!
> > I'm wondering if it's possible to serialize some data to a format that is
> > valid Haskell.
> > In practice I would read a file like this:
> >
> > module Foo where
> >
> >   myData :: MyData
> >   myData = MyData {name = "foo",
> >                    descr = "test"
> >                    ...
> >                    }
> >
> > Reading this into a program is easily feasible with Hint, for example.
> Then
> > the program would modify some data and serialize it back to:
> >
> > module Foo where
> >
> >   myData :: MyData
> >   myData = MyData {name = "bar",
> >                    descr = "test2"
> >                    ...
> >                    }
> >
> > In practice I think that the format should be a subset of Haskell that is
> > not Turing-complete.
> > A bit like JSON, which is a subset of Javascript but not Turing complete.
> > Is it possible?
> >
> > Thanks,
> > Corentin
> >
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150808/f4a610a4/attachment.html>


More information about the Haskell-Cafe mailing list