Skip to content

Commit

Permalink
WIP start using NP from sop-core, realise fields are not linear
Browse files Browse the repository at this point in the history
  • Loading branch information
alt-romes committed Oct 11, 2023
1 parent 44010d8 commit fbffeaf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ module Ghengin.Core.Prelude
-- reference-counting
, Aliasable, Forgettable, Shareable, SomeAlias(..)

-- sop-core
, NP(..)

-- * Re-exports under different names
, (<$$>)
-- ** With multiplicity generalization
, vmap, vtraverse

-- * Our own things
, GHList(..), (=<<), (<=<), (>=>), v2vec, l2vec, vec2l
, (=<<), (<=<), (>=>), v2vec, l2vec, vec2l

, vzipWith
)
Expand Down Expand Up @@ -74,6 +77,7 @@ import qualified Data.V.Linear.Internal as VL
import qualified Data.V.Linear.Internal.Instances as VL

import GHC.Generics
import Data.SOP
import Data.Kind
import Data.Word
import Data.IORef (IORef)
Expand Down Expand Up @@ -104,6 +108,7 @@ infixr 6 :##
Note [Coerce HList to List]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
They have the same representation ^_^, so unsafeCoerce is safe ^_^
(We use NP from sop-core instead of our own HList)
-}

-- GHList instances
Expand Down
4 changes: 3 additions & 1 deletion ghengin-core/ghengin-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,7 @@ library
gl-block,

ghengin-core-indep,
linear-utils
linear-utils,

sop-core

2 changes: 1 addition & 1 deletion ghengin-core/ghengin-core/Ghengin/Core/Render/Property.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Ghengin.Core.Render.Property
, writeProperty

-- * Utils
, GHList(..)
, NP(..)
) where

import Ghengin.Core.Prelude as Linear
Expand Down

0 comments on commit fbffeaf

Please sign in to comment.