definition module Snug.Syntax from Data.Set import :: Set :: TypeIdent :== String :: TypeVarIdent :== String :: ConstructorIdent :== String :: SymbolIdent :== String :: Type = Type !TypeIdent | TyVar !TypeVarIdent | TyApp !Type !Type | TyFun !Type !Type | .. :: ConstructorDef = ConstructorDef !ConstructorIdent ![Type] :: BasicValue = BVInt !Int | BVChar !Char :: Pattern = Wildcard | BasicValuePattern !BasicValue | IdentPattern !SymbolIdent | ConstructorPattern !ConstructorIdent ![SymbolIdent] :: CaseAlternative = CaseAlternative !Pattern !Expression :: Expression = BasicValue !BasicValue | Symbol !SymbolIdent | Constructor !ConstructorIdent | Case !Expression ![CaseAlternative] | ExpApp !Expression !Expression :: Definition = DataDef !TypeIdent ![TypeVarIdent] ![ConstructorDef] | TypeDef !TypeIdent !Type | FunDef !SymbolIdent ![(SymbolIdent, Type)] !Type !Expression | TestDef !String !Type !Expression !String class usedSymbols a :: !a -> Set SymbolIdent instance usedSymbols [a] | usedSymbols a instance usedSymbols (a, b) | usedSymbols a & usedSymbols b instance usedSymbols CaseAlternative, Expression, Pattern