ennocramer / floskell

Floskell is a flexible Haskell source code pretty printer.
BSD 3-Clause "New" or "Revised" License
178 stars 22 forks source link

cannot format haskell source file which contains shebangs #72

Closed AleXoundOS closed 11 months ago

AleXoundOS commented 2 years ago

Trying to format this Main.hs:

#! /usr/bin/env nix-shell
#! nix-shell -p ghcid
#! nix-shell -p "haskellPackages.ghcWithPackages (p: with p; [ shower ])"
#! nix-shell -i "ghcid -c 'ghci -Wall' -T':!pkill --full ghc\\ .\\*./Main.hs' -T main"

module Main where

import Shower

main :: IO ()
main = printer "Hello"
$ floskell Main.hs 
floskell: Main.hs:1:1: Parse error: #!
CallStack (from HasCallStack):
  error, called at src/main/Main.hs:161:12 in main:Main
ennocramer commented 11 months ago

This problem has been addressed with floskell-0.11.0.