Skip to content

Adding placeholders for non-implemented class methods adds non-existant methods #4450

Open
@fendor

Description

@fendor

Your environment

GHC 9.6.6, arch linux, HLS 2.9.0.1 installed via ghcup

Steps to reproduce

cabal-version:      3.12
name:               hls-megaparsec-bug
version:            0.1.0.0
-- synopsis:
-- description:
license:            NONE
author:             Fendor
maintainer:         fendor@posteo.de
-- copyright:
build-type:         Simple
extra-doc-files:    CHANGELOG.md
-- extra-source-files:

common warnings
    ghc-options: -Wall

library
    import:           warnings
    exposed-modules:  MyLib
    -- other-modules:
    -- other-extensions:
    build-depends:
        base,
        megaparsec

    hs-source-dirs:   src
    default-language: Haskell2010
{-# LANGUAGE FlexibleInstances #-}
module MyLib where
import Text.Megaparsec

instance VisualStream [Int] where

image

Expected behaviour

Should add methods showTokens

Actual behaviour

{-# LANGUAGE FlexibleInstances #-}
module MyLib where
import Text.Megaparsec

instance VisualStream [Int] where
  p1VisualStream = _
  showTokens = _
  tokensLength = _

No idea where p1VisualStream is coming from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-class-plugintype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions