Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
ex3
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
--ghc 8.0.1 /opt/ghc/8.0.1/lib/ghc-8.0.0.20160127/ main = print $ "Hello, world!" data Digit = Zero | One | Two deriving (Eq,Enum,Show) type Digits = [Digit] data Sign = Pos | Neg deriving (Eq,Show) newtype Numeral = Num (Sign,Digits) deriving (Eq,Show) canonize :: Numeral -> Numeral canonize n = n int2num :: Integer -> Numeral int2num n = Num(Pos, []) num2int :: Numeral -> Integer num2int n = 1
ghc
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
edit mode
|
history
|
discussion
stackse - search stackoverflow differently