On Wed, Jan 21, 2015 at 9:53 AM, Stephen Paul Weber
singpol...@singpolyma.net wrote:
This is very concening for me. Extensions should *never* be enabled by
default!
If you read on, you'll find that I was working from an older proposal that
was never implemented. It is instead a modified
Typed holes is not an extension, because it's considered a warning/error. The
reason for this is that code with typed holes is NOT valid haskell to begin
with, therefore the behaviour doesn't conflict with any description in the
report.
Additionally, the ability to disable the typed holes
The leading underscore invokes the typed holes extension. If you want to
use such names, you'll need {-# LANGUAGE NoTypedHoles #-} as the first line
of the source file. (I am not sure why this extension was enabled by
default.)
This is very concening for me. Extensions should *never* be
Typed holes is not an extension, because it's considered a warning/error.
The reason for this is that code with typed holes is NOT valid haskell to
begin with, therefore the behaviour doesn't conflict with any description
in the report.
Well, now I feel very silly about my last email to this
On Jan 21, 2015 9:53 AM, Stephen Paul Weber singpol...@singpolyma.net
wrote:
Having them on by default mean that valid Haskell2010 programs might get
rejected by GHC by default, which is a pretty bad state of affairs.
It would be if it were true. But it's not. All that changes is that you get
If such verbiage is added, it should probably read more like If you did
not intend to insert a typed hole, _foo may have been misspelled.
On Jan 21, 2015 9:11 AM, Volker Wysk vertei...@volker-wysk.de wrote:
Am Mittwoch, 21. Januar 2015, 11:03:38 schrieben Sie:
If there's any comments on how
Am Mittwoch, 21. Januar 2015, 11:03:38 schrieben Sie:
If there's any comments on how to improve the warning
message to be less confusing I'd be interested to hear them.
What about Found hole _foo with type: bar. This can also mean that _foo is
not in scope.
Bye
V.W.
Am Mittwoch, 21. Januar 2015, 09:42:05 schrieben Sie:
If such verbiage is added, it should probably read more like If you did
not intend to insert a typed hole, _foo may have been misspelled.
What about If you did not intend to insert a typed hole, _foo may have been
misspelled or out of
On Tue, Jan 20, 2015 at 1:36 PM, Volker Wysk vertei...@volker-wysk.de
wrote:
What is a hole?
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/typed-holes.html
When I replace _exit with foo, it produces a not in scope error, as
expected. What is special about _exit? It doesn't
Hello Volker,
All identifiers prefixed with an underscore are typed holes,
see:
https://downloads.haskell.org/~ghc/7.8.3/docs/html/users_guide/typed-holes.html
Edward
Excerpts from Volker Wysk's message of 2015-01-20 10:36:09 -0800:
Hello!
What is a hole?
This program fails to compile:
They are described at these two links:
https://www.haskell.org/haskellwiki/GHC/Typed_holes
https://downloads.haskell.org/~ghc/7.8.1-rc1/docs/html/users_guide/typed-holes.html
Essentially, identifiers that are not otherwise in scope and consist of an
underscore or that have a trailing underscore
Unless it behaves differently in GHC than GHCi, you can still use underscore
prefixed identifiers, provided they are in scope. I only get a type hole
message if the identifier isn't defined anywhere else.
let _x = 2
_x
2
_y
Found hole '_y' with type: t
...
--
View this message in context:
Just use exit_ or something instead. Typed holes are a *really useful*
mechanism.
On Tue, Jan 20, 2015 at 3:51 PM, migmit mig...@gmail.com wrote:
DON'T DO THAT!
Seriously, turn off compile-time type checking completely just to start an
identifier with an underscore???
Отправлено с iPad
20
FWIW- you can think of a 'hole' as a not in scope error with a ton of
useful information about the type such a term would have to have in order
to go in the location you referenced it.
This promotes a very useful style of type-driven development that is common
in Agda, where you write out your
Hello!
I've found what went wrong: _exit wasn't in scope, so it was interpreted to
be a typed hole.
Thanks
Volker
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
You can get typed holes to compile with a warning and a runtime error with
the -fdefer-type-errors flag, if that's what you want.
However, it's perfectly legal to use identifiers which look like typed
holes. This works fine on 7.8.3ghc:
_exit = print
main = _exit 0
On Tue, Jan 20, 2015 at 11:25
DON'T DO THAT!
Seriously, turn off compile-time type checking completely just to start an
identifier with an underscore???
Отправлено с iPad
20 янв. 2015 г., в 21:39, Alex Hammel ahamme...@gmail.com написал(а):
You can get typed holes to compile with a warning and a runtime error with
Hi!
Am Dienstag, 20. Januar 2015, 13:44:01 schrieben Sie:
The leading underscore invokes the typed holes extension. If you want to
use such names, you'll need {-# LANGUAGE NoTypedHoles #-} as the first line
of the source file.
I get this error, when I use {-# LANGUAGE NoTypedHoles #-}:
The only reference to a NoTypedHoles extension google can find is this
thread. Odd.
On Tue, Jan 20, 2015 at 11:22 AM, Volker Wysk vertei...@volker-wysk.de
wrote:
Hi!
Am Dienstag, 20. Januar 2015, 13:44:01 schrieben Sie:
The leading underscore invokes the typed holes extension. If you want
19 matches
Mail list logo