-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
I have the following code:
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Lib where
import Data.Vector.Unboxed.Deriving
import Data.Coerce
import qualified Data.Vector.Unboxed as VU
derivingUnbox "Coerce" [t| forall a b. (Coercible a b, VU.Unbox a) => a -> b |] [| coerce |] [| coerce |]
This gives me the following errors:
src/Lib.hs|12 col 1 error| The exact Name ‘b_a5we’ is not in scope
Probable cause: you used a unique Template Haskell name (NameU), perhaps via newName, but did not bind it
If that's it, then -ddump-splices might be useful
|12 | derivingUnbox "Coerce" [t| forall a b. (Coercible a b, VU.Unbox a) => a -> b |] [| coerce |] [| coerce |] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Lib.hs|12 col 1 error| The exact Name ‘b_a5we’ is not in scope
Probable cause: you used a unique Template Haskell name (NameU), perhaps via newName, but did not bind it
If that's it, then -ddump-splices might be useful |12 | derivingUnbox "Coerce" [t| forall a b. (Coercible a b, VU.Unbox a) => a -> b |] [| coerce |] [| coerce |] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Did I do something wrong?
Metadata
Metadata
Assignees
Labels
No labels