Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The exact Name is not in scope #18

Open
kozross opened this issue Feb 23, 2019 · 0 comments
Open

The exact Name is not in scope #18

kozross opened this issue Feb 23, 2019 · 0 comments

Comments

@kozross
Copy link

kozross commented Feb 23, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant