Skip to content

The exact Name is not in scope #18

@kozross

Description

@kozross

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions