Monday, 30 September 2013

Export data family instance constructor

Export data family instance constructor

How can I export the constructors of my data family instances? I've tried
various ways without success (see commented out code):
module Test (
--Foo () (..)
--type Foo () (..)
--UnitBar
) where
class Foo a where
data Bar a :: *
instance Foo () where
data Bar () = UnitBar



The only way I've been able to successfuly export the constructor is when
doing a
module Test where
Notice the absense of parentheses. The drawback of this approach is that
too much information leaves!

No comments:

Post a Comment