Skip to content

Commit

Permalink
Improve layout module comment
Browse files Browse the repository at this point in the history
Signed-off-by: George Thomas <[email protected]>
  • Loading branch information
georgefst committed Nov 25, 2024
1 parent 64bc058 commit 1d9edd6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions primer-miso/src/Primer/Miso/Layout.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We can't use `diagrams-contrib` since it pulls in `diagrams-lib`, which in turn uses `fsnotify`, which uses `unix-compat`, which contains some C code that fails to build. It potentially makes sense to avoid such a huge dependency tree anyway. Besides, this is all a temporary solution in lieu of a better layout algorithm, such as a Haskell implementation of Tidy.
We can't use `diagrams-contrib` since it pulls in `diagrams-lib`, which in turn uses `fsnotify`,
which uses `unix-compat`, which contains some C code that fails to compile to Wasm.
It potentially makes sense to avoid such a huge dependency tree anyway.
Besides, this is all a temporary solution in lieu of a better layout algorithm,
such as a Haskell implementation of Tidy.
Differences from upstream:
- Remove everything but the simple symmetric layout algorithm.
- Vendor some further required definitions from the `diagrams` family. These are all in one block at the very top of the module body.
- Add `NoLexicalNegation` to override this package's default, in order to avoid a syntax error in `unRelativize`.
- Use `optics` instead of `lens`.
- Make some adjustments so that y-coordinates are always non-negative, with the root being at zero.
Expand Down

0 comments on commit 1d9edd6

Please sign in to comment.