Idris2-boot/tests/idris2/basic026/Erl.idr
Edwin Brady 6d90b72fe9 Check under data constructor for holes
We can't begin a search until we know what we're searching for! For some
reason I forgot to add this case, and without it the search space can
explode, or we might find an answer too soon and commit to the wrong
thing!

Fixes #36
2019-07-20 21:09:33 +01:00

18 lines
468 B
Idris

data ErlList : List Type -> Type where
Nil : ErlList []
(::) : x -> ErlList xs -> ErlList (x :: xs)
data ErlType : Type -> Type where
ETInteger : ErlType Integer
ETString : ErlType String
data ErlTypes : List Type -> Type where
ETErlTypesNil : ErlTypes []
ETErlTypesCons : (ErlType x, ErlTypes xs) => ErlTypes (x :: xs)
erlCall : ErlList xs -> {auto prf : ErlTypes xs} -> ()
erlCall args = ()
foo : ()
foo = erlCall [1,2,3, "foo", "bar", "baz", 4,5,6]