Skip to content

Instantly share code, notes, and snippets.

@purefunctor
Last active October 15, 2021 11:46
Show Gist options
  • Save purefunctor/36086e68c7bd8957a3a5cf94bba7b6b9 to your computer and use it in GitHub Desktop.
Save purefunctor/36086e68c7bd8957a3a5cf94bba7b6b9 to your computer and use it in GitHub Desktop.
ToU.idr
module Infer
data Foo : (xs : List (String, Type)) -> Type where
MkFoo : Foo xs
mkFoo : {xs : List (String, Type)} -> Foo xs
mkFoo = MkFoo
foo : ? -- Foo ?xs
foo = mkFoo {xs = [("Foo", Int), ("Bar", Nat)]}
data Bar : (xs : List String) -> Type where
MkBar : Bar xs
mkBar : {xs : List String} -> Bar xs
mkBar = MkBar
bar : ?
bar = mkBar {xs = ["Foo", "Bar"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment