Skip to content

Instantly share code, notes, and snippets.

@missingfaktor
Created April 5, 2017 22:20
Show Gist options
  • Select an option

  • Save missingfaktor/29dca7151c925ab64a2af115905e414c to your computer and use it in GitHub Desktop.

Select an option

Save missingfaktor/29dca7151c925ab64a2af115905e414c to your computer and use it in GitHub Desktop.
module OpenSums
data FancySum a = Bar Integer
| Baz
| More a
FancySumFlat : Type
FancySumFlat = FancySum Void
baz : FancySumFlat
baz = the FancySumFlat Baz
total
gaz : Integer
gaz = case baz of
Bar i => i
Baz => -1
data Pet = Cat | Dog
FancySumPro : Type
FancySumPro = FancySum Pet
bazPro : FancySumPro
bazPro = the FancySumPro Baz
total
gazPro : Integer
gazPro = case bazPro of
Bar i => i
Baz => -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment