Обсуждение:Haskell: различия между версиями
>Grep Новая: Примеры жгутъ! С удовольствием разгрёб третий уровень ~~~~ |
>Beroal Четвёртый пример |
||
| Строка 1: | Строка 1: | ||
Примеры жгутъ! С удовольствием разгрёб третий уровень {{:Участник:Grep/.sig}} 19:52, 4 апреля 2007 (UTC) | Примеры жгутъ! С удовольствием разгрёб третий уровень {{:Участник:Grep/.sig}} 19:52, 4 апреля 2007 (UTC) | ||
Четвёртый пример не компилируется: | |||
<pre><nowiki>cata.hs:58:48: | |||
Couldn't match expected type `. (forall a)' | |||
against inferred type `f' (a rigid variable) | |||
`f' is bound by the type signature for `gcata' at cata.hs:54:18 | |||
Expected type: f (n1 a1) -> . (forall a) (f (n a)) | |||
Inferred type: f (n1 a1) -> f (n1 (n1 a1)) | |||
In the second argument of `(.)', namely `fmap dupl' | |||
In the second argument of `(.)', namely `dist . (fmap dupl)' | |||
cata.hs:60:18: | |||
Occurs check: cannot construct the infinite type: a = Prod c a | |||
Expected type: Prod (forall a) (Prod (forall a) (Prod c a)) | |||
-> Prod c (Prod (forall a) a) | |||
Inferred type: Prod (forall a) (Prod (forall a) (Prod c a)) | |||
-> Prod c (Prod (forall a) (Prod c a)) | |||
In the first argument of `gcata', namely | |||
`(fork (fmap outl) (chi . (fmap outr)))' | |||
In the expression: gcata (fork (fmap outl) (chi . (fmap outr)))</nowiki></pre> | |||
GHC 6.6.1 --[[Участник:Beroal|Beroal]] 12:05, 7 мая 2008 (UTC) | |||