Skip to content

Instantly share code, notes, and snippets.

@derrickturk
Created July 29, 2022 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derrickturk/27772b1429a1d26ba4dfa6007957ed32 to your computer and use it in GitHub Desktop.
Save derrickturk/27772b1429a1d26ba4dfa6007957ed32 to your computer and use it in GitHub Desktop.
"Abstract"-ish types in Koka (and module naming whatevers)
abstract type meat
Beef
pub Lamb(age: int)
module use_abstype
import abstype
val x: abstype/meat = Lamb(3)
val z: int = match x
Lamb(n) -> n
_ -> 33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment