Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,321
    • Issues 4,321
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 359
    • Merge Requests 359
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #1121

Closed
Open
Opened Jan 26, 2007 by huschi@gmx.org@trac-huschi

Error message "Expecting a function type, but found `w_a1Kh'"

When compiling with GHC or loading into GHCi the following module I get a strange error:

module Bla where

bla :: String -> String
bla x = unwords $ [ ('#':) ]

The error is:

Bug.hs:4:20:
    Expecting a function type, but found `w_a1bp'
      Expected type: String
      Inferred type: [Char] -> [Char]
    In the expression: ('#' :)
    In the list element: ('#' :)

Writing the function as:

bla = words [ ('#':) ]

produces the correct error message with [Char] instead of `w_a1bp'.

I was doing this with GHC-6.4.2 on Ubuntu with a 2.6.17 kernel.

Edited Mar 09, 2019 by Simon Peyton Jones
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#1121