i'm tinkering with the Feb 2001 release of hugs, and came across the following problem while attempting to create my own prelude: module MyPrelude where import Prelude((:)) hd(x:xs) = x ... The compiler complains of a syntax error occuring in the import declaration: (unexpected symbol ":"). I may well be mistaken since i am somewhat new to haskell programming, but it seems to me that i ought to be able to explicitly import the list type constructor just like any other identifier. Thanks for a doing a great job supporting hugs, and keep up the good work... ________________________________ Jonathon Bell jbell@mathsoft.com MathSoft, Inc. www.mathsoft.com 101 Main St, Cambridge, MA 02142 (617) 577-1017 x745
On Thu, 1 Mar 2001, Jonathon Bell wrote:
i'm tinkering with the Feb 2001 release of hugs, and came across the following problem while attempting to create my own prelude:
module MyPrelude where
import Prelude((:))
hd(x:xs) = x ...
The compiler complains of a syntax error occuring in the import declaration: (unexpected symbol ":").
Here's a similar one: \begin{code} module Foo where import List (\\) apa bepa cepa = bepa \\ cepa \end{code} This module gives: ERROR bug.hs:3 - Syntax error in import declaration (unexpected symbol "\\") Both examples are correct haskell programs according to the report. /Josef
Josef Svenningsson wrote: | module Foo where | | import List (\\) | | apa bepa cepa = bepa \\ cepa Shouldn't this be: import List((\\)) (Double parantheses: one for the module import, one for the operator.) /Koen
Koen Claessen wrote:
Josef Svenningsson wrote:
| module Foo where | | import List (\\) | | apa bepa cepa = bepa \\ cepa
Shouldn't this be:
import List((\\))
(Double parantheses: one for the module import, one for the operator.)
You're right, ofcourse. (*slapping the forehead*) Sorry to bother you all. /Josef
participants (3)
-
Jonathon Bell -
Josef Svenningsson -
Koen Claessen