Skip to content

Instantly share code, notes, and snippets.

@techtangents
Created April 25, 2015 00:17
Show Gist options
  • Save techtangents/2be1b891bec034e30e82 to your computer and use it in GitHub Desktop.
Save techtangents/2be1b891bec034e30e82 to your computer and use it in GitHub Desktop.
module Namespacing2 where
type Pos2DU = { x :: Number, y :: Number }
area :: Pos2DU -> Number
area {x = x, y = y} = x * y
data Pos2DT = Pos2DT { x :: Number, y :: Number }
area' :: Pos2DT -> Number
area' (Pos2DT {x = y, y = y}) = x * y
{-
⚡ psc Namespacing2.purs
Error at Namespacing2.purs line 12, column 33 - line 12, column 37:
Error in module Namespacing2
Unknown value 'x'
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment