1

I have some haskell modules generated which is named Par.hs in Bnfc/Par.hs

The generated module is

module Bnfc.Abs where

in my library referencing this is

module Lib
    ( someFunc
    ) where

import Bnfc.Abs
import Text.Printf

and my package.yaml with stack is configured like such

library:
  source-dirs: 
    - src
    - Bnfc
    File name does not match module name:
    Saw: ‘Bnfc.Par’
    Expected: ‘Par’
  |
9 | module Bnfc.Par

Yet I am getting the above error when running stack ghci. I don't understand what I did incorrectly?

1 Answers1

0

I figured out what is the issue.

I moved Bnfc folder into the src folder and the hierarchy works because when compiling haskell treat the directory under source-dirs as root.