ITADN

Upstream some Diagrams utilities

#180Opengeorgefst 创建于 2024-11-26
bikesheddingfeature request
G
georgefstcommented
In a similar vein to #40, there are various definitions in the `diagrams-lib` library which seem like they'd be useful here. Personally I've ended up vendoring the following because `diagrams-lib` can be a bit of a problematic dependency (it has a big footprint, and doesn't work with Wasm for example: https://github.com/diagrams/diagrams-lib/issues/370): ```hs type P2 = Point V2 unitX :: (R1 v, Additive v, Num n) => v n unitX = zero & lensVL _x .~ 1 unit_X :: (R1 v, Additive v, Num n) => v n unit_X = zero & lensVL _x .~ -1 unitY :: (R2 v, Additive v, Num n) => v n unitY = zero & lensVL _y .~ 1 unit_Y :: (R2 v, Additive v, Num n) => v n unit_Y = zero & lensVL _y .~ -1 ``` Would you consider copying some of these to this library? Cc @byorgey
4 条评论