code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# Language OverloadedStrings #-} module Model.Note (indexNote) where import Text.HyperEstraier import Import import Data.Text (pack, unpack, append) import Network.URI import Data.Conduit.Pool indexNote :: NoteId -> UTCTime -> (Route App -> Text) -> Handler () indexNote noteId time urlRenderer = do i <- indexPool...
MasseR/introitu
Model/Note.hs
bsd-2-clause
1,249
0
13
273
442
213
229
30
1
module Database.Narc.Pretty where import Database.Narc.Common -- Pretty-printing ------------------------------------------------===== class Pretty t where pretty :: t -> String
ezrakilty/narc
Database/Narc/Pretty.hs
bsd-2-clause
183
0
7
22
32
19
13
4
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections...
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/tests/test-LogicGrowsOnTrees.hs
bsd-2-clause
4,743
0
20
1,266
1,471
780
691
99
3
{-# LANGUAGE GADTs #-} module RISK.Compile ( compile , indent , block ) where import Data.List (intercalate) import Language.GIGL import Text.Printf import RISK.Kernel import RISK.Spec -- | Compiles a configured RISK kernel to C. compile :: Spec -> String compile spec = unlines $ [ printf "void %s (void);...
tomahawkins/risk
RISK/Compile.hs
bsd-2-clause
3,245
0
17
956
1,127
546
581
84
20
--------------------------------------------------------------------------- -- | -- Module : Control.Agent.Free.Interfaces -- Copyright : (c) Nickolay Kudasov 2013 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : nickolay.kudasov@gmail.com -- Stability : experimental -- Portability :...
fizruk/free-agent
src/Control/Agent/Free/Interfaces.hs
bsd-3-clause
572
0
5
76
39
32
7
3
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Coord where import qualified Control.Monad.Random as Random import GHC.Generics import Prelude hiding (Either(..), id, (.)) import Control.Category import Data.Default import Control.Lens import Data.Map.Strict as Map import qualified System.Rando...
fros1y/umbral
src/Coord.hs
bsd-3-clause
4,858
0
14
1,295
2,315
1,237
1,078
139
4
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Miso.Html.Property -- Copyright : (C) 2016-2018 David M. Johnson -- License : BSD3-style (see the file LICENSE) -- Maintainer : David M. Johnson <djohnso...
dmjio/miso
src/Miso/Html/Property.hs
bsd-3-clause
16,824
0
10
2,818
2,327
1,288
1,039
278
2
main = interact deleteSpace deleteSpace "" = "" deleteSpace ('(':' ':cs) = '(' : deleteSpace cs deleteSpace (' ':')':cs) = ')' : deleteSpace cs deleteSpace ('[':' ':cs) = '[' : deleteSpace cs deleteSpace ('\n' : ' ' : ']' : cs) = '\n' : ' ' : ']' : deleteSpace cs deleteSpace (' ':']':cs) = ']' : deleteSpace cs ...
YoshikuniJujo/toyhaskell_haskell
tools/deleteSpaceInParens.hs
bsd-3-clause
364
14
9
78
195
97
98
8
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Freeze -- Copyright : (c) David Himmelstrup 2005 -- Duncan Coutts 2011 -- License : BSD-like -- -- Maintainer : cabal-devel@gmail.com -- Stability ...
garetxe/cabal
cabal-install/Distribution/Client/Freeze.hs
bsd-3-clause
8,787
0
20
2,239
1,602
862
740
166
3
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} import Control.Applicative import qualified Data.Aeson as A import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import Data.Maybe impor...
plow-technologies/dkrouter-generator
src/Main.hs
bsd-3-clause
1,940
0
12
470
526
283
243
49
2
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Instances () where import Prelude.Compat import Control.Applicative (empty) im...
dmjio/aeson
tests/Instances.hs
bsd-3-clause
6,571
0
15
1,985
2,112
1,102
1,010
151
0
{-# LANGUAGE MultiParamTypeClasses #-} module Physics.Falling3d.Box ( Box(..) , boxVolume , boxInertiaTensor ) where import Data.Vect.Double.Base import Physics.Falling.Shape.ImplicitShape import Physics.Falling3d.InertiaTensor3d -- | A 3D box described by its half-extents along each axis. -- /FIXME: will be replace...
sebcrozet/falling3d
Physics/Falling3d/Box.hs
bsd-3-clause
1,417
0
10
637
311
172
139
27
1
module Problem65 where import Data.Ratio main :: IO () main = print $ digitSum (numerator $ e 100) fk :: Int -> Integer fk x = case x `mod` 3 of 2 -> 2 * fromIntegral (x `div` 3 + 1) _ -> 1 fractions :: [Integer] fractions = map fk [1..] inverse :: Rational -> Rational inverse x = denominator x %...
noraesae/euler
src/Problem65.hs
bsd-3-clause
590
0
12
157
302
159
143
20
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} -- | Sample program that sends a signal to the given PID after N calls. module Main where import Control.Concurrent (threadDelay) import Control.Monad (...
noteed/sentry
bin/sentry-kill.hs
bsd-3-clause
3,914
0
17
825
971
508
463
105
2
module Language.TNT.Namer (name) where import Control.Applicative import Control.Comonad import Control.Monad.Identity hiding (mapM) import Data.Traversable import Language.TNT.Error import Language.TNT.Location import Language.TNT.Name import Language.TNT.Scope import Language.TNT.Stmt import Prelude hiding (looku...
sonyandy/tnt
Language/TNT/Namer.hs
bsd-3-clause
3,316
0
16
1,198
1,410
663
747
134
16
import System.Environment (getArgs) import Data.Char (isLower, isUpper) import Text.Printf (printf) ratios :: String -> String ratios s | t > 0 = printf "lowercase: %.2f uppercase: %.2f" (100 * l / t) (100 * u / t) | otherwise = "lowercase: 0.00 uppercase: 0.00" where l = fromIntegral (length [x...
nikai3d/ce-challenges
easy/lettercase.hs
bsd-3-clause
581
0
12
166
236
120
116
14
1
-- (c) The University of Glasgow 2006 {-# LANGUAGE CPP, DeriveDataTypeable #-} module TcEvidence ( -- HsWrapper HsWrapper(..), (<.>), mkWpTyApps, mkWpEvApps, mkWpEvVarApps, mkWpTyLams, mkWpLams, mkWpLet, mkWpCast, mkWpFun, idHsWrapper, isIdHsWrapper, pprHsWrapper, -- Evidence bindings TcEvBinds(..), EvB...
christiaanb/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
43,991
0
17
11,774
9,231
4,760
4,471
585
17
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} -- Needed to derive ToSym Tok Tok {-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, TypeFamilies #-} -- A lexer for Example 3. This is a really naive lexer and should not be used -- in production. It is merely for showing how the parser works. module Ex3FunLex ...
ollef/Grempa
examples/Ex3FunLex.hs
bsd-3-clause
2,811
0
10
738
1,109
578
531
67
1
{-# LANGUAGE TemplateHaskell #-} module SimulationDSL.Compiler.CodeGen ( compile , printQ ) where import qualified Data.Vector as V hiding ( (!) ) import Data.Vector ( (!) ) import Data.Char ( toUpper ) import Language.Haskell.TH hiding ( Exp ) import SimulationDSL.Data.Vector3 i...
takagi/SimulationDSL
SimulationDSL/SimulationDSL/Compiler/CodeGen.hs
bsd-3-clause
10,530
0
13
3,279
2,884
1,533
1,351
203
12
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.DebugLabel -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability :...
haskell-opengl/OpenGLRaw
src/Graphics/GL/EXT/DebugLabel.hs
bsd-3-clause
959
0
5
132
95
66
29
17
0
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} module Main where import Graphics.VR.Pal import Graphics.GL.Pal import Control.Monad.State.Strict import Control.Lens.Extra import Halive.Utils import Data.Time ...
lukexi/animation-pal
test/MainExplosion.hs
bsd-3-clause
2,981
0
22
895
840
425
415
-1
-1
module RomanNumbersKata.Day7Spec (spec) where import Test.Hspec import RomanNumbersKata.Day7 (toRomanNumber) spec :: Spec spec = do it "returns an empty string when given 0" (toRomanNumber 0 == "") it "returns \"I\" when given 1" (toRomanNumber 1 == "I") ...
Alex-Diez/haskell-tdd-kata
old-katas/test/RomanNumbersKata/Day7Spec.hs
bsd-3-clause
982
0
10
344
216
102
114
25
1
{-# LINE 1 "Foreign.Marshal.Utils.hs" #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Utils -- Copyright : (c) The FFI task force 2001 -- License : BSD-style (see the file li...
phischu/fragnix
builtins/base/Foreign.Marshal.Utils.hs
bsd-3-clause
5,794
0
12
1,410
1,108
605
503
69
1
module Codec.Archive.Smooth.Function where import Prelude import Data.Conduit import Control.Monad.Error.Class import qualified Data.ByteString.Lazy as LB import Data.ByteString (ByteString) import Control.Monad.Catch (MonadThrow) import Control.Monad.Trans.Resource ...
txkaduo/hs-simple-archive-conduit
Codec/Archive/Smooth/Function.hs
mit
3,744
0
13
1,297
725
389
336
-1
-1
{-# Language RebindableSyntax #-} {-# Language TypeOperators #-} {-# Language FlexibleContexts #-} {-# Language ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module PingMulti00 where import Prelude hiding (lo...
abakst/symmetry
checker/tests/neg/TestLookup00.hs
mit
1,595
0
18
691
496
260
236
35
1
-- -- -- ------------------ -- Exercise 10.18. ------------------ -- -- -- module E'10'18 where filterFirst :: (a -> Bool) -> [a] -> [a] filterFirst _ [] = [] filterFirst predicate ( item : remainingItems ) | not ( predicate item ) = remainingItems | otherwise = item : filterFirst predicate remainin...
pascal-knodel/haskell-craft
_/links/E'10'18.hs
mit
1,097
0
10
360
196
114
82
15
1
{-# LANGUAGE UnboxedTuples, ForeignFunctionInterface, NoImplicitPrelude #-} module Jhc.Prim(module Jhc.Prim.Bits, module Jhc.Prim, module Jhc.Prim.Prim, module Jhc.Prim.IO, module Jhc.Prim.Type.Basic, module Jhc.Prim.Type.Word) where import Jhc.Prim.Bits import Jhc.Prim.IO -- | this is wrapped around arbitrary expres...
dec9ue/jhc_copygc
lib/jhc/Jhc/Prim.hs
gpl-2.0
640
3
6
86
101
69
32
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : ./Syntax/AS_Structured.der.hs Description : abstract syntax of DOL OMS and CASL structured specifications Copyright : (c) Klaus Luettich, Uni Bremen 2002-2016 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stabilit...
spechub/Hets
Syntax/AS_Structured.der.hs
gpl-2.0
8,506
0
14
2,501
1,893
995
898
150
19
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/UpdateAutoScalingGroup.hs
mpl-2.0
11,144
0
13
2,121
1,318
795
523
150
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.ELB.Types.Product -- Copy...
olorin/amazonka
amazonka-elb/gen/Network/AWS/ELB/Types/Product.hs
mpl-2.0
51,270
0
24
10,544
8,921
5,160
3,761
850
1
module Darkdown ( module Darkdown.Parser ) where import Darkdown.Parser
davdar/maam
src/Darkdown.hs
bsd-3-clause
77
0
5
14
17
11
6
3
0
----------------------------------------------------------------------------- -- | -- Module : System.Environment -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : provisional -- Port...
alekar/hugs
packages/base/System/Environment.hs
bsd-3-clause
5,303
12
14
1,122
1,189
621
568
8
0
module Numeric.Band.Class ( Band , pow1pBand , powBand ) where import Numeric.Algebra.Idempotent
athanclark/algebra
src/Numeric/Band/Class.hs
bsd-3-clause
106
0
4
21
24
16
8
5
0
module Database.Redis ( -- * How To Use This Module -- | -- Connect to a Redis server: -- -- @ -- -- connects to localhost:6379 -- conn <- 'connect' 'defaultConnectInfo' -- @ -- -- Send commands to the server: -- -- @ -- {-\# LANGUAGE OverloadedStrings \#-} -- .....
gyfarkas/hedis
src/Database/Redis.hs
bsd-3-clause
6,399
0
6
1,767
308
255
53
25
0
{-# LANGUAGE NoMonomorphismRestriction #-} class Show a where show :: a -> String class Read a where read :: String -> a readShow x = read (show x) showRead s = show (read s) showReadMono s = let y = read s in (y, show y) -- read' s = let y = read s in y
themattchan/tandoori
input/class-sink-simple.hs
bsd-3-clause
283
0
9
85
104
51
53
9
1
----------------------------------------------------------------------------------------- -- | -- Module : FRP.Yampa.Diagnostics -- Copyright : (c) Antony Courtney and Henrik Nilsson, Yale University, 2003 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : nilsson@cs.ya...
ony/Yampa-core
src/FRP/Yampa/Diagnostics.hs
bsd-3-clause
806
0
11
156
125
71
54
6
1
{-# OPTIONS_GHC -cpp -fno-warn-unused-imports #-} {-# LANGUAGE CPP #-} #include "hs_src_config.h" -- Useful instances that don't belong anywhere else. module Util.Inst() where import Control.Applicative import Control.Monad.Identity(Identity(..)) import Data.Foldable(Foldable(..)) import Data.Monoid(Monoid(..)) impo...
hvr/jhc
src/Util/Inst.hs
mit
1,181
5
11
190
388
218
170
24
0
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ro-RO"> <title>Plug-n-Hack | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref ...
kingthorin/zap-extensions
addOns/plugnhack/src/main/javahelp/org/zaproxy/zap/extension/plugnhack/resources/help_ro_RO/helpset_ro_RO.hs
apache-2.0
972
78
68
158
419
212
207
-1
-1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ja-JP"> <title>Sequence Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <ma...
kingthorin/zap-extensions
addOns/sequence/src/main/javahelp/org/zaproxy/zap/extension/sequence/resources/help_ja_JP/helpset_ja_JP.hs
apache-2.0
977
78
66
159
413
209
204
-1
-1
{-# LANGUAGE PatternGuards, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, TypeSynonymInstances, ParallelListComp, DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.AvoidFloats -- Copyright : (c) 2014 Anders Engstro...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Layout/AvoidFloats.hs
bsd-2-clause
12,255
36
26
3,397
2,959
1,605
1,354
145
2
{-# LANGUAGE CPP, QuasiQuotes, TemplateHaskell, TypeFamilies, MultiParamTypeClasses, OverloadedStrings #-} module YesodCoreTest.WaiSubsite (specs, Widget) where import YesodCoreTest.YesodTest import Yesod.Core import qualified Network.HTTP.Types as H myApp :: Application myApp _ f = f $ responseLBS H.status200 [("Con...
Daniel-Diaz/yesod
yesod-core/test/YesodCoreTest/WaiSubsite.hs
mit
946
0
15
189
285
146
139
26
1
{-# LANGUAGE MagicHash, UnboxedTuples #-} import GHC.Exts import System.Environment main = do [n] <- fmap (fmap read) getArgs case g n of (# a, b, c, d, e, f, g, h, i #) -> print a -- a deep stack in which each frame is an unboxed tuple-return, to exercise -- the stack underflow machinery. g :: Int -> (# Int...
urbanslug/ghc
testsuite/tests/rts/stack003.hs
bsd-3-clause
537
0
10
135
238
140
98
12
1
{-# LANGUAGE ScopedTypeVariables, ViewPatterns, BangPatterns #-} {-| Module : Labyrinth.Flood Description : flood filling Copyright : (c) deweyvm 2014 License : MIT Maintainer : deweyvm Stability : experimental Portability : unknown Implementation of flood fill for arbitrary graphs. -} module Labyrinth.F...
deweyvm/labyrinth
src/Labyrinth/Flood.hs
mit
4,517
0
21
1,392
1,536
795
741
94
3
module Test where import qualified Data.Set as Set import qualified Data.Map as Map infixr 5 :-: data List a = Empty | a :-: (List a) deriving (Show, Read, Eq, Ord) infixr 5 .++ (.++) :: List a -> List a -> List a Empty .++ ys = ys (x:-:xs) .++ ys = x :-: (xs .++ ys) data Tree a = EmptyTree | Node a (Tree a) (Tree ...
doylew/practice
haskell/test.hs
mit
6,041
0
13
1,605
3,581
1,885
1,696
189
3
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module ElmodoroType ( Elmodoro(..) , migrateAll ) ...
ryandv/elmodoro
backend/ElmodoroType.hs
mit
765
0
7
212
66
43
23
14
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# LANGUAGE PatternGuards #-} module Database.Persist.Quasi ( parse , PersistSettings (..) , upperCaseSettings , lowerCaseSettings , stripId , nullable #if TEST , Token (..) , tokenize , parseFieldType #endif ) where impor...
gbwey/persistentold
persistent/Database/Persist/Quasi.hs
mit
9,748
0
20
3,315
3,426
1,746
1,680
242
13
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} import Core.Program import Core.Text import TechniqueUser ( commandCheckTechnique, commandFormatTechnique, ) #ifdef __GHCIDE__ version :: Version version = "0" #else version :: Version version...
oprdyn/technique
src/TechniqueMain.hs
mit
1,950
0
16
830
266
140
126
55
4
-- TypeLevel Operations {-# LANGUAGE GADTs #-} {-# LANGUAGE ExplicitForAll #-} -- a ≡ b data Eql a b where Refl :: Eql a a -- Congruence -- (f : A → B) {x y} → x ≡ y → f x ≡ f y cong :: Eql a b -> Eql (f a) (f b) cong Refl = Refl -- Symmetry -- {a b : A} → a ≡ b → a ≡ b sym :: Eql a b -> Eql b a sym Refl = Refl ...
Airtnp/Freshman_Simple_Haskell_Lib
Intro/WIW/Interpreter/TypeLevel.hs
mit
1,743
1
13
483
636
333
303
-1
-1
{-| Module : Main Description : A simulator for neutron beamlines Copyright : (c) Adam Washington, 2014 License : MIT Maintainer : adam.l.washington@gmail.com Stability : experimental Portability : POSIX This module performs a monte-carlo simulation of a neutron beamline.-} {-# LANGUAGE FlexibleContexts,...
rprospero/NeutronPipe
Main.hs
mit
4,267
0
16
910
1,364
724
640
84
1
import FPPrac extrX :: Number -> Number -> Number -> Number extrX a b c = (-b) / (2*a) extrY :: Number -> Number -> Number -> Number extrY a b c = a * x ^ 2 + b * x + c where x = extrX a b c
tcoenraad/functioneel-programmeren
practica/serie1/5.extreme-values.hs
mit
194
0
9
54
112
58
54
6
1
module Out.Roman ( romanizeWord , romanizeSyllables , romanizePhoneme ) where import ClassyPrelude hiding (Word) import Data.Text (toTitle) import HelperFunctions import Data.Language import Data.Phoneme import Data.Word import Data.Inflection import Out.IPA import Out.Syllable romanizeWord :: Language -> Word ->...
Brightgalrs/con-lang-gen
src/Out/Roman.hs
mit
8,266
0
17
1,733
3,590
1,823
1,767
-1
-1
{-# LANGUAGE ConstrainedClassMethods #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {- This module implements functi...
Haskell-Praxis/core-catcher
src/App/ConnectionMgnt.hs
mit
4,028
0
15
988
817
417
400
82
1
import Data.List import Data.Ord is_co_prime a b = gcd a b == 1 triangles2 p = [(a,b,c) | n <- [1..floor (sqrt $ fromIntegral p)], m <- [n+1..floor (sqrt $ fromIntegral p)], k <- [1..100], let a = (k * (m^2 - n^2)), let b = (k * (2*m*n)), let c = (k * (m^2 + n^2)), m > n, a+b+c==p, is_co_prime m n, (m-n) `mod` 2 ...
stefan-j/ProjectEuler
q39.hs
mit
413
4
15
92
319
167
152
5
1
module ReaderPractice where import Control.Applicative import Data.Maybe import Data.Monoid x = [1,2,3] y = [4,5,6] z = [7,8,9] -- from Data.List -- lookup :: Eq a => a -> [(a,b)] -> Maybe b --zip x and y using 3 as the lookup key xs :: Maybe Integer xs = lookup 3 $ zip x y --zip y and z using 6 as the lookup ke...
mitochon/hexercise
src/haskellbook/ch22/ch22.warmup.hs
mit
1,853
0
12
453
702
379
323
45
1
-- | -- Module : $Header$ -- Description : Definition of an abstract expression language as the first IR for the Ohua compiler. -- Copyright : (c) Sebastian Ertel, Justus Adam 2017. All Rights Reserved. -- License : EPL-1.0 -- Maintainer : dev@justus.science, sebastian.ertel@gmail.com -- Stability : exper...
ohua-dev/ohua-core
core/src/Ohua/DAGLang/Passes.hs
epl-1.0
630
0
3
111
20
18
2
1
0
module H36 where isPrime :: (Integral i) => i -> Bool isPrime 1 = False isPrime n = all (\x -> n `mod` x /= 0) [2..floor $ sqrt $ fromIntegral n] primeFactors :: (Integral i) => i -> [i] primeFactors n | isPrime n = [n] | otherwise = let f = head $ filter (\n' -> and [isPrime n', n `mod` n' == 0]) [2..n] ...
hsinhuang/codebase
h99/H36.hs
gpl-2.0
729
0
17
247
369
194
175
17
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Model.EventExplosion ( EventExplosion (..) ) where import Data.Aeson import GHC.Generics import Test.QuickCheck import Model.Event impo...
massimo-zaniboni/netrobots
robot_examples/haskell-servant/rest_api/lib/Model/EventExplosion.hs
gpl-3.0
770
0
10
132
151
89
62
24
0
module Types where data LispVal = Atom String | List [LispVal] | DottedList [LispVal] LispVal | Number Integer | String String | Bool Bool deriving Eq -- this is better done with the 'show' type class showVal :: LispVal -> String showVal (...
quakehead/haskell-scheme
Types.hs
gpl-3.0
796
0
9
218
242
128
114
19
1
module Main (main) where import Monite.Interpret import System.Environment (getArgs) import System.Console.Haskeline import System.Directory import System.FilePath import Control.Exception (AsyncException(..)) import Control.Monad.Except ( ExceptT, runExceptT ) import Control.Monad.State.Lazy ( MonadState, StateT, e...
sebiva/monite
src/Main.hs
gpl-3.0
5,505
0
16
1,296
1,309
675
634
99
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-cloudhsm/gen/Network/AWS/CloudHSM/DeleteHapg.hs
mpl-2.0
3,258
0
9
765
449
272
177
56
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-books/gen/Network/Google/Resource/Books/MyLibrary/Bookshelves/List.hs
mpl-2.0
4,850
0
18
1,104
711
414
297
104
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-replicapool-updater/gen/Network/Google/Resource/ReplicaPoolUpdater/RollingUpdates/Cancel.hs
mpl-2.0
4,146
0
17
957
469
280
189
76
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Revert.hs
mpl-2.0
4,556
0
19
1,154
779
452
327
110
1
import Control.Applicative ((<$>)) import Control.Monad (forM_) import Data.Aeson (eitherDecode) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy.Char8 as BLC import qualified Data.Yaml as Y import ...
rayqiu/jsonyaml
src/json2yaml.hs
apache-2.0
1,031
0
19
321
301
160
141
24
3
module PolygonSizes.A328787 (a328787) where import Data.Set (size) import Helpers.PolygonSizes (triangleSizes) a328787_list :: [Int] a328787_list = map size triangleSizes a328787 :: Int -> Int a328787 n = a328787_list !! (n - 2)
peterokagey/haskellOEIS
src/PolygonSizes/A328787.hs
apache-2.0
231
0
7
33
77
44
33
7
1
{-# LANGUAGE UnicodeSyntax #-} import Criterion.Main import System.Environment import LogicGrowsOnTrees import LogicGrowsOnTrees.Checkpoint import LogicGrowsOnTrees.Utils.PerfectTree (trivialPerfectTree) import LogicGrowsOnTrees.Utils.WordSum import qualified LogicGrowsOnTrees.Parallel.Adapter.Threads as Threads impo...
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/benchmarks/tree-versus-list-trivial-tree.hs
bsd-2-clause
1,479
0
12
278
341
185
156
31
1
{-# LANGUAGE Haskell2010 #-} module Visible where visible :: Int -> Int visible a = a
haskell/haddock
html-test/src/Visible.hs
bsd-2-clause
86
0
5
16
22
13
9
4
1
{-# LANGUAGE Haskell2010 #-} -- Just like Bug308 module but here we test that referring to anchors -- from other modules works. module Bug308CrossModule where import Bug308 {-| start "Bug308#startAnchor" startOldStyle "Bug308\#startAnchor" middle "Bug308#middleAnchor" end "Bug308#middleAnchor" -} h :: () h = ()
haskell/haddock
html-test/src/Bug308CrossModule.hs
bsd-2-clause
318
0
5
48
25
17
8
5
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} ...
dalaing/type-systems
src/Fragment/TmApp/Ast/Term.hs
bsd-3-clause
2,713
0
10
533
1,047
552
495
55
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -Wall #-} -- | An interface to bitcoind's available raw transaction-related RPC calls. -- The implementation of these functions can be found at -- <https://github.com/bitcoin/bitcoin/blob/master/src/rpcrawtransaction.cpp>. -- -- I...
cgaebel/network-bitcoin
src/Network/Bitcoin/RawTransaction.hs
bsd-3-clause
17,379
0
19
7,573
2,291
1,273
1,018
235
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} -- | -- Additional data types module Data.Protobuf.Internal.Types ( -- * Double map DMap , emptyDMap , fromL2Map , lookupDMap , lookupDMap2 , insertDMapM , i...
Shimuuar/protobuf
Data/Protobuf/Internal/Types.hs
bsd-3-clause
2,528
0
16
772
729
390
339
51
3
-- | HUnit expriments -- tutoralial located at: <https://leiffrenzel.de/papers/getting-started-with-hunit.html> module FindIdentifier_Test where import FindIdentifier (findIdentifier) import Test.HUnit borderCases = TestLabel "Border test cases" (TestList [ testEmpty, testNegCursor, testComment ]) testEmpty = T...
emaphis/Haskell-Practice
testing-project/test/FindIdentifier_Test.hs
bsd-3-clause
1,051
0
10
162
250
137
113
18
1
{-# LANGUAGE ScopedTypeVariables #-} module Foundation where import Prelude import Yesod import Yesod.Static import Yesod.Default.Config import Yesod.Default.Util (addStaticContentExternal) import Network.HTTP.Conduit (Manager) import qualified Settings import Settings.Development (development) import Settings.StaticF...
prowdsponsor/mangopay
yesod-mangopay/app/Foundation.hs
bsd-3-clause
6,597
0
15
1,398
977
533
444
-1
-1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} module SymbolicDifferentiation.SExp where import SymbolicDifferentiation.AlphaSyntax (Exp(N, V, Plus, Times)) import qualified Data.SCargot as S import Data.SCargot.Language.Basic (basicParser) import Data.SCargot.Repr.WellFormed (WellFormedSExpr...
FranklinChen/twenty-four-days2015-of-hackage
src/SymbolicDifferentiation/SExp.hs
bsd-3-clause
2,030
0
13
355
665
355
310
47
3
module Problem89 where import Data.List import Data.Maybe main :: IO () main = readFile "txt/89.txt" >>= print . sum . map characterSaved . lines characterSaved :: String -> Int characterSaved x = length x - length (write . value $ x) where value [] = 0 value xs = (\(pre, val) -> val + value (fromJ...
adityagupta1089/Project-Euler-Haskell
src/problems/Problem89.hs
bsd-3-clause
921
0
16
371
361
206
155
33
3
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 HsImpExp: Abstract syntax: imports, exports, interfaces -} {-# LANGUAGE DeriveDataTypeable #-} module HsImpExp where import Module ( ModuleName ) import HsDoc ( HsDocString ) import OccName ...
GaloisInc/halvm-ghc
compiler/hsSyn/HsImpExp.hs
bsd-3-clause
9,411
0
19
3,161
1,705
924
781
115
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FunctionalDependencies, FlexibleInstances, DeriveDataTypeable #-} -- | A CoherentWorker is one that doesn't need to return everything at once... module Rede.MainLoop.CoherentWorker( getHeaderFromFlatList , waitRequestBody ...
loadimpact/http2-test
hs-src/Rede/MainLoop/CoherentWorker.hs
bsd-3-clause
2,909
0
19
696
496
288
208
55
2
{-# LANGUAGE LambdaCase #-} module Language.Brainfuck.Internals.Optim.CopyLoop where import Language.Brainfuck.Internals.Instructions import qualified Data.Map as M import Control.Monad.State -- | Loop is optimizable only if it contains only basic operations: -- * Incr -- * Decr -- * MoveLeft -- * MoveRight optimiz...
remusao/Hodor
src/Language/Brainfuck/Internals/Optim/CopyLoop.hs
bsd-3-clause
1,776
0
18
368
748
390
358
33
3
{- | Main Datatype to hold information about a job, and function to calculate thread delay -} module TinyScheduler.Jobs ( Job(..) , makeJob , timeAtomToJob ) where import Data.Time import Prelude hiding (id) import TinyScheduler.Time import TinyScheduler.TimeAtom import TinyScheduler.Utils (calculateDelay)...
functor-soup/tiny-scheduler
TinyScheduler/Jobs.hs
bsd-3-clause
912
0
10
184
231
131
100
17
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Blackbox.App where ------------------------------------------------------------------------------ imp...
23Skidoo/snap-templates
test/suite/Blackbox/App.hs
bsd-3-clause
3,980
1
18
763
897
465
432
85
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE KindSignatures, DataKinds #-} ----------------------------------------------------------------------------- -- | -- Module : Geometry.Math.Numerical -- Copyright : Copyright (C) 2015 Artem M. Chirkin...
achirkin/fgeom
src/Geometry/Math/Optimization.hs
bsd-3-clause
7,994
0
21
2,914
2,702
1,387
1,315
125
1
module Main where import Database.Relational.Query (relationalQuery) import Database.HDBC.Session (withConnectionIO, handleSqlError') import Database.HDBC.Record.Query (runQuery) import DataSource import HrrDatatypeTest main :: IO () main = handleSqlError' $ withConnectionIO connect $ \conn -> do runQuery conn (...
amutake/haskell-relational-record-driver-oracle
example/src/main.hs
bsd-3-clause
366
0
12
45
100
57
43
9
1
module SSAReduce where import SSA import Syntax import qualified Data.Map as Map reduceFundef :: SSAFundef -> SSAFundef reduceFundef fundef@(SSAFundef {blocks = blks} ) = mapEndoBlock (reduceBlock (map blkID blks)) fundef where blkID (Block x _ _ _) = x reduceBlock :: [BlockID] -> Block -> Block reduceBlock blkI...
koba-e964/hayashii-mcc
SSAReduce.hs
bsd-3-clause
1,387
0
15
352
623
308
315
30
12
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Database.Concelo.Crypto ( derivePrivate , derivePublic , fromPublic , toPublic , fromPrivate , toPrivate , dummyKey , fromSymmetric , toSymmetric , newSy...
Concelo/concelo
src/Database/Concelo/Crypto.hs
bsd-3-clause
6,516
0
15
1,306
1,861
983
878
171
3
{-# language QuasiQuotes #-} {-# language TemplateHaskell #-} module OpenCV.Internal.Core.Types.Rect.TH ( mkRectType ) where import "base" Data.Monoid ( (<>) ) import "base" Foreign.Marshal.Utils ( toBool ) import "base" System.IO.Unsafe ( unsafePerformIO ) import qualified "inline-c" Language.C.Inline.Unsafe as ...
Cortlandd/haskell-opencv
src/OpenCV/Internal/Core/Types/Rect/TH.hs
bsd-3-clause
5,922
0
26
1,965
1,159
632
527
-1
-1
{-#LANGUAGE MultiParamTypeClasses #-} {-#LANGUAGE OverloadedStrings #-} {-#LANGUAGE ViewPatterns #-} module Twilio.AuthorizedConnectApp ( -- * Resource AuthorizedConnectApp(..) , ConnectAppSID , Twilio.AuthorizedConnectApp.get ) where import Control.Applicative import Control.Monad import Control.Monad.Ca...
seagreen/twilio-haskell
src/Twilio/AuthorizedConnectApp.hs
bsd-3-clause
2,078
0
22
488
442
249
193
71
1
{-# LANGUAGE RankNTypes #-} module Graphics.Rendering.GLPlot.Types where import Linear import Graphics.UI.GLFW as GLFW import Graphics.Rendering.OpenGL.GL hiding (Points, Lines, Rect) import qualified Data.Vector.Storable as V import Control.Concurrent (ThreadId) import Control.Concurrent.STM -- | A main loop contex...
bgamari/gl-plot
Graphics/Rendering/GLPlot/Types.hs
bsd-3-clause
1,602
0
15
666
393
227
166
63
1
import Control.Arrow ((&&&)) import Test.Hspec (Spec, it, shouldBe, shouldNotBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import qualified Data.Vector as Vector (fromList) import Matrix ( Matrix , cols , column , flatten , fromList , fromString , reshape , row ,...
c19/Exercism-Haskell
matrix/test/Tests.hs
mit
2,094
0
13
588
784
414
370
54
1
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ro-RO"> <title>Forced Browse Add-On</title> <maps> <homeID>top</homeID> <mapref locati...
veggiespam/zap-extensions
addOns/bruteforce/src/main/javahelp/org/zaproxy/zap/extension/bruteforce/resources/help_ro_RO/helpset_ro_RO.hs
apache-2.0
966
79
67
158
415
210
205
-1
-1
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="bs-BA"> <title>Customizable HTML Report</title> <maps> <homeID>top</homeID> <mapref lo...
veggiespam/zap-extensions
addOns/customreport/src/main/javahelp/org/zaproxy/zap/extension/customreport/resources/help_bs_BA/helpset_bs_BA.hs
apache-2.0
970
79
66
158
411
208
203
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | -- Module : Documentation.Haddock.Parser -- Copyright : (c) Mateusz Kowalczyk 2013-2014, -- Simon Hengel 2013 -- License : BSD-like -- -- Maintainer : haddock@projects.haskell.org -- Stability : experimental...
mrBliss/haddock
haddock-library/src/Documentation/Haddock/Parser.hs
bsd-2-clause
20,544
0
20
4,725
5,270
2,776
2,494
322
22
-- | -- Module : Data.ByteString.Search -- Copyright : Daniel Fischer (2007-2011) -- Chris Kuklewicz -- Licence : BSD3 -- Maintainer : Daniel Fischer <daniel.is.fischer@googlemail.com> -- Stability : Provisional -- Portability : non-portable (BangPatterns) -- -- Fast ove...
seereason/stringsearch
Data/ByteString/Search.hs
bsd-3-clause
10,918
0
9
2,670
525
395
130
55
1
-- | main entry point for tests module Main where import Test.Framework import Test.Unit import Test.Pretty import Test.Diff import Test.Arbitrary -- entry point for the test-suite main = defaultMain tests tests = [tests_diff ,tests_unit ,test_arbitrary --,tests_pretty -- disabled t...
sinelaw/language-ecmascript
test/TestMain.hs
bsd-3-clause
364
0
5
90
54
34
20
10
1
module Graphics.Wayland.Scanner.Protocol ( readProtocol, parseFile ) where import Data.Functor import Data.Maybe import Data.Char import Text.XML.Light import System.Process import Language.Haskell.TH (mkName) import Graphics.Wayland.Scanner.Types import Graphics.Wayland.Scanner.Names interface = QName "interfa...
abooij/haskell-wayland
Graphics/Wayland/Scanner/Protocol.hs
mit
3,814
0
23
923
945
481
464
72
4
-- It is generally a good idea to keep all your business logic in your library -- and only use it in the executable. Doing so allows others to use what you -- wrote in their libraries. import qualified Example main :: IO () main = Example.main
wz1000/haskell-webapps
ServantOpaleye/executable/Main.hs
mit
245
0
6
48
25
15
10
3
1
{-# LANGUAGE OverloadedStrings #-} module Trace.Hpc.Coveralls.GitInfo (getGitInfo, GitInfo) where import Control.Applicative ((<$>), (<*>)) import Control.Monad (guard) import Data.Aeson import Data.List (nubBy) import Data.Function (on) import System.Process (readProcess) data GitInfo = GitInfo { headRef :: Commit ...
jdnavarro/hpc-coveralls
src/Trace/Hpc/Coveralls/GitInfo.hs
bsd-3-clause
2,381
0
14
836
652
359
293
50
1
module Distribution.Server.Packages.ChangeLog ( isChangeLogFile ) where import System.FilePath (splitExtension) import Data.Char as Char isChangeLogFile :: FilePath -> Bool isChangeLogFile fname = map Char.toLower base `elem` basenames && ext `elem` extensions where (base, ext) =...
agrafix/hackage-server
Distribution/Server/Packages/ChangeLog.hs
bsd-3-clause
456
0
9
97
121
73
48
10
1
import System.Environment import System.IO import Text.ParserCombinators.Parsec import Control.Monad import Data.ByteString.Lazy.Char8 as BS hiding (take,drop,filter,head,last,map,zip,repeat) import Control.Applicative hiding ((<|>), many) import Data.Char {-- join2(Open usp Tukubai) designed by Nobuaki Tounaka writt...
ShellShoccar-jpn/Open-usp-Tukubai
COMMANDS.HS/join2.hs
mit
6,716
0
16
2,032
2,401
1,236
1,165
105
6
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE StandaloneDeriving #-} module PlaceHolder where import Type ( Type ) import Outputable import Name import NameSet import RdrName import Var import Coercion import Con...
tjakway/ghcjvm
compiler/hsSyn/PlaceHolder.hs
bsd-3-clause
3,361
0
10
710
509
293
216
60
1
module Main where import Eval import Parser import Pretty import Control.Monad.Trans import System.Console.Haskeline process :: String -> IO () process line = do let res = parseExpr line case res of Left err -> print err Right ex -> case eval ex of Nothing -> putStrLn "Cannot evaluate" Just r...
yupferris/write-you-a-haskell
chapter3/calc/Main.hs
mit
576
0
15
141
195
95
100
21
3