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 TemplateHaskell #-}
{-| Implementation of the Ganeti LUXI interface.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either ver... | narurien/ganeti-ceph | src/Ganeti/Luxi.hs | gpl-2.0 | 16,121 | 0 | 21 | 4,451 | 3,998 | 2,125 | 1,873 | 354 | 23 |
{-# LANGUAGE PatternGuards #-}
module StackMachine.SMAssembler
(
assembleAndLoadFile
-- testing
, assemble
) where
import Control.Monad.State
import Data.Char (isSpace)
import System.IO
import StackMachine.Emulator
data AssState = Init | Label | SingleByteOp | MultiByteIntOp | MultiByteStringOp | Add... | zebbo/stack-machine | src/StackMachine/SMAssembler.hs | gpl-3.0 | 2,659 | 0 | 19 | 607 | 1,254 | 697 | 557 | 59 | 3 |
module Main where
import Common
import Common.IO
import Infix
import Lexer
import Parser
import Pretty
import Renamer
import Syntax
import Text.Show.Pretty
runPhase :: (MonadIO m) => (i -> FM String) -> i -> m ()
runPhase f xs = liftIO . mapM_ putStrLn $ maybeToList out ++ map ppShow errs
where
(out, errs) = ... | ktvoelker/FLang | src/Main.hs | gpl-3.0 | 1,086 | 0 | 12 | 235 | 411 | 216 | 195 | -1 | -1 |
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
module Fp14SimpleLens where
{-
{-
Линза - инструмент для манипулирования элементом типа a некоторой структуры данных типа s,
находящи... | ItsLastDay/academic_university_2016-2018 | subjects/Haskell/14/fp14SimpleLens.hs | gpl-3.0 | 8,713 | 0 | 10 | 2,541 | 927 | 532 | 395 | 43 | 1 |
import Data.List( permutations, sortBy )
import Data.Ord( comparing )
import Control.Monad( forM_ )
combinations :: Eq a => Int -> [a] -> [[a]]
combinations 0 _ = [[]]
combinations _ [] = []
combinations n (x:xs) = map (x:) (combinations (n-1) xs) ++ combinations n xs
{-| Problem 46
(**) Define predicates and/2, or/2... | zhensydow/ljcsandbox | lang/haskell/99problems/46-50logic.hs | gpl-3.0 | 5,354 | 0 | 17 | 1,142 | 988 | 522 | 466 | 47 | 2 |
{-
Author: Michal Gerard Parusinski
Maintainer: TBD
Email: TBD
License: GPL 3.0
File: Proof.hs
Description: provides a framework to build and handle description logic proofs
-}
module Proof where
import Signature
import Data.List
-- TODO: Add somehow knowledge base
-- TODO: Build up the proof rule... | j5b/ps-pc | Proof.hs | gpl-3.0 | 649 | 0 | 6 | 173 | 76 | 48 | 28 | 9 | 0 |
module Types where
import Data.Word (Word32)
{-# LANGUAGE BangPatterns #-}
data Point = P !Int !Int deriving Eq
type Stage = [Point]
type Item = Maybe Point
-- North, South, East, West
data Direction = N | S | E | W
data GameMode = Game | End | Save GameMode | Load GameMode | Editor | Scoreboard
deriving Eq
dat... | mikeplus64/Level-0 | src/Types.hs | gpl-3.0 | 719 | 0 | 9 | 229 | 195 | 123 | 72 | -1 | -1 |
module Main where
import Codec.Image.LibPNG
spectrum :: [[Pixel]]
spectrum = replicate 40 $ map (\g -> colorPixel 255 255 g 0) [0..255]
++ map (\r -> colorPixel 255 r 255 0) [254,253..1]
++ map (\b -> colorPixel 255 0 255 b) [0..255]
... | waterret/LibPNG-haskell | src/Main.hs | gpl-3.0 | 1,172 | 0 | 13 | 317 | 514 | 269 | 245 | 26 | 2 |
-- Based on another answer very heavily
-- Problem being that it repeats same letters
import Data.List
main = do
words <- slowChange <$> getLine <*> getLine
putStrLn . unlines $ words
where slowChange xs ys = zipWith (++) (inits ys) (tails xs)
| jandersen7/Daily | src/295e/hs/LbyL.hs | gpl-3.0 | 258 | 0 | 9 | 57 | 72 | 37 | 35 | 5 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-container/gen/Network/Google/Resource/Container/Projects/Locations/Clusters/SetMonitoring.hs | mpl-2.0 | 5,878 | 0 | 16 | 1,241 | 779 | 455 | 324 | 119 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-directconnect/gen/Network/AWS/DirectConnect/DescribeInterconnects.hs | mpl-2.0 | 4,100 | 0 | 10 | 773 | 496 | 299 | 197 | 58 | 1 |
{-# LANGUAGE GADTs, RankNTypes, TypeOperators, FlexibleInstances #-}
module Walk where
import Test.QuickCheck
import Data.List
import Control.Monad
import Control.Applicative
import Induction.Structural
import Trace
import EnvTypes
import Env
import Util
construct :: VarMap -> Hyp -> Gen [Repr']
construct vm (hyps,... | danr/structural-induction | test/Walk.hs | lgpl-3.0 | 2,297 | 0 | 23 | 714 | 736 | 365 | 371 | 49 | 5 |
module Freshen where
import TrmX
import qualified Data.List as L
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Data.Char as C
--------------------------------------------------------------------------------------------
{-Wrappers-}
{-Function that genenerates new freshness constrai... | susoDominguez/eNominalTerms-Alpha | Freshen.hs | unlicense | 4,702 | 0 | 15 | 1,365 | 1,542 | 825 | 717 | 59 | 3 |
--Мамылин Дмитрий, группа: МТ-202. Задача на зачет по КН: Master Mind.
{-Очень хотелось реализовать ввод/вывод с минимумом нажатий клавиши Enter,
но под Windows GHC не позволяет: https://ghc.haskell.org/trac/ghc/ticket/2189
Вспомнилась очень удобная библиотека (только под Windows, к сожалению),
из языка C - <conio.h>.... | dmamylin/MasterMind | masterMind.hs | unlicense | 5,247 | 0 | 15 | 1,240 | 998 | 511 | 487 | 90 | 5 |
module SAML2.XML.Schema
( ns
, module SAML2.XML.Schema.Datatypes
) where
import SAML2.XML.Types
import SAML2.XML.Schema.Datatypes
ns :: Namespace
ns = mkNamespace "xs" $ httpURI "www.w3.org" "/2001/XMLSchema" "" ""
| dylex/hsaml2 | SAML2/XML/Schema.hs | apache-2.0 | 224 | 0 | 6 | 35 | 59 | 36 | 23 | 7 | 1 |
module Minecraft.A328446 (a328446, a328446_list, a328446_row) where
import Math.NumberTheory.Powers (integerRoot)
a328446 :: Int -> Int
a328446 n = a328446_list !! (n - 1)
a328446_list :: [Int]
a328446_list = concatMap a328446_row [1..]
a328446_row :: Int -> [Int]
a328446_row 0 = []
a328446_row 1 = [0]
a328446_row 2... | peterokagey/haskellOEIS | src/Minecraft/A328446.hs | apache-2.0 | 560 | 0 | 12 | 132 | 278 | 145 | 133 | 18 | 1 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies #-}
{-# LANGUAGE OverloadedStrings, MultiParamTypeClasses #-}
{-# LANGUAGE CPP #-}
module Foundation
( TierList (..)
, TierListRoute (..)
, TierListMessage (..)
, resourcesTierList
, Handler
, Widget
, maybeAuth
, requireAuth
, ... | periodic/Simple-Yesod-ToDo | Foundation.hs | bsd-2-clause | 5,961 | 0 | 17 | 1,206 | 842 | 480 | 362 | 80 | 1 |
{-# LANGUAGE GADTs #-}
module Control.Monad.Shmonad.Conditional where
class Boolean b
class CondCommand c
data If b where
If :: (Boolean b) => b -> If b
data PartialCond b c where
Then :: (Boolean b, CondCommand c) => If b -> c -> PartialCond b c
ElifThen :: (Boolean b, CondCommand c) => PartialCond b c -> b -... | corajr/shmonad | src/Control/Monad/Shmonad/Conditional.hs | bsd-2-clause | 951 | 0 | 11 | 223 | 469 | 241 | 228 | -1 | -1 |
module Data.Strict.Tuple where
import Data.Bifunctor
data Pair a b = Pair !a !b
data Triple a b c = Triple !a !b !c
data Quadruple a b c d = Quadruple !a !b !c !d
instance Functor (Pair a) where
fmap f (Pair a b) = Pair a (f b)
{-# INLINE fmap #-}
instance Bifunctor Pair where
bimap f g ... | effectfully/prefolds | src/Data/Strict/Tuple.hs | bsd-3-clause | 1,825 | 0 | 8 | 492 | 861 | 443 | 418 | 79 | 1 |
print_list [] = return()
print_list x = do
print (head x)
print_list (tail x)
main = do
let a = [i | i <- [1..100], (mod i 5) == 0]
print_list a
| yuncliu/Learn | haskell/list_comprehension.hs | bsd-3-clause | 162 | 0 | 14 | 49 | 100 | 47 | 53 | 7 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{- |
Imports used in the whole codebase. (All modules import this one instead of
the "Prelude".)
-}
module Imports
(
module X,
LByteString
)
where
import BasePrelude as X
hiding (Category, GeneralCategory, lazy, Handler, diff, option)
-- Lists
import ... | aelve/hslibs | src/Imports.hs | bsd-3-clause | 1,349 | 0 | 5 | 477 | 217 | 157 | 60 | 25 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
module Allegro.Timer
( -- * Operations
Timer
, createTimer
, startTimer
, stopTimer
, isTimerStarted
, getTimerCount
, setTimerCount
, addTimerCount
, getTimerSpeed
, setTimerSpeed
-- * Events
, TimerEvent
, evTimer
, evCount
-- * Exceptions
, Fa... | yav/allegro | src/Allegro/Timer.hs | bsd-3-clause | 3,329 | 0 | 12 | 813 | 919 | 485 | 434 | 80 | 1 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Safe #-}
{- |
Module : Physics.Learn.Mechanics
Copyright : (c) Scott N. Walck 2014-2019
License : BSD3 (see LICENSE)
Maintainer : Scott N. Walck <walck@lvc.edu>
Stability : experimental
Newton's second law and all that
-}
module... | walck/learn-physics | src/Physics/Learn/Mechanics.hs | bsd-3-clause | 8,111 | 0 | 9 | 1,927 | 1,068 | 643 | 425 | 107 | 1 |
{-
- The Pee Shell, an interactive environment for evaluating pure untyped pee terms.
- Copyright (C) 2005-2007, Robert Dockins
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; ... | dmwit/pi-eta-epsilon | src/Language/PiEtaEpsilon/Interactive/CmdLine.hs | bsd-3-clause | 8,430 | 0 | 14 | 2,026 | 1,723 | 918 | 805 | 147 | 8 |
{-# LANGUAGE
CPP,
StandaloneDeriving,
DeriveFoldable,
DeriveTraversable #-}
module Data.PairMonad where
import Control.Applicative
-- #ifdef __HAS_LENS__
import Control.Lens()
-- #endif __HAS_LENS__
import Data.Monoid
import Data.Foldable
import Data.Traversable
-- Equivalent to the Monad Writer i... | FranklinChen/music-score | src/Data/PairMonad.hs | bsd-3-clause | 575 | 0 | 8 | 107 | 117 | 70 | 47 | 14 | 0 |
module CountingFilter (
empty,
insert,
insertMany,
CountingFilter) where
import qualified Data.Map
type CountingFilter a = Data.Map.Map a Integer
-- | Produce an empty counting filter.
empty :: (Ord a) => CountingFilter a
empty = Data.Map.empty
-- | Increment the value in the given filter once.
insert :: (Ord... | TinnedTuna/shannon-entropy-estimator | src/CountingFilter.hs | bsd-3-clause | 660 | 8 | 9 | 123 | 185 | 103 | 82 | 15 | 1 |
module Instances where
import Control.Applicative
import Test.QuickCheck
import Rainbow.Types
import qualified Data.Text as X
newtype ChunkA = ChunkA Chunk
deriving (Eq, Ord, Show)
newtype TextA = TextA X.Text
deriving (Eq, Ord, Show)
instance Arbitrary TextA where
arbitrary = (TextA . X.pack) <$> listOf arbi... | massysett/prednote | tests/Instances.hs | bsd-3-clause | 382 | 0 | 9 | 64 | 117 | 67 | 50 | 13 | 0 |
{-# LANGUAGE FlexibleContexts #-}
module NinetyNine.Problem27 where
import Data.List (zipWith, permutations)
-- import Test.Hspec
-- Group the elements of a set into disjoint subsets.
-- cde = zipWith (+) [1,2] [3, 4]
-- zipWith take [12, 3, 4] (permutations ["aldo","beat","carla","david","evi","flip","gary","hugo... | chemouna/99Haskell | src/problem27.hs | bsd-3-clause | 770 | 0 | 12 | 140 | 197 | 116 | 81 | 9 | 1 |
{-# LANGUAGE RecordWildCards, BangPatterns #-}
module Main where
import System.Exit (ExitCode(..))
import System.Console.ANSI
import System.Process (readProcessWithExitCode)
import System.Timeout (timeout)
import Control.Concurrent
import Control.Monad
import Data.Monoid
import Data.Time.Clock
import Data.String.Ut... | jhickner/minions | minions.hs | bsd-3-clause | 3,570 | 0 | 14 | 1,069 | 1,123 | 569 | 554 | 96 | 3 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Error-checking and other utilities for @deriving@ clauses or declarations.
-}
{-# LANGUAGE TypeFamilies #-}
module TcDerivUtils (
DerivM, DerivEnv(..),
DerivSpec(..), pprDerivSpec,
DerivSpecMechan... | ezyang/ghc | compiler/typecheck/TcDerivUtils.hs | bsd-3-clause | 34,510 | 0 | 17 | 10,018 | 5,100 | 2,745 | 2,355 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.Compatibility44
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Compatibility44.hs | bsd-3-clause | 62,395 | 0 | 4 | 8,126 | 8,092 | 5,402 | 2,690 | 2,685 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE NoMonoLocalBinds #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQ... | mgomezch/yesod-squealer | source/Yesod/Squealer/Handler/Version.hs | bsd-3-clause | 15,974 | 1 | 20 | 6,951 | 2,852 | 1,610 | 1,242 | -1 | -1 |
module Lists (module Lists, module List) where
import OpTypes
import List
import Products
mergeOrd :: OrdOp a -> [a] -> [a] -> [a]
merge :: Ord a => [a] -> [a] -> [a]
unionMany :: Eq a => [[a]] -> [a]
mapFst :: (a -> x) -> [(a,b)] -> [(x,b)]
mapSnds :: (b -> y) -> [(a, [b])] ->... | forste/haReFork | tools/base/lib/Lists.hs | bsd-3-clause | 1,583 | 0 | 10 | 524 | 644 | 362 | 282 | 31 | 1 |
{-# LANGUAGE MultiParamTypeClasses,FunctionalDependencies,FlexibleInstances #-}
module Data.AtomContainer
(AtomContainer(..)
,ExprOrdering(..))
where
import Data.Map as Map
-- | Represents data structures which can store atomic expressions
class Ord b => AtomContainer a b | a -> b where
atomsTr... | hguenther/gtl | lib/Data/AtomContainer.hs | bsd-3-clause | 1,920 | 0 | 13 | 509 | 459 | 252 | 207 | 33 | 2 |
module Main where
import Graphics.X11.Turtle
import System.Environment
import Control.Concurrent
import Control.Monad
import Data.Word
type Color = String
main :: IO ()
main = do
n <- fmap (read . head) getArgs
f <- openField
onkeypress f $ return . (/= 'q')
t <- newTurtle f
penup t
speed t "slowest"
threadDe... | YoshikuniJujo/xturtle_haskell | tests/fizzBuzzColorName.hs | bsd-3-clause | 1,066 | 0 | 13 | 249 | 553 | 273 | 280 | 43 | 1 |
{-# LANGUAGE CPP #-}
module Language.Java.Parser (
parser,
compilationUnit, packageDecl, importDecl, typeDecl,
classDecl, interfaceDecl,
memberDecl, fieldDecl, methodDecl, constrDecl,
interfaceMemberDecl, absMethodDecl,
formalParams, formalParam,
modifier,
varDecls, varDecl,
b... | karshan/language-java | Language/Java/Parser.hs | bsd-3-clause | 29,991 | 0 | 28 | 9,239 | 9,497 | 4,592 | 4,905 | 849 | 9 |
{-|
Module : Data.Relational.RelationalMapping
Description : Mapping to Relational types.
Copyright : (c) Alexander Vieth, 2015
Licence : BSD3
Maintainer : aovieth@gmail.com
Stability : experimental
Portability : non-portable (GHC only)
-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE OverloadedString... | avieth/RelationalMapping | Data/Relational/RelationalMapping.hs | bsd-3-clause | 5,824 | 0 | 12 | 1,173 | 1,578 | 820 | 758 | 152 | 1 |
{-# LANGUAGE
NoImplicitPrelude,
TypeFamilies,
TypeOperators,
FlexibleInstances,
StandaloneDeriving,
ScopedTypeVariables,
MultiParamTypeClasses,
GeneralizedNewtypeDeriving
#-}
{-|
Module: Alt.Arrow.Kleisli
Description: Arrow encapsulating a Haskell-style Monad
Copyri... | DrNico/alt-base | Alt/Arrow/Kleisli.hs | bsd-3-clause | 2,011 | 0 | 12 | 477 | 359 | 208 | 151 | 35 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.ST.Persistent
-- Copyright : (c) Adam C. Foltzer 2013
-- License : BSD3
--
-- Maintainer : acfoltzer@gmail.com
-- Stability : experimental
-- Portability : non-portable (requires rank-2 types... | acfoltzer/persistent-refs | src/Control/Monad/ST/Persistent.hs | bsd-3-clause | 954 | 0 | 4 | 156 | 49 | 40 | 9 | 6 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Miso.Effect.DOM
-- Copyright : (C) 2016-2018 David M. Johnson
-- License : BSD3-style (see the file LICENSE)
-- Maintainer : David M. Johnson <djohnson.m@gmail.com>
-- Stability : experimental
-- Portabilit... | dmjio/miso | src/Miso/Effect/DOM.hs | bsd-3-clause | 513 | 0 | 4 | 84 | 35 | 26 | 9 | 6 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module WebsocketServer (
ServerState,
acceptConnection,
processUpdates
) where
import Control.Concurrent (modifyMVar_, readMVar)
import Control.Concurrent.STM (atomically)
import Control.Concurrent.STM.TBQueue (readTBQueue)
import Control.Exception (SomeAsyncException, SomeExc... | channable/icepeak | server/src/WebsocketServer.hs | bsd-3-clause | 5,677 | 0 | 18 | 1,141 | 1,174 | 628 | 546 | 96 | 2 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeSy... | UCSD-PL/RefScript | src/Language/Rsc/Liquid/CGMonad.hs | bsd-3-clause | 15,034 | 0 | 17 | 3,569 | 3,560 | 1,935 | 1,625 | 223 | 2 |
module Main where
import System.FSWatch (watchMain)
main :: IO ()
main = watchMain
| kelemzol/watch | src/Main.hs | bsd-3-clause | 87 | 0 | 6 | 17 | 29 | 17 | 12 | 4 | 1 |
{-|
Module : Idris.Coverage
Description : Clause generation for coverage checking
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE PatternGuards #-}
module Idris.Coverage(genClauses, validCoverageCase, recoverableCoverage,
mkPatTm) where
import Idris.AbsSyn... | eklavya/Idris-dev | src/Idris/Coverage.hs | bsd-3-clause | 15,746 | 0 | 17 | 5,120 | 5,718 | 2,871 | 2,847 | 287 | 24 |
{- Problem 99: Largest exponential
Comparing two numbers written in index form like 2^11 and 3^7 is not difficult,
as any calculator would confirm that 2^11 = 2048 < 3^7 = 2187.
However, confirming that 632382^518061 > 519432^525806 would be much more
difficult, as both numbers contain over three million digits.
Usi... | ajsmith/project-euler-solutions | src/Problem99.hs | gpl-2.0 | 1,197 | 0 | 11 | 238 | 254 | 138 | 116 | 13 | 3 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ScopedTypeVariables #-}
module CO4.Thesis.WCB_Matrix
where
import Prelude hiding (sequence)
import qualified Satchmo.Core... | apunktbau/co4 | test/CO4/Thesis/WCB_Matrix.hs | gpl-3.0 | 2,322 | 0 | 15 | 649 | 656 | 361 | 295 | 48 | 2 |
{-# 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-route53/gen/Network/AWS/Route53/ChangeResourceRecordSets.hs | mpl-2.0 | 6,920 | 0 | 14 | 1,260 | 674 | 415 | 259 | 88 | 1 |
module FP.Test.DerivingPretty where
import FP
import FP.DerivingPretty
data AS a = FooAS Int | BarAS a
makePrettySum ''AS
data AU a = FooAU Int | BarAU a
makePrettyUnion ''AU
data BS a b = FooBS Int | BarBS a b
makePrettySum ''BS
data BU a b = FooBU Int | BarBU a b
makePrettyUnion ''BU
xas, yas :: AS String
xas =... | davdar/maam | src/FP/Test/DerivingPretty.hs | bsd-3-clause | 677 | 0 | 7 | 164 | 312 | 162 | 150 | -1 | -1 |
-- Copyright 2016 TensorFlow authors.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agree... | tensorflow/haskell | tensorflow-ops/tests/TypesTest.hs | apache-2.0 | 5,351 | 0 | 15 | 1,109 | 1,135 | 636 | 499 | 88 | 1 |
{-
%
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
TcGenDeriv: Generating derived instance declarations
This module is nominally ``subordinate'' to @TcDeriv@, which is the
``official'' interface to deriving-related things.
This is where we do all the grimy bindings... | urbanslug/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | 94,714 | 0 | 19 | 29,925 | 17,473 | 9,207 | 8,266 | 1,219 | 8 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
-- This program must be called with GHC's libdir as the single command line
-- argument.
module Main where
-- import Data.Generics
import Data.Data hiding (Fixity)
import Data.List
import System.IO
import GHC
import B... | ezyang/ghc | testsuite/tests/ghc-api/annotations/t11430.hs | bsd-3-clause | 3,858 | 1 | 20 | 1,261 | 1,155 | 625 | 530 | 85 | 6 |
{-# LANGUAGE CPP #-}
module CPP where
#define SOMETHING1
foo :: String
foo = {- " single quotes are fine in block comments
{- nested block comments are fine -}
-} "foo"
#define SOMETHING2
bar :: String
bar = "block comment in a string is not a comment {- "
#define SOMETHING3
-- " single quotes a... | sdiehl/ghc | testsuite/tests/hiefile/should_compile/CPP.hs | bsd-3-clause | 517 | 0 | 4 | 123 | 43 | 30 | 13 | 9 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module T14131 where
import Data.Kind
import Data.Proxy
data family Nat :: k -> k -> Type
newtype instance Nat :: (k -> Type) -> (k -> Type) -> Type where
Nat :: (forall xx. f xx -> ... | sdiehl/ghc | testsuite/tests/indexed-types/should_compile/T14131.hs | bsd-3-clause | 721 | 22 | 9 | 179 | 299 | 160 | 139 | 23 | 0 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Char
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : lib... | frantisekfarka/ghc-dsi | libraries/base/Data/Char.hs | bsd-3-clause | 6,605 | 0 | 10 | 2,110 | 872 | 509 | 363 | 112 | 8 |
module Test where
bar :: IO ()
bar = mdo
str <- return "bar"
putStrLn str
-- Should fail
-- bar' :: IO ()
-- bar' = mdo {str <- return "bar" ; putStrLn str}
| ezyang/ghc | testsuite/tests/parser/should_fail/T8501b.hs | bsd-3-clause | 167 | 0 | 8 | 45 | 38 | 20 | 18 | -1 | -1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
-- | Definition of /Second-Order Array Combinators/ (SOACs), which are
-- the main form of parallelism in the earl... | diku-dk/futhark | src/Futhark/IR/SOACS/SOAC.hs | isc | 32,942 | 0 | 22 | 8,323 | 8,812 | 4,480 | 4,332 | 646 | 2 |
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.CodeGen.JS.Optimizer
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
-- Stability : experimental
-- Portability :
--
-- |
-- This m... | michaelficarra/purescript | src/Language/PureScript/CodeGen/JS/Optimizer.hs | mit | 2,656 | 0 | 15 | 446 | 549 | 330 | 219 | 45 | 2 |
module P013Spec where
import qualified P013 as P
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
let input = [37107287533902102798797998220837590246510135740250::Integer,
46376937677490009712648124896970078050417018260538,
7432498619952474105947423330951305812... | yyotti/euler_haskell | test/P013Spec.hs | mit | 584 | 0 | 10 | 120 | 98 | 55 | 43 | 15 | 1 |
module Types where
type Var = Int
data Term
= Var Var
| App Term [Term]
| Lam Var Term
| niteria/deterministic-fvs | Types.hs | mit | 95 | 0 | 7 | 28 | 36 | 22 | 14 | 6 | 0 |
module Latte.Compile.MainSpec (main, spec) where
import Test.Hspec
import Latte.Compile.Main
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "Passing" $ do
it "No function" $ do
1 == 1
| mpsk2/LatteCompiler | testsuite/tests/Latte/Compile/MainSpec.hs | mit | 229 | 0 | 13 | 63 | 81 | 43 | 38 | 10 | 1 |
-- |
-- Module : Configuration.Dotenv.Types
-- Copyright : © 2015–2020 Stack Builders Inc.
-- License : MIT
--
-- Maintainer : Stack Builders <hackage@stackbuilders.com>
-- Stability : experimental
-- Portability : portable
--
-- Provides the types with extra options for loading a dotenv file.
modu... | stackbuilders/dotenv-hs | src/Configuration/Dotenv/Types.hs | mit | 985 | 0 | 9 | 216 | 114 | 78 | 36 | 14 | 1 |
module Vacivity.Proc.BSPDungeon where
import Prelude hiding (any, concat, foldl)
import Control.Applicative
import Control.Monad.Random hiding (split)
import Data.List hiding (concat, foldl, any)
import Data.Maybe
import Data.Foldable
import qualified Data.Set as Set
import qualified Antiqua.Data.Array2d as A2D
import... | olive/vacivity | src/Vacivity/Proc/BSPDungeon.hs | mit | 7,364 | 0 | 30 | 2,623 | 3,556 | 1,881 | 1,675 | -1 | -1 |
{-# LANGUAGE ConstraintKinds, DataKinds, DeriveFoldable, DeriveFunctor,
DeriveTraversable, FlexibleContexts, FlexibleInstances,
FunctionalDependencies, GADTs, KindSignatures, MultiParamTypeClasses,
PatternSynonyms, RankNTypes, ScopedTypeVariables, StandaloneDeriving,
TemplateHaskell, TupleSections, TypeFamilies, TypeOp... | nushio3/formura | attic/combinator-NT/src/Main.hs | mit | 6,362 | 0 | 15 | 1,635 | 2,667 | 1,366 | 1,301 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
import qualified Data.ByteString.Lazy as B
import Data.Serialize hiding (get, getBytes)
import Data.Serialize.Builder (toLazyByteString)
import qualified Data.Map as Map
import qualified Control.Monad.State as State
import Control.Monad
import Data.Word (W... | sjoerdvisscher/sarien-sound | ags2aiff.hs | mit | 5,149 | 0 | 22 | 1,222 | 2,077 | 1,097 | 980 | 113 | 3 |
-- Copyright (c) 2011 Alexander Poluektov (alexander.poluektov@gmail.com)
--
-- Use, modification and distribution are subject to the MIT license
-- (See accompanying file MIT-LICENSE)
module Domino.Strategy.Counting
(
counting
) where
import Data.List (minimumBy)
import Data.Ord (comparing)
import Domi... | apoluektov/domino | src/Domino/Strategy/Counting.hs | mit | 2,659 | 0 | 13 | 667 | 891 | 477 | 414 | 53 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Keter
( keter
) where
import Data.Yaml
import qualified Data.HashMap.Strict as Map
import qualified Data.Text as T
import System.Exit
import System.Process
import Control.Monad
import System.Directory
import Data.Maybe (mapMaybe)
import qualified Filesystem.Path.Curren... | wujf/yesod | yesod-bin/Keter.hs | mit | 3,064 | 0 | 19 | 997 | 919 | 465 | 454 | 76 | 13 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Definitions in this module are Copied verbatim from "System.Process".
module System.Process.Copied (
withCreateProcess_
, processFailedException
, withForkWait
, ignoreSigPipe
) where
import System.Process
import Prelude hiding (mapM)
import Sy... | sol/better-process | src/System/Process/Copied.hs | mit | 3,544 | 0 | 16 | 878 | 840 | 447 | 393 | 56 | 1 |
{-# LANGUAGE RankNTypes, FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving... | bananu7/Turnip | src/Turnip/Eval/Types.hs | mit | 2,495 | 1 | 11 | 503 | 533 | 320 | 213 | 54 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module NLP.Senna.Processor where
import Control.Applicative ((<$>), (<*>))
import NLP.Senna.Types
import NLP.Senna.Tags
import NLP.Senna.Util
-- | The 'Processor' type class provides the 'process' function ... | slyrz/hase | src/NLP/Senna/Processor.hs | mit | 2,481 | 0 | 10 | 491 | 555 | 295 | 260 | 52 | 0 |
{-|
Module : Data.Telephony.Meid
Description : Contains a data structure that represents a Mobile Equipment Identifier and
various MEID functions.
Copyright : (c) 2015 Nick Saunders
License : MIT
Maintainer : nick@saunde.rs
-}
module Data.Telephony.Meid (Meid (HexMeid, DecMeid), Da... | therealnicksaunders/meid | library/Data/Telephony/Meid.hs | mit | 1,764 | 0 | 13 | 401 | 500 | 269 | 231 | 29 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ViewPatterns #-}
module Main where
import Control.Arrow ((***))
import Data.Maybe (fromJust)
import Data.Text.Prettyprint.Doc.Render.Text (putDoc)
import System.Environment ... | egison/egison | hs-src/Tool/translator.hs | mit | 9,659 | 0 | 16 | 2,451 | 3,812 | 1,935 | 1,877 | 181 | 2 |
{-# LANGUAGE NoMonomorphismRestriction #-}
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
import Viz.Catalan
import Catalan
bigarrow = arrowAt (0 ^& 0) (2*unitX)
main =
let t1 = B (B L (B (B L L) L)) L in
let t2 = B L (B (B (B L L) L) L) in
let t3 = B L (B (B L L) (B L L)) in
let d =
... | noamz/linlam-gos | src/Viz/Test.hs | mit | 661 | 0 | 22 | 195 | 320 | 162 | 158 | 18 | 1 |
{-# language DeriveDataTypeable #-}
{-# language FlexibleInstances #-}
{-# language TupleSections #-}
module Algebraic.Set.Multi where
import Expression.Op hiding (Identifier)
import qualified Autolib.TES.Binu as B
import Autolib.ToDoc
import Autolib.Reader hiding ((<|>), many)
import qualified Data.Map.Strict as M... | marcellussiegburg/autotool | collection/src/Algebraic/Set/Multi.hs | gpl-2.0 | 2,893 | 0 | 15 | 849 | 1,098 | 584 | 514 | 72 | 1 |
--07-07 compute all mnemonics for a phone number
import qualified Data.HashMap.Strict as H
keypad :: H.HashMap Char String
keypad = H.fromList [('2',"abc"),('3',"def"),('4',"ghi"),('5',"jkl"),('6',"mno"),('7',"pqrs"),('8',"tuv"),('9',"wxyz")]
encode :: String -> [String]
encode [] = [[]]
encode (x:xs) = do
rest <- ... | cem3394/EPI-Haskell | 07-07_computeMnemonics.hs | gpl-3.0 | 437 | 0 | 9 | 74 | 212 | 120 | 92 | 12 | 1 |
module Lamdu.GUI.Expr.RecordEdit
( make, makeEmpty
) where
import qualified Control.Lens as Lens
import qualified Data.Char as Char
import qualified Data.Text as Text
import qualified GUI.Momentu as M
import qualified GUI.Momentu.Element as Element
import GUI.Momentu.EventMap (EventMap)
import qualif... | lamdu/lamdu | src/Lamdu/GUI/Expr/RecordEdit.hs | gpl-3.0 | 10,806 | 0 | 25 | 2,890 | 3,079 | 1,629 | 1,450 | -1 | -1 |
{-# LANGUAGE GADTs #-}
-- | This module houses the persitence backend for node operations. It
-- supports appending events and caching reports.
module MuPromote.Common.Persist
(
EventStore,
Report,
appendEvent,
dirBackedEventStore,
memoryBackedEventStore,
evalReport,
lookupEvent,
regis... | plcplc/muPromote-code | base/src/MuPromote/Common/Persist.hs | gpl-3.0 | 6,373 | 0 | 19 | 1,293 | 1,575 | 836 | 739 | -1 | -1 |
-- |
-- Module : Ligature.JSON
-- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of the MPL can be found in the LICENSE file or
-- you can obtai... | brendanhay/ligature | src/Ligature/JSON.hs | mpl-2.0 | 2,148 | 0 | 12 | 508 | 623 | 338 | 285 | -1 | -1 |
module Opal.Distance.Stations (
Station(..),
stations
) where
data Station
= Artarmon
| Ashfield
| Asquith
| Auburn
| Beecroft
| Berowra
| Blacktown
| BondiJunction
| Burwood
| Cabramatta
| Camellia
| CanleyVale
| Carlingford
| Casula
| Central
| ... | mzhou/opaldist | src/Opal/Distance/Stations.hs | agpl-3.0 | 2,220 | 0 | 6 | 763 | 434 | 285 | 149 | 127 | 1 |
module Main where
import Network
import qualified Data.ByteString.Char8 as S
import Data.Serialize -- Cereal
import System.IO
import System.Environment
import Control.Monad
import Control.Applicative
import Control.Exception
import Data.Word
-- Protocol description from the server's Main.hs:
-- client a connects
-- c... | damncabbage/PrisonersDilemmaGameClient | Main.hs | apache-2.0 | 2,694 | 0 | 12 | 720 | 691 | 356 | 335 | 68 | 4 |
-- Copyright 2017 gRPC authors.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to i... | grpc/grpc-haskell | src/Network/Grpc/CompletionQueue.hs | apache-2.0 | 3,920 | 0 | 26 | 904 | 987 | 495 | 492 | 73 | 5 |
module Anagram.A279916 (a279916, a279916_list) where
import Data.Maybe (fromMaybe)
import Data.List (find)
import Helpers.AnagramHelper (possibleAnagramBases, nIsBaseBAnagramOf2n)
import Anagram.A279688 (a279688)
a279916 :: Int -> Integer
a279916 n = fromMaybe 0 $ find (nIsBaseBAnagramOf2n a_n) bases where
bases = ... | peterokagey/haskellOEIS | src/Anagram/A279916.hs | apache-2.0 | 423 | 0 | 8 | 57 | 131 | 73 | 58 | 11 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Application.HXournal.ProgType
-- Copyright : (c) 2011, 2012 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <ianwookim@gmail.com>
-- Stability : experimental
--... | wavewave/hxournal | lib/Application/HXournal/ProgType.hs | bsd-2-clause | 708 | 0 | 10 | 165 | 107 | 66 | 41 | 10 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Hakyll.CMS.Types
( PostSummary(..)
, Post(..)
, NewPost(..)
, Title
, Author
, Tag
, getSummary
, Id
)
where
import Contr... | Haskell-Praxis/hakyll-cms | api/src/Hakyll/CMS/Types.hs | bsd-2-clause | 1,932 | 0 | 12 | 672 | 476 | 282 | 194 | 64 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
-- | Extra functions for working with times. Unlike the other modules in this package, there is no
-- corresponding @System.Time@ module. This module enhances the functionality
-- from "Data.Time.Clock", but in quite different ways.
--
-- Throughout, time is measured in 'Secon... | ndmitchell/extra | src/System/Time/Extra.hs | bsd-3-clause | 3,852 | 0 | 16 | 977 | 740 | 394 | 346 | 62 | 3 |
module Hatlab.Derivatives where
import Hatlab.Expression
derivative :: Expression -> Expression
derivative (V d) = 0
derivative X = 1
derivative (Add a b) = simplify $ (derivative a) + (derivative b)
derivative (Sub a b) = simplify $ (derivative a) - (derivative b)
derivative (Negate a)= simplify $ negate... | DSLsofMath/Hatlab | src/Hatlab/Derivatives.hs | bsd-3-clause | 1,543 | 0 | 12 | 313 | 909 | 463 | 446 | 26 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.OVR
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
-- A convenience module, combi... | haskell-opengl/OpenGLRaw | src/Graphics/GL/OVR.hs | bsd-3-clause | 555 | 0 | 5 | 80 | 37 | 30 | 7 | 3 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecursiveDo #-}
-- | Parsing logic for the Morte language
module Nordom.Parser (
-- * Parser
exprFromText,
-- * Errors
ParseError(..),
ParseMessage(..)
) where
impo... | Gabriel439/Haskell-Nordom-Library | src/Nordom/Parser.hs | bsd-3-clause | 9,470 | 0 | 107 | 3,132 | 2,970 | 1,473 | 1,497 | 207 | 4 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
module BuildTyCl (
buildDataCon,
buildPatSyn,
TcMethInfo, buildClass,
distinctAbstractTyConRhs, totallyAbstractTyConRhs,
mkNewTyConRhs, mkDataTyConRhs,
... | gridaphobe/ghc | compiler/iface/BuildTyCl.hs | bsd-3-clause | 16,165 | 0 | 19 | 5,759 | 2,628 | 1,429 | 1,199 | 223 | 4 |
-----------------------------------------------------------------------------
-- |
-- Module : Language.C.Analysis.TravMonad
-- Copyright : (c) 2008 Benedikt Huber
-- License : BSD-style
-- Maintainer : benedikt.huber@gmail.com
-- Stability : alpha
-- Portability : ghc
--
-- Monad for Traversals of ... | micknelso/language-c | src/Language/CFamily/C/TravMonad.hs | bsd-3-clause | 19,676 | 0 | 16 | 4,659 | 5,336 | 2,768 | 2,568 | -1 | -1 |
module ArtGallery (
) where
| adarqui/ArtGallery | Haskell/src/ArtGallery.hs | bsd-3-clause | 28 | 0 | 3 | 5 | 7 | 5 | 2 | 1 | 0 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module TestUnits (tests) where
import Control.Applicative (liftA)
import Data.Vector.Unboxed as V
import Data.Vector.Storable as S
import Prelude as P
import Test.Framework
... | meteogrid/sigym-core | tests/TestUnits.hs | bsd-3-clause | 1,127 | 0 | 11 | 193 | 309 | 171 | 138 | 32 | 1 |
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators, BangPatterns #-}
module Blaze.Show (
BlazeShow(..),
showBS,
showLBS,
) where
import Blaze.ByteString.Builder
import Bl... | tanakh/blaze-show | Blaze/Show.hs | bsd-3-clause | 4,004 | 0 | 16 | 1,004 | 1,415 | 742 | 673 | 101 | 1 |
module Zero.Account.Verification.Model
(
insertVerificationCode
, enableRecoveryMethod
) where
import qualified Data.Vector as V
import Zero.Persistence
import Zero.Crypto (generateUUID)
import Zero.Account.Verification.Internal (VerificationCode)
import Zero.Account.... | et4te/zero | server/src/Zero/Account/Verification/Model.hs | bsd-3-clause | 1,648 | 0 | 16 | 366 | 359 | 179 | 180 | 37 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Annah.Core (Data(..), Expr(..), Type(..))
import Control.Applicative ((<|>))
import Control.Exception (Exception, throwIO)
import Control.Monad (forM_)
import Data.Monoid ((<>),mempty)
import Data.Text.Lazy (fromStrict)
import Filesystem.Path (FilePath, (</>... | Gabriel439/Haskell-Annah-Library | exec/Main.hs | bsd-3-clause | 6,572 | 0 | 31 | 2,556 | 1,477 | 738 | 739 | 112 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Block.Parse
( Block (Block)
, parseBlocks
) where
import Data.Attoparsec.ByteString (takeTill, skipWhile)
import Data.Attoparsec.ByteString.Char8
hiding (takeTill, skipWhile, parse, eitherResult)
import Data.Attoparsec.ByteString.Lazy (parse, eitherResult)
import qua... | hectorhon/autotrace2 | src/Block/Parse.hs | bsd-3-clause | 1,392 | 0 | 15 | 294 | 435 | 233 | 202 | 36 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
-- |Permanently re... | tittoassini/top | src/Network/Top/Repo.hs | bsd-3-clause | 4,850 | 0 | 20 | 1,300 | 1,329 | 677 | 652 | 86 | 5 |
-- |
-- Module: Main
-- Copyright: (c) 2013 Ertugrul Soeylemez
-- License: BSD3
-- Maintainer: Ertugrul Soeylemez <es@ertes.de>
--
-- Benchmark for the pipes-bytestring package.
module Main where
import Criterion.Main
main :: IO ()
main = defaultMain []
| ertes/pipes-bytestring | test/Bench.hs | bsd-3-clause | 266 | 0 | 6 | 51 | 36 | 23 | 13 | 4 | 1 |
module FruitShopKata.Day7 (process) where
type Bill = (Money, [Product])
type Product = String
type Money = Int
process :: [Product] -> [Money]
process = map fst . tail . scanl addProduct (0, [])
where
addProduct :: Bill -> Product -> Bill
addProduct (... | Alex-Diez/haskell-tdd-kata | old-katas/src/FruitShopKata/Day7.hs | bsd-3-clause | 1,196 | 0 | 19 | 528 | 363 | 200 | 163 | 21 | 3 |
{-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
import Hcalc
default (Cell')
t1 :: Sheet
t1 = Sheet
[ hcol ":: What?"
[ "ab-lippu"
, "Wombats kalja"
, "Sushi"
, "8mm tequila"
, "Yesterday"
, "Taxi"
, "... | SimSaladin/hcalc | examples/verirahat.hs | bsd-3-clause | 1,561 | 0 | 15 | 630 | 540 | 277 | 263 | 47 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
module Control.Eff.Writer where
import Control.Eff
import Data.Monoid
data Writer w x where
Tell :: w -> Writer w ()
tell :: (Writer w :< effs) => w -> Eff effs ()
tell w = et... | mitchellwrosen/effects-a-la-carte | src/Control/Eff/Writer.hs | bsd-3-clause | 764 | 0 | 12 | 199 | 350 | 184 | 166 | 26 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.