This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/haskell/example.hs
Oleh Prypin 6f43092173
Also add auto-updatable output-based tests to examplefiles (#1689)
Co-authored-by: Georg Brandl <georg@python.org>
2021-01-20 10:48:45 +01:00

44 lines
786 B
Haskell

module ĈrazyThings where
import "base" Data.Char
import "base" Data.Char (isControl, isSpace)
import "base" Data.Char (isControl, --isSpace)
isSpace)
import "base" Data.Char (isControl, -- isSpace)
isSpace)
(-->) :: Num a => a -- signature
(-->) = 2 -- >implementation
--test comment
-- test comment
main :: IO ()
main = putStrLn "hello world"
gádd x y = x + y
ádd x y = x + y
data ĈrazyThings =
Ĉar |
House |
Peár
deriving (Show, Eq)
-- some char literals:
charl = ['"', 'a', '\ESC', '\'', ' ']
-- closed type families
type family Fam (a :: Type) = r :: Type where
Fam Int = True
Fam a = False
-- type literals
type IntChar = '[Int, Char]
type Falsy = 'False
type Falsy = '(10, 20, 30)
type EmptyList = '[]
type TypeCons = 1 ': '[]
type Times = 1 '* 2