packages feed

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

{-# LANGUAGE BlockArguments #-}{-# LANGUAGE DataKinds #-}{-# LANGUAGE FlexibleInstances #-}{-# LANGUAGE MultiParamTypeClasses #-}{-# OPTIONS_GHC -Wno-orphans #-}module Geomancy.Swizzle.U64Vec.Extend () whereimport GHC.Records (HasField(..))import Geomancy.U64Vec2 (U64Vec2, withU64Vec2)import Geomancy.U64Vec3 (U64Vec3, u64vec3, withU64Vec3)import Geomancy.U64Vec4 (U64Vec4, u64vec4)instance HasField "xy0" U64Vec2 U64Vec3 where  {-# INLINE getField #-}  getField v = withU64Vec2 v \x y -> u64vec3 x y 0instance HasField "xy1" U64Vec2 U64Vec3 where  {-# INLINE getField #-}  getField v = withU64Vec2 v \x y -> u64vec3 x y 1instance HasField "xy00" U64Vec2 U64Vec4 where  {-# INLINE getField #-}  getField v = withU64Vec2 v \x y -> u64vec4 x y 0 0instance HasField "xy01" U64Vec2 U64Vec4 where  {-# INLINE getField #-}  getField v = withU64Vec2 v \x y -> u64vec4 x y 0 1instance HasField "xy10" U64Vec2 U64Vec4 where  {-# INLINE getField #-}  getField v = withU64Vec2 v \x y -> u64vec4 x y 1 0instance HasField "xy11" U64Vec2 U64Vec4 where  {-# INLINE getField #-}  getField v = withU64Vec2 v \x y -> u64vec4 x y 1 1instance HasField "xyz0" U64Vec3 U64Vec4 where  {-# INLINE getField #-}  getField v = withU64Vec3 v \x y z -> u64vec4 x y z 0instance HasField "xyz1" U64Vec3 U64Vec4 where  {-# INLINE getField #-}  getField v = withU64Vec3 v \x y z -> u64vec4 x y z 1