Ah what I meant was, originally, the DecFNode and DecFLeaf were both free in the for all, and their type didn't appear in the kind signature. But because we know something about the structure of it, we can have those 2 types set.

On 25/08/2013, at 4:33 AM, Justin Spahr-Summers <notifications@github.com> wrote:

> In Text/Documentalist/SourceParser.hs:
> 
> > -data Declaration = Class Identifier SuperTypes [Declaration]            -- ^ A class declaration.
> > -                 | Interface Identifier SuperTypes [Declaration]        -- ^ An abstract interface, or Objective-C protocol definition.
> > -                 | Mixin Identifier Type [Declaration]                  -- ^ A mixin, or Objective-C category declaration.
> > -                 | Property Identifier UnderlyingType                   -- ^ A property declaration in a class.
> > -                 | Enumeration Identifier UnderlyingType [Declaration]  -- ^ An enumeration.
> > -                 | Constant Identifier UnderlyingType                   -- ^ A constant within an enumeration or class, or outside of any scope.
> > -                 | Function Identifier ResultTypes [Declaration]        -- ^ A function.
> > -                 | ClassMethod Identifier ResultTypes [Declaration]     -- ^ A class method or static member function.
> > -                 | InstanceMethod Identifier ResultTypes [Declaration]  -- ^ An instance method or member function.
> > -                 | Parameter Identifier UnderlyingType                  -- ^ The parameter to a function or method.
> > -                 | TypeAlias Identifier Type                            -- ^ A redeclaration of a type under a different name.
> > -                 deriving (Eq, Ord, Show)
> > +-- | forall . k
> > +data Declaration :: * -> * where
> > +    DecNode :: k -> Identifier -> DecFNode -> [Declaration k] -> Declaration k
> > +    DecLeaf :: k -> Identifier -> DecFLeaf                    -> Declaration k
> Could you explain what you mean by:
> 
> It is expressible as not a GADT, but it is misleading what the forall is, so I don't write them that way
> 
> oh and originally it was any type of content, so it was existensial, so it was a GADT. But restricting it is better
> 
> I like the GADT syntax, but I'm not sure how k is restricted at all here.
> 
> \
> Reply to this email directly or view it on GitHub.