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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Listy where
import Data.Monoid
newtype Listy a =
Listy [a]
deriving (Eq, Show)
instance Monoid (Listy a) where
mempty = Listy []
mappend (Listy l) (Listy l') = Listy $ mappend l l'
| aniketd/learn.haskell | haskellbook/orphan-instance/Listy.hs | unlicense | 199 | 0 | 8 | 45 | 87 | 47 | 40 | 8 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Tutorial example based on
-- http://haskell-distributed-next.github.io/tutorials/ch-tutorial1.html
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
import Control.Distributed.Process
import Control.Distributed.Process... | alanz/cloud-haskell-play | src/simplesupervisor.hs | unlicense | 5,088 | 0 | 20 | 962 | 1,104 | 599 | 505 | 117 | 2 |
-- |Distributed Dot Product - Erlang Style
--
-- Backend implementation for DNA project.
-- Author: Braam Research, LLC
-- Copyright (C) 2014 Cambridge University
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGU... | SKA-ScienceDataProcessor/RC | MS1/ddp-erlang-style/ddp-erlang-style.hs | apache-2.0 | 9,553 | 0 | 22 | 2,488 | 2,174 | 1,106 | 1,068 | 151 | 4 |
{-# LANGUAGE TupleSections, ParallelListComp, NoMonomorphismRestriction, RecursiveDo, ViewPatterns #-}
module Compile(compile) where
import Compile.Monad
import Context
import Control.Monad.Writer
import Data.Either
import Data.Function
import Data.Maybe
import ID
import My.Control.Monad
import My.Control.Monad.State
... | lih/Alpha | src/Compile.hs | bsd-2-clause | 6,515 | 1 | 17 | 1,528 | 3,033 | 1,493 | 1,540 | 158 | 4 |
module Control.Monad.IO.MonadIOException where
import Control.Monad.IO.Unwrappable
import Control.Monad.IO.Class
import Control.Exception
-- | Guarantees that an IO operation will be performed before an after executing
-- | a MonadIOUnwrappable monad. The operation will be performed even if the
-- | MonadIO contains ... | A1kmm/monadio-unwrappable | Control/Monad/IO/MonadIOException.hs | bsd-2-clause | 857 | 0 | 14 | 250 | 147 | 79 | 68 | 12 | 1 |
{-# LANGUAGE CPP, ForeignFunctionInterface, OverloadedStrings #-}
-- A simple tool that creates a number of "dead" connections to a
-- server. A dead connection is a connection that doesn't transmit
-- any data but stays connected. This tool is useful to simulate a
-- number of slow/idle connections to a server.
im... | tibbe/event | benchmarks/DeadConn.hs | bsd-2-clause | 4,332 | 0 | 28 | 1,384 | 1,167 | 632 | 535 | 93 | 2 |
{-# OPTIONS_GHC -Wall #-}
module HW04.HW04 where
-- Exercise 1 -----------------------------------------
fun1' :: [Integer] -> Integer
fun1' = product . map (subtract 2) . filter even
fun2' :: Integer -> Integer
fun2' = sum . filter even . takeWhile (> 1) . iterate collatz
where
collatz n
| even n ... | kemskems/cis194-spring13 | src/HW04/HW04.hs | bsd-3-clause | 1,846 | 0 | 13 | 541 | 737 | 388 | 349 | 41 | 2 |
{-# LANGUAGE PatternGuards #-}
module Idris.Delaborate (bugaddr, delab, delab', delabMV, delabTy, delabTy', pprintErr) where
-- Convert core TT back into high level syntax, primarily for display
-- purposes.
import Util.Pretty
import Idris.AbsSyntax
import Idris.Core.TT
import Idris.Core.Evaluate
import Idris.ErrRev... | DanielWaterworth/Idris-dev | src/Idris/Delaborate.hs | bsd-3-clause | 12,960 | 0 | 18 | 3,948 | 5,541 | 2,750 | 2,791 | 246 | 33 |
-----------------------------------------------------------------------------
-- |
-- Module : TestSuite.Basics.Quantifiers
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Various combinations of quantifiers
------------------------... | josefs/sbv | SBVTestSuite/TestSuite/Basics/Quantifiers.hs | bsd-3-clause | 2,396 | 0 | 14 | 865 | 761 | 419 | 342 | 23 | 1 |
{-
The C algorithm does not appear to give notable performance
improvements, at least when building tries based on /usr/dict on
little-endian 32-bit machines. The implementation also appears
somewhat buggy (cf test/TrieFile.hs) and using the FFI complicates
distribution.
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
... | tkonolige/dbignore | bytestring-trie/src/Data/Trie/ByteStringInternal.hs | bsd-3-clause | 4,255 | 0 | 18 | 1,013 | 711 | 397 | 314 | 52 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module Stack.BuildPlanSpec where
import Stack.BuildPlan
import Control.Monad.Logger
import Control.Exception hiding (try)
import Control.Monad.Catch (try)
import Data.Monoid
import qua... | hesselink/stack | src/test/Stack/BuildPlanSpec.hs | bsd-3-clause | 5,018 | 0 | 25 | 1,670 | 1,130 | 577 | 553 | 104 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Text
-- Copyright : Duncan Coutts 2007
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This defines a 'Text' class which is a bit like the 'Read' and 'Show'
-- classes. The ... | dcreager/cabal | Distribution/Text.hs | bsd-3-clause | 2,290 | 0 | 17 | 596 | 565 | 302 | 263 | 41 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TupleSections #-}
{-# OPTIONS -Wall ... | JohnLato/iterx | src/IterX/IterX.hs | bsd-3-clause | 7,630 | 0 | 14 | 2,340 | 2,869 | 1,471 | 1,398 | 188 | 6 |
{-# LANGUAGE OverloadedStrings #-}
module Lib
(Token,Corpus,
Unigrams, Digrams, Trigrams,
unigrams, digrams, trigrams, clean,
fromUnigrams, fromDigrams, fromTrigrams
) where
import Control.Monad.Random
import Data.Char (isSpace)
import Data.List (foldl', zipWith4)
import qualified Data.Map.Strict as M
imp... | pzel/slowotok | src/Lib.hs | bsd-3-clause | 2,764 | 0 | 14 | 615 | 1,433 | 789 | 644 | 60 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Blaze.ByteString.Builder
import qualified Data.ByteString.Lazy.Char8 as BSL8
import Data.Map
import Data.Maybe
import Data.OpenSRS.ToXML
import Data.OpenSRS.Types
import Data.Text hiding (unlines)
import Data.Time
import Test.Hspec
import Text.HTML.TagSoup
i... | anchor/haskell-opensrs | tests/XmlTests.hs | bsd-3-clause | 5,323 | 0 | 19 | 2,230 | 1,011 | 539 | 472 | 120 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.HGL.Internals.Utilities
-- Copyright : (c) Alastair Reid, 1999-2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : internal
--... | FranklinChen/hugs98-plus-Sep2006 | packages/HGL/Graphics/HGL/Internals/Utilities.hs | bsd-3-clause | 1,370 | 8 | 10 | 242 | 362 | 194 | 168 | 22 | 1 |
module Code29_Plan1 where
import Code28
jcode :: Int -> [Int]
jcode n = code (0,n)
bumpBy :: Int -> [Int] -> [Int]
bumpBy _ [] = []
bumpBy k [a] = [a+k]
bumpBy k (a:b:as) = (a+k) : b : bumpBy k as
bumpDn :: (Int, Int) -> [Int]
bumpDn (k,n) = bumpBy k [n-1,n-2 .. 1]... | sampou-org/pfad | Code/Code29_Plan1.hs | bsd-3-clause | 477 | 0 | 8 | 172 | 280 | 156 | 124 | 14 | 2 |
module Tagger.IncompletionFinder where
-- from base
import Data.Maybe (isNothing)
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mapM, liftM2)
-- from filepath
import System.FilePath ((</>))
-- from taglib
import qual... | rethab/tagger | src/Tagger/IncompletionFinder.hs | bsd-3-clause | 3,001 | 0 | 13 | 987 | 854 | 449 | 405 | 51 | 2 |
module Main
where
import Control.Monad (liftM, when)
import Data.List (isPrefixOf)
import Data.Maybe (fromMaybe)
import Data.Version (showVersion)
import System.Environment (getArgs)
import System.Exit (ExitCode (..), exitFailure, exitSuccess, exitWith)
import System.IO (hPutStrLn, stderr, hSetBuffering, Buffer... | 23Skidoo/ghc-parmake | GhcParmake.hs | bsd-3-clause | 10,683 | 0 | 17 | 3,250 | 2,656 | 1,437 | 1,219 | 175 | 19 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveDataTypeable #-}
module GEC.KeyExchange.Pure
(
-- * Types
StsCtx, GecKeError(..), GenError, StsResult, mkCtx
-- * Aliases
, Message1, Message2, Message3, KeyMaterial
-- * Message construction
, initiate
, respond
, responseAck
... | GaloisInc/gec | src/GEC/KeyExchange/Pure.hs | bsd-3-clause | 7,774 | 0 | 13 | 2,218 | 1,829 | 1,002 | 827 | 136 | 3 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Database where
import Database.Persist.TH
share [mkP... | Frefreak/Gideon | src/Database.hs | bsd-3-clause | 606 | 0 | 7 | 178 | 46 | 29 | 17 | 9 | 0 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoReb... | facebookincubator/duckling | Duckling/CreditCardNumber/Types.hs | bsd-3-clause | 1,527 | 0 | 9 | 274 | 328 | 190 | 138 | 41 | 0 |
{-# BangPatterns #-}
module Clique where
import Graph (Graph, Vertex, isAdjacentG)
-- A Clique is a list of vertices and a (cached) size
type Clique = ([Vertex], Int)
emptyClique :: Clique
emptyClique = ([],0)
-- verification (of clique property, not of maximality)
-- True iff the given list of vertices ... | BlairArchibald/bones | apps/maxclique/src/Clique.hs | bsd-3-clause | 466 | 0 | 8 | 96 | 118 | 69 | 49 | 8 | 1 |
{-# LANGUAGE LambdaCase, ScopedTypeVariables #-}
-- | A description of the platform we're compiling for.
--
module GHC.Platform (
PlatformMini(..),
PlatformWordSize(..),
Platform(..), platformArch, platformOS,
Arch(..),
OS(..),
ArmISA(..),
ArmISAExt(..),
... | sdiehl/ghc | libraries/ghc-boot/GHC/Platform.hs | bsd-3-clause | 8,870 | 0 | 14 | 2,340 | 1,448 | 843 | 605 | 214 | 17 |
module Handler.Posts where
import Import
import Handler.Common
getPostsR :: Handler Html
getPostsR = do
blogPosts <- runDB $ selectList [] [Desc BlogPostId]
defaultLayout $ do
$(widgetFile "posts/index")
| roggenkamps/steveroggenkamp.com | Handler/Posts.hs | bsd-3-clause | 222 | 0 | 12 | 45 | 68 | 34 | 34 | -1 | -1 |
{-# LANGUAGE RebindableSyntax,
PostfixOperators,
ScopedTypeVariables,
DeriveGeneric,
GeneralizedNewtypeDeriving,
TypeFamilies,
TypeOperators,
ConstraintKinds,
DefaultSignatures,
MultiParamTypeClasses,
FlexibleContexts,
FlexibleInstances,
UndecidableInstances
#-}
-- TODO... | michalkonecny/aern2 | aern2-fun-univariate/src/AERN2/AnalyticMV/Type.hs | bsd-3-clause | 11,182 | 0 | 19 | 3,299 | 4,099 | 2,162 | 1,937 | 303 | 3 |
module Frenetic.NetCore.Reduce
( reduce
, isEmptyPredicate
, dnf
, flattenDNF
, flattenConj
, isEmptyConj
) where
import Frenetic.Common
import Data.List (nub, partition)
import Data.Maybe
import qualified Data.Set as Set
import qualified Data.Map as M
import qualified Frenetic.CoFiniteSet as CFS
import ... | frenetic-lang/netcore-1.0 | src/Frenetic/NetCore/Reduce.hs | bsd-3-clause | 6,396 | 0 | 20 | 1,315 | 2,767 | 1,406 | 1,361 | 160 | 18 |
module Card (
Card(..)
, createCard
, getPicture
, startFlipAnimation
, updateFlipAnimation
, stopFlipAnimation
) where
import LivePicture
import Graphics.Gloss
-- | Data which represents one Card that is clickable and can be rendered on the screen.
data Card = Card
{ front :: LivePic... | stefanjanjic90/DroidThatYouAreLookingFor | Card.hs | bsd-3-clause | 6,098 | 0 | 12 | 2,691 | 905 | 490 | 415 | 59 | 4 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
module Database.Relational.Schema.SQLite3Syscat.IndexList where
import Data.Int (Int64)
import Database.Record.TH (derivingShow)
import Database.Relational.Query.TH (defineTableTypesAndRecordDefault)
$(defineTableTypesAndRecordDefault
"pragma" "in... | yuga/haskell-relational-record-driver-sqlite3 | src/Database/Relational/Schema/SQLite3Syscat/IndexList.hs | bsd-3-clause | 709 | 0 | 9 | 197 | 108 | 75 | 33 | 13 | 0 |
{-# LANGUAGE TypeApplications #-}
module Test.Pos.Chain.Update.CborSpec
( spec
) where
import Universum
import Test.Hspec (Spec, describe)
import Pos.Chain.Update (ApplicationName (..), BlockVersion (..),
BlockVersionData (..), SoftforkRule (..),
... | input-output-hk/pos-haskell-prototype | chain/test/Test/Pos/Chain/Update/CborSpec.hs | mit | 676 | 0 | 9 | 187 | 154 | 91 | 63 | 17 | 1 |
{-# LANGUAGE OverloadedStrings, CPP #-}
module Bead.View.Content.Home.Data where
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Time
import Bead.View.Content hiding (userState)
import Bead.View.Content.SubmissionTable
type ActiveAssignment = (AssignmentKey,... | pgj/bead | src/Bead/View/Content/Home/Data.hs | bsd-3-clause | 1,819 | 0 | 9 | 304 | 307 | 191 | 116 | 30 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleContexts #-}
module Graphics.GL.Pal.Shape where
import Graphics.GL
import Control.Monad.Reader
import Graphics.GL.Pal.Types
import Graphics.GL.Pal.InferUniforms
import Graphics.GL.Pal.WithActions
import Graphics.GL.Pal.AssignAttribute
import Graphics.GL.Pal.Array... | lukexi/gl-pal | src/Graphics/GL/Pal/Shape.hs | bsd-3-clause | 2,297 | 0 | 11 | 403 | 615 | 306 | 309 | 45 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
------------------... | spacekitteh/compdata | src/Data/Comp/Multi/Generic.hs | bsd-3-clause | 3,518 | 0 | 15 | 897 | 1,084 | 574 | 510 | 50 | 2 |
{-# LANGUAGE OverloadedStrings, DoAndIfThenElse #-}
-- | Description : Low-level ZeroMQ communication wrapper.
--
-- The "ZeroMQ" module abstracts away the low-level 0MQ based interface with IPython, replacing it
-- instead with a Haskell Channel based interface. The `serveProfile` function takes a IPython
-- profile ... | artuuge/IHaskell | ipython-kernel/src/IHaskell/IPython/ZeroMQ.hs | mit | 14,212 | 0 | 31 | 3,316 | 2,477 | 1,249 | 1,228 | 221 | 2 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[TcBinds]{TcBinds}
-}
{-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables #-}
module TcBinds ( tcLocalBinds, tcTopBinds, tcRecSelBinds,
tcHsBootSigs, tcPolyCheck,
PragFun, tcSpecPra... | forked-upstream-packages-for-ghcjs/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | 69,666 | 1 | 21 | 20,531 | 12,657 | 6,612 | 6,045 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable,
DeriveTraversable #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstan... | DavidAlphaFox/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | 70,445 | 0 | 16 | 21,104 | 12,186 | 6,626 | 5,560 | 875 | 6 |
{-# LANGUAGE RecordWildCards, ScopedTypeVariables #-}
module Graphics.UI.Threepenny.Widgets (
-- * Synopsis
-- | Widgets are reusable building blocks for a graphical user interface.
-- This module collects useful widgets that are designed to work
-- with functional reactive programming (FRP).
--
... | duplode/threepenny-gui | src/Graphics/UI/Threepenny/Widgets.hs | bsd-3-clause | 3,958 | 0 | 17 | 916 | 829 | 445 | 384 | 60 | 2 |
module AddOneParameter.A2 where
import AddOneParameter.C2
import AddOneParameter.D2
sumSq xs = sum (map (sq sq_f) xs) + sumSquares xs + sumSquares1 xs
sq_f_2 = 2
main = sumSq [1..4]
| RefactoringTools/HaRe | test/testdata/AddOneParameter/A2.expected.hs | bsd-3-clause | 189 | 0 | 11 | 35 | 73 | 38 | 35 | 6 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
-- | This module builds Docker (OpenContainer) images.
... | robstewart57/stack | src/Stack/Image.hs | bsd-3-clause | 8,388 | 0 | 26 | 2,695 | 1,525 | 783 | 742 | 171 | 2 |
-- !!! ds014 -- character and string literals
-- !!! really should add ALL weird forms...
module ShouldCompile where
a = 'a'
b = "b"
c = a:b
d = b ++ b
b1 = "" -- examples from the Haskell report
b2 = "\&" -- the same thing
b3 = "\SO\&H" ++ "\137\&9"
a000 = '\NUL'
a001 = '\SOH'
a002 = '\STX'
a003 = ... | ezyang/ghc | testsuite/tests/deSugar/should_compile/ds014.hs | bsd-3-clause | 1,284 | 0 | 5 | 344 | 275 | 166 | 109 | 52 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module JsonUtils where
import qualified Data.Text as T
import qualified Data.HashMap.Strict as HM
import Data.Aeson
import Data.List (foldl')
mapObject :: (Object -> Object) -> Value -> Value
mapObject f (Object m) = Object (f m)
mapObject _ v = error $ "Not an object " ++ show v
... | nomeata/gipeda | src/JsonUtils.hs | mit | 823 | 0 | 8 | 170 | 340 | 178 | 162 | 20 | 1 |
{-
Pentagon numbers
Problem 44
Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten pentagonal numbers are:
1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ...
It can be seen that P4 + P7 = 22 + 70 = 92 = P8. However, their difference, 70 − 22 = 48, is not pentagonal.
Find the pair of pentagonal numb... | bertdouglas/euler-haskell | 001-050/44a.hs | mit | 1,388 | 0 | 13 | 312 | 395 | 213 | 182 | 23 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Day9 (day9, day9', run, Expr(..), parseInput) where
import Data.Function (fix)
import Text.Parsec ((<|>) , Parsec , ParseError)
import qualified Text.Parsec as P
data Expr =
CompressExpr
Int -- Characters to repeat
Int -- Number of times to repeat
... | brianshourd/adventOfCode2016 | src/Day9.hs | mit | 2,605 | 0 | 13 | 529 | 940 | 491 | 449 | 55 | 2 |
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE RankNTypes #-}
module Graphics.Oedel.Widget where
import Data.Monoid
import Graphics.Oedel.Style
import Control.Reactive
import Control.Applicative
-- | Identifies an input of type @b@ within an environment of type @a@.
ne... | dzamkov/Oedel | src/Graphics/Oedel/Widget.hs | mit | 4,489 | 0 | 14 | 1,131 | 1,061 | 568 | 493 | -1 | -1 |
{-|
Module : Prelude.Betahaxx.Abbr
Unicode synonyms for @Data.Foldable.elem@ and @Data.Foldable.notElem@ that have
RULES specializing to @Data.Set.member@ and @Data.Set.notMember@ (which is
mainly what I want to use this for.) However, with current GHC, we always have
to require Ord for this to work. Ord isn't us... | betaveros/betahaxx | Data/Foldable/Unicode/Betahaxx.hs | mit | 1,105 | 0 | 8 | 201 | 262 | 162 | 100 | 21 | 1 |
import ParserTests
import Test.Tasty (defaultMain, testGroup)
import Test.Tasty.HUnit (assertEqual, testCase)
main :: IO ()
main = defaultMain $ testGroup "All unit tests" [ParserTests.run]
| andybalaam/pepper | old/pepper2/tests/Tests.hs | mit | 191 | 0 | 8 | 24 | 60 | 34 | 26 | 5 | 1 |
module Main where
import Monad
import System.Environment
import Text.ParserCombinators.Parsec hiding (spaces)
main :: IO ()
main = do args <- getArgs
putStrLn (readExpr (args !! 0))
symbol :: Parser Char
symbol = oneOf "!$%&|*+-/:<=>?@^_~#"
readExpr input = case parse parseExpr "lisp" input of
Left err... | tismith/tlisp | write-yourself-a-scheme/listings/listing3.4.hs | mit | 1,813 | 0 | 11 | 617 | 554 | 269 | 285 | 56 | 3 |
{-|
Module : Control.Flower.Applicative.Lazy
Description : Combinators for directional lazy applicative functors
-}
module Control.Flower.Applicative.Lazy (
ap,
lift2, lift3,
(<*), (*>),
(<$*), (*$>),
(<$**), (**$>)
) where
import Prelude hiding ((<*), (*>))
import Control.Applicative hiding ((<*), (*>... | expede/flower | src/Control/Flower/Applicative/Lazy.hs | mit | 2,264 | 0 | 11 | 544 | 647 | 355 | 292 | 32 | 1 |
{-|
Module : PostgREST.Middleware
Description : Sets CORS policy. Also the PostgreSQL GUCs, role, search_path and pre-request function.
-}
{-# LANGUAGE RecordWildCards #-}
module PostgREST.Middleware
( runPgLocals
, pgrstFormat
, pgrstMiddleware
, defaultCorsPolicy
, corsPolicy
, optionalRollback
) w... | steve-chavez/postgrest | src/PostgREST/Middleware.hs | mit | 8,519 | 0 | 25 | 1,925 | 2,027 | 1,098 | 929 | 150 | 4 |
module Main where
import Antiqua.Loading.TMXLoader
import qualified Antiqua.Data.NonEmpty as NE
import Antiqua.Geometry.Line
main :: IO ()
main = do
let ne = NE.NonEmpty 1 [2, 3, 4, 5, 6]
print ne
(print . NE.reverse) (ne)
loadTmx "holophote.tmx"
return ()
| olive/antiqua-prime | src/Main.hs | mit | 279 | 0 | 11 | 61 | 109 | 59 | 50 | 11 | 1 |
mySort :: Ord a => [a] -> [a]
mySort (a:as) = let smallerOrEqual = [s | s <- as, s <= a]
bigger = [s | s <- as, s >= a]
in mySort smallerOrEqual ++ [a] ++ mySort bigger
mySort [] = []
mySortComp :: Ord a => (a -> a -> Ordering) -> [a] -> [a]
mySortComp p (a:as) = let smallerOrEqual... | diminishedprime/.org | reading-list/seven_languages_in_seven_weeks/haskell/day_2.hs | mit | 919 | 0 | 13 | 536 | 310 | 158 | 152 | 16 | 5 |
module Game.Keyboard (
Keyboard,
initKeyboard,
handleKeyEvent,
isKeyDown
) where
import Data.Set (Set)
import qualified Data.Set as Set
import Graphics.UI.GLUT (Key(..), KeyState(..))
newtype Keyboard = Keyboard (Set Key) deriving (Show)
initKeyboard :: Keyboard
initKeyboard = Keyboard Set.empty
handleKey... | sgrif/haskell-game | Game/Keyboard.hs | mit | 809 | 0 | 7 | 138 | 277 | 151 | 126 | 22 | 1 |
module Job.Dispatch
( dispatchJob
) where
import Import
import Job.Activation
import Job.StepAchieved
import Job.Tracking
import Job.Welcome
-- | Dispatch jobs to their repsective handlers.
dispatchJob :: Entity Job -> HandlerT App IO ()
dispatchJob (Entity jobId job) = do
master <- getYesod
-- Update the jo... | Tehnix/campaigns | Job/Dispatch.hs | mit | 860 | 0 | 12 | 167 | 212 | 104 | 108 | 18 | 4 |
-- School of Haskell "Basics of Haskell" Chapter 3
-- https://www.schoolofhaskell.com/school/starting-with-haskell/basics-of-haskell/3-pure-functions-laziness-io
-- Exercise 3
-- Rewrite the previous exercise to take the input string from the user.
putQStrLn' :: String -> IO ()
putQStrLn' str = do
putStr "\""
... | chsm/code | hs/soh/basics/03-03.hs | mit | 468 | 0 | 9 | 89 | 92 | 42 | 50 | 11 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module MMM.HsMMM where
import MMM.Core.FuncComb((^^^), dirac, grd)
import MMM.OOP.Language.Syntax as OOP
import MMM.Util.Pretty
import qualified Data.Map as M
import Control.Monad.State
-------------... | VictorCMiraldo/mmm | MMM/HsMMM.hs | mit | 7,630 | 0 | 18 | 2,100 | 2,986 | 1,492 | 1,494 | 194 | 2 |
type Birds = Int
type Pole = (Birds, Birds)
--landLeft :: Birds -> Pole -> Pole
--landLeft n (left, right) = (left + n, right)
--
--landRight :: Birds -> Pole -> Pole
--landRight n (left, right) = (left, right + n)
landLeft :: Birds -> Pole -> Maybe Pole
landLeft n (left,right)
| abs ((left + n) - right) < 4 = Ju... | CreaturePhil/cis194 | walktheline.hs | mit | 756 | 2 | 13 | 214 | 263 | 137 | 126 | 18 | 1 |
import Crypto.Enigma
main :: IO ()
main = do
msg <- getLine
putStrLn $ enigma conf state msg
where
(conf, state) = intToSettingDefault 0
| kc1212/enigma-hs | bin/Main.hs | mit | 160 | 0 | 8 | 47 | 59 | 29 | 30 | 6 | 1 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : $Header$
Description : Comorphism from OWL 2 to CASL_Dl
Copyright : (c) Francisc-Nicolae Bungiu, Felix Gabriel Mance
License : GPLv2 or higher, see LICENSE.txt
Maintainer : f.bungiu@jacobs-university.de
Stabi... | spechub/Hets | OWL2/OWL22CASL.hs | gpl-2.0 | 34,475 | 0 | 23 | 10,559 | 12,152 | 6,032 | 6,120 | 751 | 40 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances,
MultiParamTypeClasses, DeriveDataTypeable, OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Pane.Errors
-- Copyright ... | cocreature/leksah | src/IDE/Pane/Errors.hs | gpl-2.0 | 12,287 | 0 | 36 | 3,764 | 2,839 | 1,426 | 1,413 | 228 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-
Copyright (C) 2010-2015 Puneeth Chaganti <punchagan@gmail.com>
and John MacFarlane <jgm@berkeley.edu>
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... | janschulz/pandoc | src/Text/Pandoc/Writers/Org.hs | gpl-2.0 | 12,500 | 3 | 20 | 3,291 | 3,669 | 1,830 | 1,839 | 239 | 7 |
{-# LANGUAGE OverloadedStrings #-}
module NetworkAccessor where
import Network.HTTP.Client
import Network.HTTP.Simple
import Network.HTTP.Types.Header
import Data.ByteString.Lazy.Char8 as C8
getResponseJSON :: String -> IO String
getResponseJSON url = do
req <- parseRequest url
resp <- httpLBS (req {requestHeade... | ivanmoore/seedy | src/NetworkAccessor.hs | gpl-3.0 | 421 | 0 | 13 | 67 | 119 | 66 | 53 | 12 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Packed.Static.Shapes
-- Copyright : (c) Reiner Pope 2008
-- License : GPL-style
--
-- Maintainer : Reiner Pope <reiner.pope@gmail.com>
-- Stability : experimental
-- Portability : portable
--
-- Shape... | reinerp/hmatrix-static | Data/Packed/Static/Shapes.hs | gpl-3.0 | 4,338 | 0 | 11 | 1,072 | 1,188 | 637 | 551 | -1 | -1 |
module Hkl.Transformation
( Transformation (..)
, apply
, unapply
)where
{-
Copyright : Copyright (C) 2014-2015 Synchrotron Soleil
License : GPL3+
Maintainer : picca@synchrotron-soleil.fr
Stability : Experimental
Portability: GHC only?
-}
import Prelude hiding (sqr... | klauer/hkl | contrib/Hkl/Transformation.hs | gpl-3.0 | 1,922 | 2 | 11 | 604 | 593 | 335 | 258 | 37 | 1 |
import Test.QuickCheck
import Data.List
data NestedList a = Element a | List [NestedList a] deriving (Show)
myFlatten :: NestedList a -> [a]
myFlatten (Element a) = [a]
myFlatten (List []) = []
myFlatten (List x) = foldl1' (++) (map myFlatten x)
testMyFlatten :: [Int] -> Bool
testMyFlatten x =
(length (myFlatten (L... | CmdrMoozy/haskell99 | 007.hs | gpl-3.0 | 527 | 10 | 15 | 98 | 283 | 148 | 135 | 16 | 1 |
module CCTK.Code.Arithmetic (
encode,
decode,
encodeFixed,
decodeFixed
) where
import Control.Applicative
import Data.Array as A
import Data.List (scanl')
import qualified Data.Map.Strict as M
encodeFixed :: [a] -> Int -> Integer -> [a]
encodeFixed code = go [] where
go acc 0 _ = acc
go acc l... | maugier/cctk | src/CCTK/Code/Arithmetic.hs | gpl-3.0 | 1,312 | 0 | 14 | 342 | 624 | 332 | 292 | 37 | 3 |
module Src.Week6.TestHW06 where
import Data.Aeson
import qualified Data.Text as T
import qualified Data.ByteString.Lazy.Char8 as B
inputFile :: FilePath
inputFile = "Src/Week6/markets.json"
outputFile :: FilePath
outputFile = "Src/Week6/outMart.json"
| urbanslug/cs194 | Src/Week6/TestHW06.hs | gpl-3.0 | 256 | 0 | 4 | 32 | 50 | 34 | 16 | 8 | 1 |
{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances #-}
module Backup
where
import Prelude hiding (catch)
import Util (epoch, decode', expandUser, safeWriteFileWith)
import Config
import Supervisor
import Process
import Process.Stats (Message (..))
import qualified Process.Stats as Stats
import qualified ... | br0ns/hindsight | src/Backup.hs | gpl-3.0 | 22,912 | 3 | 46 | 7,510 | 7,408 | 3,647 | 3,761 | 523 | 8 |
-- | Convenience functions to launch mintette.
module RSCoin.Mintette.Launcher
( ContextArgument (..)
, dumpStorageStatistics
, launchMintetteReal
, mintetteWrapperReal
, addToBank
) where
import Control.Monad.Catch (bracket)
import Control.Monad.Tr... | input-output-hk/rscoin-haskell | src/RSCoin/Mintette/Launcher.hs | gpl-3.0 | 2,325 | 0 | 15 | 685 | 522 | 286 | 236 | 43 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/List.hs | mpl-2.0 | 6,974 | 0 | 23 | 1,771 | 1,136 | 656 | 480 | 153 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/VideoFormats/Get.hs | mpl-2.0 | 4,963 | 0 | 19 | 1,227 | 821 | 474 | 347 | 116 | 1 |
--import MoofParse
--import MoofLexer
--import PostIndent
--import System.IO
--import IndentParse
--import System.Environment(getArgs)
--
--main = do
-- args <- getArgs
-- filestf <- readFile (args !! 0)
-- let tokens = moofScanTokens filestf
-- print tokens
-- print ""
-- print ""
--
-- let parse_tree = indentP... | mmath10/Moof | src/Main.hs | lgpl-3.0 | 1,191 | 0 | 18 | 265 | 260 | 139 | 121 | 22 | 2 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
-- * Tagless Typed Interpreters: extensibility
module ExtF where
import Intro2 as F hiding (main)
-- We extend the final representation of the language with a new
-- expression form: multiplication
class MulSYM repr... | egaburov/funstuff | Haskell/tytag/codes/ExtF.hs | apache-2.0 | 1,780 | 0 | 11 | 396 | 298 | 164 | 134 | 27 | 1 |
-- | Utilities for stress testing DNA code
module DNA.Interpreter.Testing where
import Control.Monad
import Control.Monad.Reader
-- import Control.Monad.IO.Class
-- import Control.Concurrent (threadDelay)
import Control.Distributed.Process
-- import System.Random
import DNA.Interpreter.Types
import DNA.Types
import Sy... | SKA-ScienceDataProcessor/RC | MS3/lib/DNA/Interpreter/Testing.hs | apache-2.0 | 1,056 | 0 | 12 | 238 | 192 | 101 | 91 | 20 | 1 |
-- Copyright (c) 2010 - Seweryn Dynerowicz
-- 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... | sdynerow/SemiringsLibrary | Algebra/Optimum.hs | apache-2.0 | 3,010 | 0 | 10 | 671 | 1,190 | 633 | 557 | 66 | 2 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QTextLength.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:20
Warning : this file is machine generated - do n... | uduki/hsQt | Qtc/Gui/QTextLength.hs | bsd-2-clause | 3,200 | 0 | 13 | 512 | 872 | 461 | 411 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module Servant.Client.... | mseri/fbmessenger-api-hs | src/Servant/Client/MultipartFormData.hs | bsd-3-clause | 4,305 | 0 | 22 | 1,058 | 974 | 519 | 455 | -1 | -1 |
-- (c) The University of Glasgow 2006
-- (c) The GRASP/AQUA Project, Glasgow University, 1998
--
-- Type - public interface
{-# LANGUAGE CPP, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
-- | Main functions for manipulating types and type-related things... | sdiehl/ghc | compiler/types/Type.hs | bsd-3-clause | 128,297 | 0 | 15 | 34,988 | 22,628 | 11,738 | 10,890 | 1,431 | 31 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Language.Nix.Identifier ( Identifier, ident, quote, needsQuoting ) where
import Control.DeepSeq.Generics
import Data.String
import Internal.PrettyPrinting ( Pretty(..), text )
import GHC.Generics ( Generic )
import Internal.Lens
import ... | psibi/cabal2nix | src/Language/Nix/Identifier.hs | bsd-3-clause | 2,117 | 0 | 9 | 358 | 329 | 193 | 136 | -1 | -1 |
module Insomnia.Typecheck.ConstructImportDefinitions (constructImportDefinitions) where
import Data.Monoid (Monoid(..), (<>), Endo(..))
import qualified Unbound.Generics.LocallyNameless as U
import Insomnia.Common.Stochasticity
import Insomnia.Identifier (Path(..), lastOfPath)
import Insomnia.Expr (QVar(..), Expr(..... | lambdageek/insomnia | src/Insomnia/Typecheck/ConstructImportDefinitions.hs | bsd-3-clause | 2,788 | 0 | 18 | 584 | 810 | 421 | 389 | 61 | 4 |
import qualified Data.ByteString.Char8 as C
import Control.Monad (forever,when)
import System.Console.GetOpt
import System.Environment
import System.Exit
import System.Random
import System.IO
import MBE.Markov
import MDB.LHashMap
data Opts = Opts {
dbFile :: FilePath,
outFile :: FilePath,
... | c-14/hmctg | src/hmctg.hs | bsd-3-clause | 1,908 | 0 | 16 | 665 | 555 | 300 | 255 | 48 | 2 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoRebindableSyntax #-}
{-# LANGUAGE OverloadedStr... | facebookincubator/duckling | Duckling/Time/DE/Rules.hs | bsd-3-clause | 56,000 | 0 | 23 | 14,209 | 15,316 | 8,322 | 6,994 | 1,581 | 5 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- Load information on package sources
module Stack.Build.Source
( loadSourceMap
... | cocreature/stack | src/Stack/Build/Source.hs | bsd-3-clause | 16,180 | 0 | 27 | 5,704 | 3,575 | 1,863 | 1,712 | 295 | 5 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances #-}
module AlphaHeavy.QuickFIX.GetMessageField where
import Control.Applicative
import Control.Exception (throwIO)
import Data.ByteString (ByteString)
import Data.Int
import Data.Time
import GHC.Generics
import Al... | alphaHeavy/quickfix-hs | src/AlphaHeavy/QuickFIX/GetMessageField.hs | bsd-3-clause | 2,205 | 0 | 13 | 404 | 553 | 277 | 276 | 61 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module EFA.Test.Solver where
import qualified Data.Set as S
import qualified Data.List as L
import Data.Graph.Inductive
import Test.QuickCheck
import Test.QuickCheck.All
import Debug.Trace
import EFA.Topology.RandomTopology
import EFA.Topology.Topology
import EFA.Solver.Equatio... | energyflowanalysis/efa-2.1 | attic/test/EFA/Test/Solver.hs | bsd-3-clause | 2,135 | 0 | 13 | 499 | 632 | 336 | 296 | 49 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
module Network.HTTP2.Types (
-- * Constant
frameHeaderLength
, maxPayloadLength
-- * SettingsList
, SettingsKeyId(..)
, checkSettingsList
, fromSettingsKeyId
, SettingsValue
, SettingsList
, toSettingsKeyId
-- * Settings
,... | bergmark/http2 | Network/HTTP2/Types.hs | bsd-3-clause | 16,457 | 0 | 10 | 3,310 | 2,977 | 1,737 | 1,240 | 329 | 6 |
module ClearScene
( clearScene
) where
import Data.Set
import Class.GameScene as GS
import GlobalValue
import KeyBind
data ClearScene = ClearScene Int
instance GameScene ClearScene where
update (GV {keyset = key}) scene
| member A key = return $ GS.EndScene
| member QUIT key = return $ GS.EndScene
... | c000/PaperPuppet | src/ClearScene.hs | bsd-3-clause | 452 | 0 | 10 | 100 | 148 | 76 | 72 | 14 | 1 |
module Text.EscapeCodes where
import Data.Char
import Data.Maybe
data Attribute = Normal | Bold | Underline | Blink | Reverse | Invisible
deriving (Show, Eq)
data Color = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White
deriving (Show, Eq, Enum, Bounded)
da... | ndmitchell/guihaskell | Text/EscapeCodes.hs | bsd-3-clause | 1,960 | 0 | 12 | 863 | 713 | 390 | 323 | 45 | 7 |
module BasicConstant where
import Alias
import BasicData
import Data.Bits
aFile,aAndBFile,hFile,gAndHFile,edge,backrank,eighthRank,firstRank,kingside,queenside :: BitBoard
initWKingsideRook,initWQueensideRook,initBKingsideRook,initBQueensideRook,initRooks :: BitBoard
initWKing,initBKing,initKingsAndRooks,initKi... | syanidar/Sophy | src/Foundation/BasicConstant.hs | bsd-3-clause | 1,883 | 0 | 5 | 485 | 259 | 174 | 85 | 39 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE UndecidableInstances #-}
-- Front end for imperative programs
module Language.Embedded.Imperative.Frontend where
import Prelude hiding (break)
import Data.Array.IO
import Data.IORef
import Data.Typeable
import System.IO.Unsafe
import Control.Monad.Op... | kmate/imperative-edsl | src/Language/Embedded/Imperative/Frontend.hs | bsd-3-clause | 20,035 | 0 | 13 | 4,618 | 5,268 | 2,752 | 2,516 | -1 | -1 |
{-# LANGUAGE
EmptyDataDecls
, ExistentialQuantification
, FlexibleInstances
, TemplateHaskell
, UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.ClassFile.Desc.Typed
( module Data.ClassFile.Desc
, Int (..)
, Long (..)
, Float (..)
, Double (..)
... | sonyandy/tnt | Data/ClassFile/Desc/Typed.hs | bsd-3-clause | 3,492 | 0 | 22 | 913 | 1,257 | 653 | 604 | -1 | -1 |
module System.Build.Access.Tag where
class Tag r where
tag ::
[(String, String, String)]
-> r
-> r
getTag ::
r
-> [(String, String, String)]
| tonymorris/lastik | System/Build/Access/Tag.hs | bsd-3-clause | 172 | 0 | 9 | 54 | 63 | 38 | 25 | 9 | 0 |
{-# LANGUAGE InstanceSigs #-} -- Because i love it
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances #-} -- IsoFunctorStageOne (MumuIso Maybe x)
{-# LANGUAGE MultiParamTypeClasses #-} -- IsoFunctorStageTwo
{-# LANGUAGE TypeFamilies #-}
{-| Non-polymorphic semi-isomorphis... | xicesky/sky-haskell-playground | src/Sky/Isomorphism/MumuIsoFunctor.hs | bsd-3-clause | 4,955 | 0 | 13 | 971 | 1,520 | 807 | 713 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
--vchan library
import VChanUtil
import System.IO
import Data.Binary
import Data.ByteString (ByteString, cons, empty)
import Data.Bits
import Control.Monad
data EvidencePiece = M0 M0Rep
| M1 M1Rep
| M2 M2Rep deriving (Eq, Ord, Show)
type M0... | armoredsoftware/protocol | demos/demo2/Measurer.hs | bsd-3-clause | 2,428 | 0 | 15 | 1,007 | 779 | 387 | 392 | 74 | 3 |
module TestAlg where
import Control.Applicative
import Control.Monad.Identity
import Generics.Types
import qualified Generics.Morphism.Para as Para
import qualified Container.Tree.Abstract as F
type Tree = FixA Id (F.Tree () Int)
type Alg r = Para.Alg (F.Tree () Int) r
type EndoAlg = Para.Endo (F.Tree () Int)
-... | sebastiaanvisser/islay | src/TestAlg.hs | bsd-3-clause | 1,401 | 0 | 9 | 382 | 356 | 200 | 156 | 23 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Data.Text (Text)
import Data.Void (Void)
import Dhall.Core (Expr)
import Dhall.CsvToDhall
( defaultConversion
, dhallFromCsv
, resolveSchemaExpr
, typeCheckSchemaExpr
)
import Dhall.Src (Src)
import S... | Gabriel439/Haskell-Dhall-Library | dhall-csv/tasty/Main.hs | bsd-3-clause | 3,648 | 0 | 17 | 813 | 914 | 485 | 429 | 86 | 2 |
data X a where
I :: Int -> X Int
| itchyny/vim-haskell-indent | test/datatype/gadt.out.hs | mit | 35 | 0 | 7 | 12 | 18 | 10 | 8 | -1 | -1 |
module Handler.Home where
import Import
-- This is a handler function for the GET request method on the HomeR
-- resource pattern. All of your resource patterns are defined in
-- config/routes
--
-- The majority of the code you will write in Yesod lives in these handler
-- functions. You can spread them across multip... | MaxGabriel/YesodScreencast | Handler/Home.hs | cc0-1.0 | 545 | 0 | 12 | 106 | 70 | 38 | 32 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Workspace
-- Copyright : 2007-2011 Juergen Nicklisch-Franken, Hamish Mackenzie
-- License : GPL
--
-- Maintai... | jaccokrijnen/leksah | src/IDE/Workspaces.hs | gpl-2.0 | 24,955 | 0 | 29 | 8,201 | 6,067 | 3,029 | 3,038 | 540 | 7 |
module Network.Haskoin.Block.Tests (tests) where
import Data.Either (fromRight)
import Data.String (fromString)
import Data.String.Conversions (cs)
import Network.Haskoin.Block
import Network.Haskoin.Test
i... | xenog/haskoin | test/bitcoin/Network/Haskoin/Block/Tests.hs | unlicense | 1,818 | 0 | 15 | 602 | 447 | 237 | 210 | -1 | -1 |
#! /usr/bin/env runhaskell
-----------------------------------------------------------------------------
-- |
-- Module :
-- Copyright : (c) 2012 Boyun Tang
-- License : BSD-style
-- Maintainer : tangboyun@hotmail.com
-- Stability : experimental
-- Portability : ghc
--
--
--
------------------------------------------... | tangboyun/bio-seq-gb | Setup.hs | bsd-3-clause | 402 | 0 | 4 | 43 | 24 | 19 | 5 | 2 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.