Skip to content

Have module reexports appear in generated code #1888

@ssadler

Description

@ssadler
$ psc --version
0.8.0.0

To reproduce, pulp init a new project, then:

--src/Main.purs
module Main 
  ( module A
  , main
  ) where

import A
import Control.Monad.Eff
import Prelude

main :: Eff () Unit
main = pure unit

--src/A.purs
module A 
  ( foo
  ) where

foo :: String
foo = "Hello thar"
$ psc src/Main.purs

Contents of output/Main/index.js:

// Generated by psc version 0.8.0.0                                     
"use strict";                                                           
var A = require("A");                                                   
var Control_Monad_Eff = require("Control.Monad.Eff");                   
var Prelude = require("Prelude");                                       
var main = Prelude.pure(Control_Monad_Eff.applicativeEff)(Prelude.unit);
module.exports = {                                                      
    main: main                                                          
};                                                                      

Would expect foo: A.foo to appear next to main in the exports. I believe this was working in 0.7.6.1, I was using re-exported modules in the browser.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions