[Haskell-beginners] Warning: Tab Character
Thomas Jakway
tjakway at nyu.edu
Sun Nov 22 01:22:04 UTC 2015
Huh, cool. I had no idea. Thanks!
On Nov 21, 2015 7:44 PM, Dan Stromberg <strombrg at gmail.com> wrote:
>
>
> I believe the first version of make required tabs, but some subsequent versions have relaxed that requirement to make things easier.
>
> Here's an example on a Linux Mint system (the 20's are of course spaces) :
> $ od -cx < Makefile
> cmd output started 2015 Sat Nov 21 04:39:47 PM PST
> 0000000 \n g o : \n . / t \n \n
> 670a 3a6f 200a 2020 2e20 742f 0a0a
> 0000016
> above cmd output done 2015 Sat Nov 21 04:39:47 PM PST
> dstromberg at dell-inspiron:/var/tmp/make-tabs i686-pc-linux-gnu 25234
>
> $ make
> cmd output started 2015 Sat Nov 21 04:39:48 PM PST
> Makefile:3: *** missing separator. Stop.
> above cmd output done 2015 Sat Nov 21 04:39:48 PM PST
> dstromberg at dell-inspiron:/var/tmp/make-tabs i686-pc-linux-gnu 25234
>
> $ make --version
> cmd output started 2015 Sat Nov 21 04:39:53 PM PST
> GNU Make 3.81
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
>
> This program built for i686-pc-linux-gnu
> above cmd output done 2015 Sat Nov 21 04:39:53 PM PST
> dstromberg at dell-inspiron:/var/tmp/make-tabs i686-pc-linux-gnu 25234
>
>
> I'll add that vim's Makefile syntax highlighting puts the space-indented line in red, suggesting an error. Changing the spaces to a single tab makes the red go away.
>
> HTH
>
> On Sat, Nov 21, 2015 at 3:34 PM, Thomas Jakway <tjakway at nyu.edu> wrote:
>>
>> Why would make require tabs...?
>> Admittedly it's been a long time since I've written any makefiles by hand but I always use spaces instead of tabs and have never had any problems.
>>
>> On Nov 21, 2015 6:01 PM, David Moberg <kaddkaka at gmail.com> wrote:
>> >
>> > Have you found "soft tabs"? That option will make TextMate use spaces instead of tab characters. Read 4.11 "Using Spaces Instead of Tabs" in Dan Strombergs link for instrucitons.
>> >
>> > 2015-11-21 21:36 GMT+01:00 Jeon-Young Kang <jykang22 at gmail.com>:
>> >>
>> >> I've tried to choose "instead of spaces". But there is no option of mine (Textmate 2 beta).
>> >>
>> >> On Sat, Nov 21, 2015 at 3:14 PM, Dan Stromberg <strombrg at gmail.com> wrote:
>> >>>
>> >>>
>> >>> Perhaps enable soft tabs?
>> >>> https://manual.macromates.com/en/working_with_text
>> >>>
>> >>> This is an issue in Python too (at least from PEP8's perspective) - but note that many "make" programs require tabs instead of spaces.
>> >>>
>> >>> On Sat, Nov 21, 2015 at 11:13 AM, Jeon-Young Kang <jykang22 at gmail.com> wrote:
>> >>>>
>> >>>> Hello everyone.
>> >>>>
>> >>>>
>> >>>> I am a newbie of Haskell, using Textmate on mac.
>> >>>>
>> >>>>
>> >>>> I got the following warning. How can I fix it?
>> >>>>
>> >>>>
>> >>>> Warning:
>> >>>>
>> >>>> Tab character
>> >>>>
>> >>>> Ok, modules loaded: Main.
>> >>>>
>> >>>>
>> >>>>
>> >>>> Sincerely,
>> >>>> Young
>> >>>>
>> >>>> _______________________________________________
>> >>>> Beginners mailing list
>> >>>> Beginners at haskell.org
>> >>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Dan Stromberg
>> >>>
>> >>> _______________________________________________
>> >>> Beginners mailing list
>> >>> Beginners at haskell.org
>> >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Department of Geography
>> >> State University of New York at Buffalo
>> >>
>> >> jykang22 at gmail.com
>> >>
>> >> Jeon-Young Kang
>> >>
>> >> _______________________________________________
>> >> Beginners mailing list
>> >> Beginners at haskell.org
>> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>> >>
>> >
>> _______________________________________________
>> Beginners mailing list
>> Beginners at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
>
>
> --
> Dan Stromberg
More information about the Beginners
mailing list