^ - No, it's not really. My question covers ADDING patterns and signature types interactively ... which seems to be impossible.
The simplest things you can try to do from earlier tutorials won't work in GHCi:
foo [] = []
foo (x:xs) = x : foo xs
This works if you put it in foo.hsand at the GHCi type prompt :load foo.hs. Then you can call foo on the list and return the list.
Googleโs early search queries tell you that you need a carrier in GHCi let. But in this case (a function defined with several templates) it will not work:
Prelude> let foo [] = []
Prelude> let foo (x:xs) = x : foo xs
Prelude> foo [1, 2, 3]
[1,2,3*** Exception: <interactive>:3:5-27: Non-exhaustive patterns
in function foo
The second โletโ rewrite the first โletโ. Leaving, let this not be an option. And it is not pleasant if you enter expressions like foo :: [a] -> [a].
, , . , ? ?