Closed DrYSG closed 4 years ago
@DrYSG: That's also puzzling to me, too. Both of those error messages suggest that the OverloadedStrings
language extension is not enabled, but your sample source code does show the extension. Is it possible that the extension was not enabled at the time you ran into that build failure?
@Gabriel439 is this something that might be compiler or stack related? (I am running on win10).
PS D:\CRIME\haskell-call> stack --version
Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2
PS D:\CRIME\haskell-call> ghci --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5
PS D:\CRIME\haskell-call>
or maybe I should be doing something in the package.yaml or stack.yaml to enable the OverloadedStrings
name: haskell-call
version: 0.1.0.0
github: "githubuser/haskell-call"
license: BSD3
author: "Author name here"
maintainer: "example@example.com"
copyright: "2020 Author name here"
extra-source-files:
- README.md
- ChangeLog.md
# Metadata used when publishing your package
# synopsis: Short description of your package
# category: Web
# To avoid duplicated efforts in documentation and dealing with the
# complications of embedding Haddock markup inside cabal files, it is
# common to point users to the README.md file.
description: Please see the README on GitHub at <https://github.com/githubuser/haskell-call#readme>
dependencies:
- base >= 4.7 && < 5
library:
source-dirs: src
dependencies:
- turtle
executables:
haskell-call-exe:
main: Main.hs
source-dirs: app
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- haskell-call
- turtle
tests:
haskell-call-test:
main: Spec.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- haskell-call
- turtle
@DrYSG: You shouldn't have to enable the extension in a project-wide file. Enabling the extension within the same module should be enough. If you can publish a branch that I can use to test or a minimal reproducing example it will probably help narrow things down further.
@Gabriel439 - I pushed it to: https://github.com/DrYSG/haskell-call
@DrYSG try moving the OverloadedStrings to be on top of the module definition. Like this:
{-# LANGUAGE OverloadedStrings #-}
module Main where
@santios yes, that fixes it. Thank you.
I looked at your tutorial at: https://hackage.haskell.org/package/turtle-1.5.16/docs/Turtle-Tutorial.html
and I don't understand why the echo "mytext" below is failing;
(the lines earlier work).