Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (12 sloc) 0.473 kB
{-# LANGUAGE NoImplicitPrelude #-}
module RecordPatternMatch2 where
import Language.Fay.FFI
import Language.Fay.Prelude
data Person = Person String String Int
main = print (case Person "Chris" "Done" 14 of
Person "Chris" "Done" 13 -> "Foo!"
Person "Chris" "Barf" 14 -> "Bar!"
Person "Chris" "Done" 14 -> "Hello!"
_ -> "World!")
print :: String -> Fay ()
print = ffi "console.log(%1)"
Jump to Line
Something went wrong with that request. Please try again.