Last active
September 14, 2017 17:47
-
-
Save jackwillis/78340b550bf55c5d26ecadcc80cbe3ea to your computer and use it in GitHub Desktop.
External anatomy of a flower using algebraic data types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Flower where | |
-- there's probably mistakes in here, also it is not a serious model of the flower | |
data Pedicel = Pedicel | |
data Tepal = Tepal | |
data Sepal = Sepal | |
data Petal = Petal | |
data Perigonium = Perigonium [Tepal] | |
data Calyx = Calyx [Sepal] | |
data Corolla = Corolla [Petal] | |
data SingleOuterWhorl = SOWP Perigonium | SOWCA Calyx | SOWCO Corolla | |
data Perianth = Achlamydeous | Monochlamydeous SingleOuterWhorl | Dichlamydeous Calyx Corolla | |
data Filament = Filament | |
data Anther = Anther | |
data Stamen = Stamen Filament Anther | |
data Androecium = Androecium [Stamen] | |
data Ovule = Ovule | |
data Ovary = Ovary [Ovule] | |
data Style = Style | |
data Stigma = Stigma | |
data Pistil = Pistil Ovary Style Stigma | |
data SimpleCarpel = SimpleCarpel Pistil | |
data CompoundCarpel = CompoundCarpel [Pistil] | |
data Carpel = SC SimpleCarpel | CC CompoundCarpel | |
data Gynoecium = Monocarpus SimpleCarpel | Apocarpous [SimpleCarpel] | Syncarpous [CompoundCarpel] | |
data Flower = Flower Pedicel Perianth Androecium Gynoecium |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment