[Haskell-cafe] What am I missing? Cycle in type synonym declarations

David Fox dsf at seereason.com
Tue Aug 20 23:00:29 CEST 2013


This file gives me the error "Cycle in type synonym declarations"  Can
anyone tell me why?  I'm just trying to write a function to create a
type that is a FooT with the type parameter fixed.

{-# LANGUAGE TemplateHaskell #-}
import Language.Haskell.TH (Q, Dec, TypeQ)

data FooT a = FooT a

foo :: TypeQ -> Q [Dec]
foo t = [d| type Bar = FooT $t |]




More information about the Haskell-Cafe mailing list