Skip to content

Liquid Type Mismatch on Initial Build #117

Open
@pmbittner

Description

@pmbittner

OS: WSL2 (Ubuntu) on Windows 10
Commit I cloned this repository at: 8bf919a
z3 version: 4.8.7-4build1

Hi LiquidHaskell team,

I wanted to start the tutorial so I cloned this repository and installed z3 (sudo apt-get install -y z3). I tried to reiterate the compilation with stack build --fast --file-watch until no errors showed up. However, (no matter how often I recompile) the following error stays:

> stack build --fast --file-watch
liquidhaskell-tutorial> configure (lib)
Configuring liquidhaskell-tutorial-0.2.0.0...
liquidhaskell-tutorial> build (lib)
Preprocessing library for liquidhaskell-tutorial-0.2.0.0..
Building library for liquidhaskell-tutorial-0.2.0.0..
[ 2 of 13] Compiling Tutorial_01_Introduction

**** START: pandoc *************************************************************
 

**** DONE:  pandoc *************************************************************
 

**** START: pandoc *************************************************************
 

**** DONE:  pandoc *************************************************************
 

**** LIQUID: UNSAFE ************************************************************

/home/bittner/LearningLiquidHaskell/liquidhaskell-tutorial/src/Tutorial_01_Introduction.lhs:30:27: error:
    Liquid Type Mismatch
    .
    The inferred type
      VV : {v : GHC.Types.Int | v >= 0
                                && v == len xs}
    .
    is not a subtype of the required type
      VV : {VV : GHC.Types.Int | VV /= 0}
    .
    in the context
      xs : {v : [GHC.Types.Int] | len v >= 0}
   |
30 | average xs = sum xs `div` length xs
   |                           ^^^^^^^^^



--  While building package liquidhaskell-tutorial-0.2.0.0 using:
      /home/bittner/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.0.0_ghc-8.10.1 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.0.0 build lib:liquidhaskell-tutorial --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
Type help for available commands. Press enter to force a rebuild.

Thanks for any help and sorry if the problem is my fault.

Kind regards,
Paul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions