Skip to content

Instantly share code, notes, and snippets.

@stepancheg
Created July 21, 2018 01:27
Show Gist options
  • Save stepancheg/1680bac8ef478abc25befc5142181875 to your computer and use it in GitHub Desktop.
Save stepancheg/1680bac8ef478abc25befc5142181875 to your computer and use it in GitHub Desktop.
data Zzz : List Nat -> List Nat -> Type
where
SameArg : Zzz l l
DiffArg : Zzz a b
helperFunc : (xs, ys : List Nat) -> Zzz xs ys
helperFunc = ?helperFunc
thisWorks : (xs, ys : List Nat) -> Nat
thisWorks xs ys =
let qs = xs ++ xs in
let ws = ys ++ ys in
let ddd = helperFunc qs ws in
case ddd of
SameArg => Z
DiffArg => Z
thisDoesntWork : (xs, ys : List Nat) -> Nat
thisDoesntWork xs ys =
let ddd = helperFunc (xs ++ xs) (ys ++ ys) in
case ddd of
SameArg => Z -- error is here
DiffArg => Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment