Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implicitly import a module

Tags:

haskell

Module A import Data.Char

Module B imports Module A

So Module B automatically imports Data.Char ?

If not do I need to explicitly import Data.Char in Module A?

In my program, the Module B can not access the types from Data.Char

like image 400
McBear Holden Avatar asked Dec 08 '22 08:12

McBear Holden


1 Answers

You can export Data.Char from module A.

module A (
    -- ... other functions
    module Data.Char
    -- ... other functions
) where

import Data.Char

Now when you import A, Data.Char will be available.

like image 90
cassandracomar Avatar answered Dec 21 '22 16:12

cassandracomar