Fork me on GitHub
#core-typed
<
2015-12-07
>
andrewboltachev10:12:26

Hi. There's simple snippet http://dpaste.com/36BFRB1 and error I get: http://dpaste.com/3VT6PFR Do you think it's my fault (doesn't seem to be) and what workaround could I have for this?

andrewboltachev10:12:45

the reason of an error is that core.typed thinks that I'm trying to pass 'foo to the function rest by accident, which I'm not ('cause filtering it out explicitly with an if)

andrewboltachev10:12:57

(this breaks me from porting core of my library to core.typed, which I want to do to find erros in peripheral part of it)

minimal11:12:36

@andrewboltachev: you can’t call rest on a parameterised type

andrewboltachev11:12:04

@minimal: what type can I call it on?

minimal11:12:06

a type of a -> a can only be the identity function

minimal11:12:12

you can call rest on anything seqable, so most/any of the collection types

andrewboltachev11:12:34

isn't (t/Seq t/Int) seqable?

minimal11:12:05

oh sorry ignore me

minimal11:12:20

completely missed the alias, monday morning

andrewboltachev11:12:49

well, my actual problem now is with predicates/filters

andrewboltachev11:12:58

I can't get them right anyway

minimal12:12:36

@andrewboltachev: it works if you don’t quote foo in the type alias

minimal12:12:43

(t/defalias T1
  (t/U (t/Seq t/Int) (t/Val foo)))

andrewboltachev13:12:14

@minimal: interesting... thanks!

andrewboltachev17:12:39

Hi. What I'm doing wrong if I'm getting assertion errors while checking the ns via t/check-ns?

java.lang.AssertionError: Assert failed: (every? r/Type? types)