On 10/4/11 12:02 PM, Karel Gardas wrote:
Hello,
I'm trying to find out if it's possible to use Haskell data type
definition capability to define types and compile defined types into
other languages, for example into Google's protocol buffers data
definition language. So basically speaking I'm t
On Tue, Oct 4, 2011 at 20:33, Karel Gardas wrote:
> data PersonType = Person {
> id :: Int
> , name :: String
> , email :: Maybe String
> }
> deriving (Show, Data, Typeable)
>
>
> so I have `PersonType' as type constructor and Person as value constructor
> (or da
On Tue, Oct 4, 2011 at 1:33 PM, Karel Gardas wrote:
>
> Hello,
>
> thanks a lot to Edward, Jose, Ryan and Stephen for fast reply in this
> thread. I see I've not been that precise in specification of what I need
> exactly so I need to add this: I've changed a little bit definition of
> person to:
Forgotten note: GHC's Generics as described here:
http://haskell.org/ghc/docs/latest/html/libraries/ghc-prim-0.2.0.0/GHC-Generics.html#t:Datatype
-- is not yet clear to me, I'm searching for more information about this
in the meantime...
Karel
On 10/ 4/11 08:33 PM, Karel Gardas wrote:
Hel
Hello,
thanks a lot to Edward, Jose, Ryan and Stephen for fast reply in this
thread. I see I've not been that precise in specification of what I need
exactly so I need to add this: I've changed a little bit definition of
person to:
data PersonType = Person {
id :: Int
, name
On 4 October 2011 17:02, Karel Gardas wrote:
>
> Hello,
[SNIP]
> So
> basically speaking I'm thinking about using Haskell sub-set as a
> data-definition DSL together with some functions which will generate some
> code based on supplied defined data types. ...
This seems reminiscent of ASDL - th
An interesting and semi-related project was just presented at ICFP by
Kathleen Fisher. It's called "Forest" and uses template haskell to create
schema's for "FileStores" from Haskell definitions. But they're not
plain-old-haskell type definitions...
-Ryan
On Tue, Oct 4, 2011 at 12:11 PM, Edw
Hi Karel,
You can use SYB's toConstr/dataTypeOf [1] to obtain information about the
name of the constructor and datatype. Alternatively, you can also use the
new generic programming framework of ghc-7.2 [2].
Cheers,
Pedro
[1]
http://hackage.haskell.org/packages/archive/base/latest/doc/html/Data
Just making sure: have you looked at the Data.Data module yet?
Edward
Excerpts from Karel Gardas's message of Tue Oct 04 12:02:34 -0400 2011:
>
> Hello,
>
> I'm trying to find out if it's possible to use Haskell data type
> definition capability to define types and compile defined types into
Hello,
I'm trying to find out if it's possible to use Haskell data type
definition capability to define types and compile defined types into
other languages, for example into Google's protocol buffers data
definition language. So basically speaking I'm thinking about using
Haskell sub-set as
10 matches
Mail list logo