[Haskell-cafe] hs-boot and (micro)lenses

Massimo Zaniboni massimo.zaniboni at gmail.com
Fri Aug 3 07:46:48 UTC 2018


Hi Francesco,

 > I have some problem setting up an appropriate .hs-boot module.

I don't know Haskell lenses, I don't know GHC circular module importing, 
but I know you :-) So I tried this

https://github.com/massimo-zaniboni/example-of-circular-module

In the first version you have a parameter on type A "A._b :: b", and 
then B imports A, "specializing" "A._b :: B"

In the second version you have B.hs-boot instead of A.hs-boot.

They both compile.

 > 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.

If you add some example of A and B usage, simulating the usage you have 
in your real project, it will became more clear if one of these two 
work-around is good-enough.

Best regards,
Massimo

> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
> 


More information about the Haskell-Cafe mailing list