<commit_before>module Lambda.AST.Binding where

import Lambda.Core.AST.Identifier

data Binding a
  = VariableBinding Identifier a
  | FunctionBinding Identifier [Identifier] a
  deriving (Eq, Show)

bindingName :: Binding a -> Identifier
bindingName (VariableBinding name _) = name
bindingName (FunctionBinding name _ _) = name
<commit_msg>Added deriving Functor to Lambda.AST.Binding<commit_after>{-# language DeriveFunctor #-}

module Lambda.AST.Binding where

import Lambda.Core.AST.Identifier

data Binding a
  = VariableBinding Identifier a
  | FunctionBinding Identifier [Identifier] a
  deriving (Eq, Functor, Show)

bindingName :: Binding a -> Identifier
bindingName (VariableBinding name _) = name
bindingName (FunctionBinding name _ _) = name

{'fraction_non_alphanumeric': 0.07824933687002653, 'fraction_numerical': 0.0, 'mean_word_length': 5.138211382113822, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4007096', 'n_tokens_mistral': 221, 'n_tokens_neox': 213, 'n_words': 68}