Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,869
    • Issues 4,869
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 458
    • Merge requests 458
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #11409
Closed
Open
Created Jan 11, 2016 by Feuerbach@trac-Feuerbach

Cannot instantiate literals using TypeApplications

Relevant reddit post.


GHCi, version 8.0.1.20160110: http://www.haskell.org/ghc/  :? for help
Prelude> :set -XTypeApplications -fprint-explicit-foralls 
Prelude> :t 42
42 :: forall {a}. Num a => a
Prelude> 42 @Int

<interactive>:3:1: error:
    • Cannot not apply expression of type ‘a0’
      to a visible type argument ‘Int’
    • In the expression: 42 @Int
      In an equation for ‘it’: it = 42 @Int

(Also, "cannot not" looks like a typo.)

Edited Mar 10, 2019 by Icelandjack
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking