diff options
author | Marvin Borner | 2022-02-22 00:15:02 +0100 |
---|---|---|
committer | Marvin Borner | 2022-02-22 00:15:02 +0100 |
commit | 35fe3258800793ad923afe036abd61b0e7778186 (patch) | |
tree | 6567ca8b3951c713c018a2dbbbef1e6e20936a31 /src/Fun/Tree.hs | |
parent | fa02225c5ae8b704408769c70bb47101042762b8 (diff) |
Confusing haskell shenanigans
Functional thinking isn't that easy. Huh.
Diffstat (limited to 'src/Fun/Tree.hs')
-rw-r--r-- | src/Fun/Tree.hs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/Fun/Tree.hs b/src/Fun/Tree.hs index a7709ee..d6cdecd 100644 --- a/src/Fun/Tree.hs +++ b/src/Fun/Tree.hs @@ -11,8 +11,22 @@ data Block = Block FunctionBlock -- | Block DataBlock ... data FunctionBlock = FunctionBlock FunctionDeclaration [FunctionDefinition] deriving Show -data FunctionDeclaration = FunctionDeclarationWithoutFlags String Char [String] | FunctionDeclarationWithFlags String Char [String] [String] +data Visibility = PublicVisibility | PrivateVisibility deriving Show -data FunctionDefinition = FunctionDefinition String String +data FunctionDeclaration = FunctionDeclaration String + Visibility + [String] + [String] + deriving Show + +data FunctionDefinition = FunctionDefinition FunctionPattern FunctionBody + deriving Show +data FunctionPattern = FunctionPattern [FunctionPatternElement] + deriving Show +data FunctionPatternElement = FunctionPatternParameter String | FunctionPatternString String | FunctionPatternNumber Integer | Wildcard + deriving Show +data FunctionBody = FunctionBody [FunctionBodyElement] + deriving Show +data FunctionBodyElement = Statement String | FunctionBodyIdentifier String | FunctionBodyParameter String | FunctionBodyString String | FunctionBodyNumber Integer deriving Show |