packages feed

geomancy-0.4.1.0 / src / Geomancy / Swizzle / I64Vec / Extend.hs

{-# LANGUAGE BlockArguments #-}{-# LANGUAGE DataKinds #-}{-# LANGUAGE FlexibleInstances #-}{-# LANGUAGE MultiParamTypeClasses #-}{-# OPTIONS_GHC -Wno-orphans #-}module Geomancy.Swizzle.I64Vec.Extend () whereimport GHC.Records (HasField(..))import Geomancy.I64Vec2 (I64Vec2, withI64Vec2)import Geomancy.I64Vec3 (I64Vec3, i64vec3, withI64Vec3)import Geomancy.I64Vec4 (I64Vec4, i64vec4)instance HasField "xy0" I64Vec2 I64Vec3 where  {-# INLINE getField #-}  getField v = withI64Vec2 v \x y -> i64vec3 x y 0instance HasField "xy1" I64Vec2 I64Vec3 where  {-# INLINE getField #-}  getField v = withI64Vec2 v \x y -> i64vec3 x y 1instance HasField "xy00" I64Vec2 I64Vec4 where  {-# INLINE getField #-}  getField v = withI64Vec2 v \x y -> i64vec4 x y 0 0instance HasField "xy01" I64Vec2 I64Vec4 where  {-# INLINE getField #-}  getField v = withI64Vec2 v \x y -> i64vec4 x y 0 1instance HasField "xy10" I64Vec2 I64Vec4 where  {-# INLINE getField #-}  getField v = withI64Vec2 v \x y -> i64vec4 x y 1 0instance HasField "xy11" I64Vec2 I64Vec4 where  {-# INLINE getField #-}  getField v = withI64Vec2 v \x y -> i64vec4 x y 1 1instance HasField "xyz0" I64Vec3 I64Vec4 where  {-# INLINE getField #-}  getField v = withI64Vec3 v \x y z -> i64vec4 x y z 0instance HasField "xyz1" I64Vec3 I64Vec4 where  {-# INLINE getField #-}  getField v = withI64Vec3 v \x y z -> i64vec4 x y z 1