
Hello cafe, I have some problem setting up an appropriate .hs-boot module. I attach a .tar.gz'd cabal folder, so you can immediately test it with `cabal new-repl`. I had a file like this -- datatypes data A = A { _i :: Int, _b :: B } type AS a = State A a data B = B (AS ()) makeLenses ''A -- functions f :: B f = B $ i .= 18 So I decided to split it up in 2 files to test hs-boot in the wild: -- A.hs ------- data A = A { _i :: Int, _b :: B } type AS a = State A a makeLenses ''A -- B.hs ------- data B = B (AS ()) f :: B f = B $ i .= 18 Well, I don't know how to write A.hs-boot. I tried this: module A where import Lens.Micro.Platform data A b :: Lens' A B but ghc rightfully complains that he doesn't know about B, and if I slap an `import B` in the .hs-boot then I have another import-cycle. What's the way out of that? The project I am dealing with is bigger than this problem and I would really love to keep functions and related datatypes nearby for mental sanity. As I wrote above, attached you can find a .tar.gz with everything set up to replicate this -F