haskell - Not in scope, whereas it is called by its full name -


a simple question:

case (hashmap.lookup "last" jsonobject) of   (just (string val)) -> data.text.io.putstrln val 

it says not in scope: data.text.io.putstrln. how be?

in haskell source files, have import modules wish use - referring symbols qualified name isn't enough.

so add

import qualified data.text.io 

to top of source file. if want refer putstrln directly, can omit qualified keyword

in particular case you'd need "hide" version prelude that, because putstrln standard library function.

import prelude hiding ( putstrln ) 

note possible refer symbols directly @ ghci prompt may have been source of confusion here.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Why am I getting Internal .NET Framework Data Provider error 1025 when passing Method to where? -

linux - phpmyadmin, neginx error.log - Check group www-data has read access and open_basedir -