Failure to find module

14 views
Skip to first unread message

marcioc...@gmail.com

unread,
Apr 16, 2018, 10:46:58 PM4/16/18
to liquidhaskell

 Dear all,

 I am new to LiquidHaskell. As I am doing a tutorial. Unfortunately, I have faced a problem when importing a module. I tried the following code.

{-@ LIQUID "--short-names" @-}
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--scrape-used-imports" @-}

module VectorBounds
( safeLookup
, unsafeLookup
, vectorSum, vectorSum'
, absoluteSum, absoluteSum'
, dotProduct
, sparseProduct, sparseProduct'
, eeks
, head, head', head''
) where

import Prelude hiding (head, abs, length)
import Data.List (foldl')
import Data.Vector hiding (head, foldl')

absoluteSum' :: Vector Int -> Int
dotProduct :: Vector Int -> Vector Int -> Int
absoluteSum :: Vector Int -> Int
sparseProduct, sparseProduct' :: Vector Int -> [(Int, Int)] -> Int

twoLangs = fromList ["haskell", "javascript"]

eeks = [ok, yup, nono]
where
ok = twoLangs ! 0
yup = twoLangs ! 1
nono = twoLangs ! 3

When checking this code, I got the following error message

LiquidHaskell Version 0.8.2.4, Git revision 9f30411db5b8363e41210dc7a8dc22444474b246

Copyright 2013-18 Regents of the University of California. All Rights Reserved.


liquid: VectorBounds: Could not find module ‘Data.Vector’

Perhaps you meant Data.Functor (from base-4.10.1.0)

Use -v to see a list of the files searched for.


 Using the ghci, I can import the module Data.Vector. But it is not found by LH. Do you any hints to solve this?

 Thanks,

 Márcio

Ranjit Jhala

unread,
Apr 16, 2018, 10:53:19 PM4/16/18
to marcioc...@gmail.com, liquidhaskell
Hi Marcio, 

I would suggest using “stack” to get avoid this problem. If you do 

  stack install vector

And then

  stack exec — liquid file.hs

Then it should work.

Let me know if it doesn’t!

Best,

Ranjit.
 

--
You received this message because you are subscribed to the Google Groups "liquidhaskell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liquidhaskel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages