You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using catamorphism 0.5.0.1, the following program fails to compile:
{-# LANGUAGE TemplateHaskell #-}
importData.Morphism.CatadataLista=Empty | Consa (List (Lista))
$(makeCata defaultOptions ''List)
main =return()
The makeCata invocation generates code yielding the error message
treecata.hs:6:3:
Couldn't match type ‘a1’ with ‘List a1’
‘a1’ is a rigid type variable bound by
the type signature for list :: a -> (a1 -> a -> a) -> List a1 -> a
at treecata.hs:6:3
Expected type: List a1
Actual type: List (List a1)
Relevant bindings include
a_a2p8 :: List (List a1) (bound at treecata.hs:6:3)
a_a2p7 :: a1 (bound at treecata.hs:6:3)
x_a2p6 :: List a1 (bound at treecata.hs:6:3)
c_a2p5 :: a1 -> a -> a (bound at treecata.hs:6:3)
list :: a -> (a1 -> a -> a) -> List a1 -> a
(bound at treecata.hs:6:3)
In the third argument of ‘list’, namely ‘a_a2p8’
In the second argument of ‘c_a2p5’, namely
‘list c_a2p4 c_a2p5 a_a2p8’
The text was updated successfully, but these errors were encountered:
frerich
changed the title
Code generated for 'data List a = Empty | Cons a List (List a)' doesn't typecheck
Code generated for non-regular recursive types does not typecheck
Nov 28, 2016
Using catamorphism 0.5.0.1, the following program fails to compile:
The
makeCata
invocation generates code yielding the error messageThe text was updated successfully, but these errors were encountered: