Skip to content

Commit ad1c583

Browse files
authored
Merge pull request #15 from walseb/vertex-vec2
Added Vertex Vec2 lift instance
2 parents 0acb2fc + e6e5d4b commit ad1c583

File tree

1 file changed

+5
-0
lines changed
  • ghengin-core/ghengin-core-indep/Ghengin/Core/Mesh

1 file changed

+5
-0
lines changed

ghengin-core/ghengin-core-indep/Ghengin/Core/Mesh/Vertex.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import Language.Haskell.TH.Syntax
1515

1616
-- for orphan instances while they aren't upstreamed
1717
import Geomancy.Vec3
18+
import Geomancy.Vec2
1819

1920

2021
-- ROMES:TODO: It turns out alignment for Vertices is even something else entirely!!!
@@ -129,3 +130,7 @@ instance (Lift (Vertex (y : xs)), Lift x) => Lift (Vertex (x : y : xs)) where
129130
instance Lift Vec3 where
130131
lift (WithVec3 a b c) = [| vec3 $(lift a) $(lift b) $(lift c) |]
131132
liftTyped (WithVec3 a b c) = [|| vec3 $$(liftTyped a) $$(liftTyped b) $$(liftTyped c) ||]
133+
134+
instance Lift Vec2 where
135+
lift (WithVec2 a b) = [| vec2 $(lift a) $(lift b) |]
136+
liftTyped (WithVec2 a b) = [|| vec2 $$(liftTyped a) $$(liftTyped b) ||]

0 commit comments

Comments
 (0)