[EMAIL PROTECTED] reports the following problem.

Version:       1.4 
OS:            Windows NT 
compiler:       
configuration:  
Expected behaviour:

Observed behaviour:
Will not accept (:%) in a pattern.
Transcript:
      ___    ___   ___    ___   __________   __________
     /  /   /  /  /  /   /  /  /  _______/  /  _______/         Hugs 1.4
    /  /___/  /  /  /   /  /  /  / _____   /  /______
   /  ____   /  /  /   /  /  /  / /_   /  /______   /  The Nottingham and Yale
  /  /   /  /  /  /___/  /  /  /___/  /  _______/  /    Haskell User's System
 /__/   /__/  /_________/  /_________/  /_________/           June 1998

   Copyright (c) The University of Nottingham and Yale University, 1994-1998.
    Bug reports: [EMAIL PROTECTED]   Web: http://www.haskell.org/hugs.

Reading file "D:\hugs\lib\Prelude.hs":
Reading file "D:\mircea\Hugs\ratiobug.hs":
Reading file "D:\hugs\lib\Ratio.hs":
Reading file "D:\mircea\Hugs\ratiobug.hs":
Dependency analysis
ERROR "D:\mircea\Hugs\ratiobug.hs" (line 4): Undefined constructor function ":%"

Ratio> :i Ratio
-- type constructor
data Ratio a

-- constructors:
(:%) :: Integral a => a -> a -> Ratio a
infixl 7 :%

-- instances:
instance Integral a => Eq (Ratio a)
instance Integral a => Ord (Ratio a)
instance Integral a => Num (Ratio a)
instance Integral a => Real (Ratio a)
instance Integral a => Fractional (Ratio a)
instance Integral a => RealFrac (Ratio a)
instance Integral a => Enum (Ratio a)
instance (Integral a, Read a) => Read (Ratio a)
instance Integral a => Show (Ratio a)
instance Eval (Ratio a)

Ratio> :i :%
Unknown reference `:%'
Ratio>

Code:
import Ratio

f :: Rational -> Integer
f (n:%d) = n



Reply via email to