No, no difference.
It used to be that ghci was essentially an open I / O unit. But the inability to define new types in this syntactic form and the need to write let for each definition were considered annoying restrictions that often found themselves in the way of everyday interactive use, and therefore the ghci syntax gradually became more permissive. But this is just a syntactic change - nothing profound.
However, there is one thing to be aware of: if you want to run a block, you must do it explicitly. For instance,
> f [] = 3 > f (x:xs) = 4
equivalently
> let f [] = 3 > let f (x:xs) = 4
but not
> :{ | let f [] = 3 | f (x:xs) = 4 | :}
therefore, there will be a new definition of f , which is the shadow of the old one and will be defined only for non-empty lists, while you probably should have given two equations for one f . With automatic block mode ( :set +m ), ghci may notice that let started the block and will automatically provide you with the last one when you enter let , this way:
> let f [] = 3 | f (x:xs) = 4 |
This will not be done to define short forms (not let ).
source share