syntax-tree-0.1.0.1: Typed ASTs

Safe HaskellSafe
LanguageHaskell2010

AST.Class.Has

Description

A class for records holding a single element of a given type.

Useful for records of values for several different types, for example when performing unification of heterogenous ASTs, the record Knot can be used to hold the unification variables mappings for each of the AST types.

Synopsis

Documentation

class HasChild record child where Source #

HasChild record child represents that record has exactly one child node of child

Methods

getChild :: Lens' (Tree record k) (Tree k child) Source #

A Lens from the record to the child node

Instances
HasChild (ANode c) c Source # 
Instance details

Defined in AST.Combinator.ANode

Methods

getChild :: Lens' (Tree (ANode c) k) (Tree k c) Source #