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 Game where
import Data.List
import Debug.Trace
import System.Random
data MovementDirection = MovementUp | MovementDown | MovementLeft | MovementRight deriving (Show, Eq)
data Tile = Tile Integer | EmptyTile deriving (Show, Eq)
type GameBoard = [[Tile]]
type RowType = Int
type ColTy... | anuraags/hs2048 | src/Game.hs | bsd-3-clause | 6,350 | 0 | 11 | 991 | 2,263 | 1,238 | 1,025 | 101 | 1 |
{-# LANGUAGE ForeignFunctionInterface, BangPatterns #-}
module Data.ByteString.Search.AhoCorasick
(Dictionary(), Match(..), Span, buildDictionary, search)
where
import Control.Monad
import Data.ByteString (ByteString)
import Foreign hiding (unsafePerformIO)
import Foreign.Ptr
import Foreign.C.String
import Fo... | ryb/acsearch | Data/ByteString/Search/AhoCorasick.hs | bsd-3-clause | 3,438 | 0 | 25 | 889 | 826 | 431 | 395 | 70 | 2 |
module QualNames where
import HsName
import HsIdent
import Maybe(isJust)
class QualNames qn m n | qn -> m n, m n -> qn where
getQualifier :: qn -> Maybe m
getQualified :: qn -> n
mkUnqual :: n -> qn
mkQual :: m -> n -> qn
isQual m = isJust (getQualifier m)
isUnqual m = not (isQual m)
qual m... | forste/haReFork | tools/base/Modules/QualNames.hs | bsd-3-clause | 948 | 0 | 8 | 324 | 309 | 160 | 149 | -1 | -1 |
import System.Environment
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
hCursorUp, hCursorDown, hCursorForward, hCursorBackward :: Handle
-> Int -- ^ Number of lines or characters to move
->... | coreyoconnor/ansi-terminal | includes/Common-Include.hs | bsd-3-clause | 6,008 | 0 | 10 | 1,827 | 743 | 435 | 308 | 89 | 1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE OverloadedStrings #-}
module LibSpec (spec) where
import Lib
import VCard
import Test.Hspec
import Test.Hspec.Megaparsec
import Test.QuickCheck
import Test.QuickCheck.Gen
import Test.QuickCheck.Instances
import qualified Data.Text.Lazy as TL
import Data.Monoid ( (<>)... | illis/hbook | test/LibSpec.hs | bsd-3-clause | 2,590 | 0 | 16 | 565 | 729 | 417 | 312 | 59 | 1 |
{-# LANGUAGE TemplateHaskell, TypeFamilies, TypeOperators #-}
-- |
-- Module : Language.Forvie.Lexing.Spec
-- Copyright : Robert Atkey 2012
-- License : BSD3
--
-- Maintainer : bob.atkey@gmail.com
-- Stability : experimental
-- Portability : unknown
--
-- Specification of the lexical structure of program... | bobatkey/Forvie | src/Language/Forvie/Lexing/Spec.hs | bsd-3-clause | 5,227 | 0 | 8 | 1,142 | 568 | 365 | 203 | 59 | 1 |
{-y LANGUAGE TemplateHaskell #-}
module Lib
( extractDefinitions
, Definition (..)
, defaultDefinition
, extractNextPageUrlFromSource
, validateDefinition
, ValidationResult (..)
, extractDefinitionPageUrls
, buildSearchUrl
, openURL
, homeURL
) where
import Contr... | YS-L/hs-urbandict | src/Lib.hs | bsd-3-clause | 9,316 | 0 | 24 | 2,744 | 2,471 | 1,272 | 1,199 | 191 | 3 |
module D18Lib.ParserSpec where
import Test.Hspec
import D18Lib (Op(..), Operand(..))
import D18Lib.Parser
import Text.Megaparsec (parse)
-- `main` is here so that this module can be run from GHCi on its own. It is
-- not needed for automatic spec discovery.
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
... | wfleming/advent-of-code-2016 | 2017/D18/test/D18Lib/ParserSpec.hs | bsd-3-clause | 1,040 | 0 | 20 | 318 | 376 | 192 | 184 | 26 | 1 |
module Main where
import Language.Angler.AST
import Language.Angler.Error
import Language.Angler.Parser.Parser (lexProgram, parseProgram)
import Language.Angler.Parser.Token (Token, prettyShowTokens)
import Language.Angler.Monad
import Language.Angler.Mixfix... | angler-lang/angler-lang | src/Main.hs | bsd-3-clause | 8,542 | 0 | 20 | 3,315 | 1,760 | 893 | 867 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module KATGCM where
import qualified Data.ByteString as B
import Data.ByteString.Char8 ()
-- (key, iv, aad, input, out, taglen, tag)
type KATGCM = (B.ByteString, B.ByteString, B.ByteString, B.ByteString, B.ByteString, Int, B.ByteString)
vectors_aes128_enc :: [KATGCM]
vectors_aes128... | vincenthz/hs-cipher-aes | Tests/KATGCM.hs | bsd-3-clause | 5,867 | 0 | 6 | 836 | 380 | 266 | 114 | 78 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Turnpike.Module where
import qualified Data.Text as X
import qualified Turnpike.Extension as Extension
import qualified Turnpike.FullName as FullName
import Text.Parsec.Text
import Text.Parsec
import Data.Char
data T = T
{ code :: X.Text
-- ^ The source code of this mod... | massysett/turnpike | library/lib/Turnpike/Module.hs | bsd-3-clause | 1,848 | 0 | 11 | 433 | 501 | 269 | 232 | 47 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
module Test.Common where
import Prelude hiding (read)
import Control.Monad
import Control.Monad.IO.Class (liftIO, Mo... | graninas/Andromeda | test/Test/Common.hs | bsd-3-clause | 2,609 | 0 | 10 | 354 | 670 | 360 | 310 | 55 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.TextureRectangle
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabil... | haskell-opengl/OpenGLRaw | src/Graphics/GL/NV/TextureRectangle.hs | bsd-3-clause | 790 | 0 | 5 | 103 | 62 | 45 | 17 | 10 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE DeriveGeneric #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Docs
( apiDocs
, docsB... | orclev/octarine-sapient-walnut | src/Docs.hs | bsd-3-clause | 2,427 | 0 | 10 | 522 | 583 | 333 | 250 | 65 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Hooks.ToggleHook
-- Copyright : Ben Boeckel <mathstuf@gmail.com>
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Ben Boeckel <mathstuf@gmail.com>
-- Stability... | csstaub/xmonad-contrib | XMonad/Hooks/ToggleHook.hs | bsd-3-clause | 5,982 | 0 | 12 | 1,596 | 1,109 | 622 | 487 | 62 | 2 |
{-# LANGUAGE DataKinds, TypeOperators, TypeFamilies #-}
module TcTypeNatSimple where
import GHC.TypeLits
import Data.Proxy
type family SomeFun (n :: Nat)
ti7 :: (x <= y, y <= x) => Proxy (SomeFun x) -> Proxy y -> ()
ti7 _ _ = ()
| jstolarek/ghc | testsuite/tests/typecheck/should_compile/T9708.hs | bsd-3-clause | 232 | 0 | 9 | 44 | 85 | 47 | 38 | 7 | 1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Network.Veneer(veneer) where
import qualified Blaze.ByteString.Builder as Builder
import Control.Concurrent (Chan, MVar, newChan, newEmptyMVar,
putMVar, readChan, readMVar,
... | mwotton/veneer | src/Network/Veneer.hs | bsd-3-clause | 2,388 | 0 | 17 | 728 | 805 | 410 | 395 | 57 | 2 |
{-# LANGUAGE DeriveDataTypeable
, PackageImports
, TupleSections
, UnicodeSyntax
#-}
module Main where
--------------------------------------------------------------------------------
-- Imports
--------------------------------------------------------------------------------
impor... | roelvandijk/hs-src-db | src/Main.hs | bsd-3-clause | 7,012 | 0 | 15 | 1,617 | 1,698 | 936 | 762 | 122 | 1 |
{-# LANGUAGE OverloadedStrings, PackageImports #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module TestRandom (StdGen) where
import System.Random (RandomGen(..), random, StdGen, mkStdGen)
import "crypto-random" Crypto.Random (CPRG(..))
import qualified Data.ByteString as BS
instance CPRG StdGen where
cprgCreate _ = m... | YoshikuniJujo/forest | subprojects/tls-analysis/server/TestRandom.hs | bsd-3-clause | 670 | 0 | 9 | 98 | 198 | 117 | 81 | 17 | 1 |
module Data.Patch.InternalSpec where
import Data.Monoid
import Test.Hspec
import Test.QuickCheck
import Data.Patch.Internal
import Test.Util ()
spec :: Spec
spec = do
describe "applicable" $ do
it "mempty is always applicable" $ do
property $ \d ->
... | liamoc/patches-vector | test/Data/Patch/InternalSpec.hs | bsd-3-clause | 358 | 0 | 17 | 115 | 92 | 50 | 42 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module FTP where
import System.DirWatch.PluginAPI
import Network.FTP.Conduit (createSink)
import Network.URI (URI(..), parseURI)
newtype FTPUri = FTPUri URI
upload (FTPUri uri@URI{uriPath=destDir}) filename
= ($$ createSink uri {uriPath=destDir ++ takeFileName filename})
instance... | meteogrid/dropdirwatch | plugins/FTP.hs | bsd-3-clause | 1,590 | 0 | 18 | 626 | 442 | 248 | 194 | 39 | 1 |
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module FindTrails where
{--
Do those points close together last?
Handle different types of dead-end differently?
Those trails that are next to empty squares can be recomputed!
Definitely m... | habbler/GridFlowCover | src/FindTrails.hs | bsd-3-clause | 11,575 | 0 | 31 | 4,153 | 2,268 | 1,167 | 1,101 | 135 | 11 |
module Lang.Lam.Passes.A_Stamp where
import FP
import Lang.Lam.Syntax
data St = St
{ expID :: LocNum
, bdrID :: BdrNum
}
expIDL :: Lens St LocNum
expIDL = lens expID $ \ s i -> s { expID = i }
bdrIDL :: Lens St BdrNum
bdrIDL = lens bdrID $ \ s i -> s { bdrID = i }
st0 :: St
st0 = St pzero pzero
data Env = Env
... | davdar/quals | src/Lang/Lam/Passes/A_Stamp.hs | bsd-3-clause | 1,344 | 0 | 18 | 388 | 651 | 319 | 332 | 42 | 7 |
module Tsp (minCycle, maxCycle, Node, Cost, Vertex) where
import Data.List (minimumBy, maximumBy)
import Data.Ord (comparing)
type Node = String
type Cost = Int
type Vertex = (Node, Node, Cost)
getPaths :: [Vertex] -> [[Vertex]]
getPaths vs = concatMap (\v -> getPaths' vs [first v] []) vs
getPaths' :: [Vertex] -> [... | geekingfrog/advent-of-code | src/Tsp.hs | bsd-3-clause | 1,229 | 0 | 14 | 333 | 531 | 296 | 235 | 34 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Storage
{-
(
-- * The Store monad
StoreM()
, runStoreM
-- * Paste manipulation
, getPaste
, getPastes
, getChildren
, writePaste
, topmost_parent
-- * Annotations
, getAnnotations
, addAnnotations
, delAnnotations
-- * User functions
, getU... | glguy/hpaste | src/Storage.hs | bsd-3-clause | 4,743 | 0 | 16 | 1,141 | 1,270 | 658 | 612 | 88 | 6 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module Network.Tangaroa.Byzantine.Client
( runRaftClient
) where
import Control.Concurrent.Chan.Unagi
import Control.Lens hiding (Index)
import Control.Monad.RWS
import Data.Binary
import Data.Foldable (traverse_)
import qualified Data.ByteString.L... | chrisnc/tangaroa | src/Network/Tangaroa/Byzantine/Client.hs | bsd-3-clause | 5,103 | 0 | 30 | 1,281 | 1,566 | 763 | 803 | 118 | 6 |
import Malgo.Prelude
main :: IO ()
main = do
putStrLn "not implemented"
| takoeight0821/malgo | test/Spec.hs | bsd-3-clause | 75 | 0 | 7 | 15 | 27 | 13 | 14 | 4 | 1 |
{-# LANGUAGE MagicHash, UnboxedTuples #-}
import Control.Monad
import Control.Concurrent
import Data.IORef
import System.Mem.Weak
import qualified GHC.Base as GHC
import qualified GHC.IORef as GHC
import qualified GHC.STRef as GHC
import qualified GHC.Weak as GHC
main :: IO ()
main = do
ref <- newIORef "Hello"
wea... | ocharles/Francium | material/weak.hs | bsd-3-clause | 671 | 0 | 12 | 114 | 234 | 124 | 110 | 18 | 1 |
-- Author: G4BB3R
isPalindrome :: Int -> Bool
isPalindrome x = show x == (reverse . show $ x)
largestPalindrome :: Int
largestPalindrome = maximum [x * y | x <- [1..999], y <- [1..999], isPalindrome $ x * y]
main :: IO ()
main = print largestPalindrome
| DestructHub/ProjectEuler | Problem004/Haskell/solution_1.hs | mit | 256 | 0 | 9 | 51 | 113 | 59 | 54 | 6 | 1 |
{-# LANGUAGE raNK2TYpes #-}
module ShouldSucceed where
data SeqView t a = Null
| Cons a (t a)
class PriorityQueue q where
empty :: (Ord a) => q a
single :: (Ord a) => a -> q a
insert :: (Ord a) => a -> q a -> q a
meld :: (Ord a) => q a -> q a -> q a... | dec9ue/jhc_copygc | regress/tests/1_typecheck/2_pass/ghc/tc087.hs | gpl-2.0 | 887 | 37 | 23 | 308 | 447 | 227 | 220 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables, RankNTypes, TypeOperators #-}
-- {-# OPTIONS_GHC -Wall #-}
----------------------------------------------------------------------
-- |
-- Module : Data.AltNatTrie
-- Copyright : (c) Conal Elliott 2009
-- License : GPL-3
--
-- Maintainer : conal@conal.net
-- Stability ... | sseefried/shady-gen | src/Data/AltNatTrie.hs | agpl-3.0 | 1,591 | 0 | 10 | 349 | 198 | 125 | 73 | 8 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE DeriveGeneric, NoImplicitPrelude, MagicHash,
ExistentialQuantification, ImplicitParams #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : G... | rahulmutt/ghcvm | libraries/base/GHC/IO/Exception.hs | bsd-3-clause | 14,890 | 0 | 17 | 3,222 | 2,133 | 1,204 | 929 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Test.StaticAnalysis (tests) where
import Data.Foldable
import Data.Set (Set)
import qualified Data.Text as T
import ... | quchen/stg | test/Testsuite/Test/StaticAnalysis.hs | bsd-3-clause | 4,094 | 0 | 12 | 1,218 | 851 | 491 | 360 | 103 | 1 |
{- This module contains function for building Javascript expressions. It is
- a little easier to use than directly using Javascript.Syntax.
-}
module Flapjax.Builder where
import qualified Prelude as P
import Text.ParserCombinators.Parsec.Pos (SourcePos, initialPos)
import BrownPLT.JavaScript.Syntax
p:: SourceP... | ducis/flapjax-fixed | flapjax/trunk/compiler/src/Flapjax/Builder.hs | bsd-3-clause | 915 | 0 | 8 | 199 | 274 | 147 | 127 | 28 | 1 |
-- The @FamInst@ type: family instance heads
{-# LANGUAGE CPP, GADTs #-}
module FamInst (
FamInstEnvs, tcGetFamInstEnvs,
checkFamInstConsistency, tcExtendLocalFamInstEnv,
tcLookupDataFamInst, tcLookupDataFamInst_maybe,
tcInstNewTyCon_maybe, tcTopNormaliseNewTypeTF_maybe,
newFam... | mcschroeder/ghc | compiler/typecheck/FamInst.hs | bsd-3-clause | 25,993 | 0 | 17 | 7,437 | 4,413 | 2,329 | 2,084 | -1 | -1 |
-- | Compile CPS to ACL2.
module Ivory.Compile.ACL2.ACL2Convert
( acl2Convert
) where
import MonadLib
import Language.ACL2
import Ivory.Compile.ACL2.CPS
import Ivory.Compile.ACL2.Expr (intrinsicACL2, showLit)
import qualified Ivory.Compile.ACL2.Expr as E
import Ivory.Compile.ACL2.RecTopoSort
type CN = StateT (I... | GaloisInc/ivory-backend-acl2 | src/Ivory/Compile/ACL2/ACL2Convert.hs | bsd-3-clause | 4,097 | 0 | 24 | 1,198 | 1,851 | 943 | 908 | 87 | 20 |
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
-- Automatically provides a main function
-- If you have trouble with this, make sure hspec-discover is installed and in your PATH
| psfblair/clay | spec/Spec.hs | bsd-3-clause | 176 | 0 | 2 | 29 | 5 | 4 | 1 | 1 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module IHaskell.Display.Widgets.String.TextArea (
-- * The TextArea Widget
TextArea,
-- * Constructor
mkTextArea) where
-- To keep `cabal repl` happy when running... | FranklinChen/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/TextArea.hs | mit | 2,041 | 0 | 14 | 491 | 427 | 232 | 195 | 45 | 1 |
-- Module : Network.AWS.Support
-- Copyright : (c) 2013-2014 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... | romanb/amazonka | amazonka-support/gen/Network/AWS/Support.hs | mpl-2.0 | 2,867 | 0 | 5 | 389 | 254 | 191 | 63 | 31 | 0 |
module API where
data Interface = Interface {
function :: (Num a) => a -> a -> a
}
plugin :: Interface
plugin = Interface { function = error "no function defined" }
| abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/testsuite/pdynload/spj3/api/API.hs | bsd-3-clause | 178 | 0 | 11 | 46 | 57 | 33 | 24 | 5 | 1 |
import Test.DocTest
-- Unit Testing Entry Point
-- ------------------------
-- This is the main function uses by the cabal test
--
-- To run these tests
-- * Select Leksah menu item Package -> Test
-- * Select the tick icon on the Leksah toolbar (to enable "cabal test" during builds)
main :: IO ()
main = doctest [... | cocreature/leksah | data/leksah-welcome/test/Main.hs | gpl-2.0 | 344 | 0 | 6 | 65 | 37 | 23 | 14 | 3 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
-- CmmNode type for representat... | ezyang/ghc | compiler/cmm/CmmNode.hs | bsd-3-clause | 31,159 | 0 | 15 | 8,226 | 5,705 | 3,072 | 2,633 | 323 | 5 |
{-# LANGUAGE BangPatterns, ScopedTypeVariables #-}
import Control.Monad
import qualified Data.ByteString as B
import Data.Csv.Incremental
import System.Exit
import System.IO
main :: IO ()
main = withFile "salaries.csv" ReadMode $ \ csvFile -> do
let loop !_ (Fail _ errMsg) = putStrLn errMsg >> exitFailure
... | plow-technologies/cassava | examples/IncrementalIndexedBasedDecode.hs | bsd-3-clause | 801 | 0 | 17 | 253 | 271 | 136 | 135 | 19 | 4 |
module A8 where
--Any type/data constructor name declared in this module can be renamed.
--Any type variable can be renamed.
--Rename type Constructor 'BTree' to 'MyBTree'
data BTree a = Empty | T a (BTree a) (BTree a)
deriving Show
buildtree :: Ord a => [a] -> BTree a
buildtree [] = Empty
buildtree... | kmate/HaRe | old/testing/unfoldAsPatterns/A8.hs | bsd-3-clause | 576 | 0 | 9 | 130 | 227 | 124 | 103 | 13 | 1 |
module Main where
import Control.Concurrent
import Control.Exception
-- Send ourselves a KillThread signal, catch it and recover.
main = do
id <- myThreadId
Control.Exception.catch (killThread id) $
\e -> putStr (show (e::SomeException))
| urbanslug/ghc | testsuite/tests/concurrent/should_run/conc008.hs | bsd-3-clause | 252 | 0 | 12 | 46 | 66 | 36 | 30 | 7 | 1 |
{-# LANGUAGE DataKinds, TypeOperators #-}
import Control.Applicative
import Data.Foldable (foldMap, traverse_)
import Data.Vinyl
import Graphics.GLUtil
import Graphics.GLUtil.Camera2D
import Graphics.Rendering.OpenGL
import Graphics.UI.GLFW (Key(KeyEsc))
import Graphics.VinylGL
import Linear (V2(..), _x, M33)
import Sy... | spetz911/progames | vinyl-gl-master/examples/src/Game2D.hs | mit | 4,929 | 0 | 14 | 1,267 | 1,443 | 768 | 675 | 88 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Bible.Versions(
listVersions
, versionId
, name
, lang
, langCode
, contactUrl
) where
import Bible.Request
import Control.Applicative
import Control.Lens
import Data.Aeson
... | bobjflong/biblesearch-api-haskell | src/Bible/Versions.hs | mit | 1,239 | 0 | 17 | 365 | 344 | 190 | 154 | 43 | 1 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-}
module BonminLogParser
(
bonminResultsParser,
bonminSolverReturnParser,
BonminResults(..),
SolverReturn(..),
) where
import Data.Attoparsec.ByteString.Char8
import Data.Word
import Control.Applicative
import qualified Data.Csv as C
import GHC.Generics
... | shaurya0/BonminLogParser | src/BonminLogParser.hs | mit | 3,624 | 0 | 14 | 885 | 807 | 409 | 398 | 93 | 2 |
module Step1 where
-- # Про алгебраические типы данных и паттерн-матчинг
data Void -- ноль ~ 0
data Unit = Unit -- единица ~ 1
data Add a b = AddL a | AddR b -- сложение ~ a + b
data Mul a b = Mul a b -- умножение ~ ab
-- тьюплы - это тоже алгебраический тип
da... | nlinker/haskell-you-could | src/Step1.hs | mit | 829 | 0 | 8 | 214 | 178 | 105 | 73 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, TupleSections, ScopedTypeVariables #-}
module Main (main) where
import Web.App
import Data.Monoid
import Options.Applicative
import Network.Wai
import Network.HTTP.Types
import Network.HTTP.Types.Method
import Data.Text.Lazy (Text)
import qualified Data.ByteString.Lazy.Char8 as BL
i... | fhsjaagshs/webapp | example.hs | mit | 2,396 | 0 | 12 | 554 | 723 | 377 | 346 | 72 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
module Yesod.Form.Materialize
(renderMaterialize
) where
import Yesod.Core
import Yesod.Form.Types
import Yesod.Form.Functions
renderMaterialize :: Monad m => FormRender m a
renderMaterialize aform fragment = ... | Codas/yesod-form-materialize | Yesod/Form/Materialize.hs | mit | 1,028 | 0 | 12 | 379 | 132 | 73 | 59 | 16 | 2 |
{-# LANGUAGE QuasiQuotes #-}
module Y2018.M01.D09.Exercise where
{--
Okay, we've parsed articles from JSON and we've stored those articles.
Let's start expanding the scope here both in breath and in depth.
Depth first.
What happens when we don't parse an article? Or we can't store one?
We've logged parsing proces... | geophf/1HaskellADay | exercises/HAD/Y2018/M01/D09/Exercise.hs | mit | 1,474 | 0 | 8 | 241 | 209 | 130 | 79 | 21 | 1 |
module Main where
import Example.Msg
import NSHaskell
import Bindings.Objc
import Foreign.C.Types
import Foreign.C.String
import Foreign.Ptr
import Control.Monad
import Control.Monad.IO.Class
import Data.List (sort, intercalate)
import Data.Monoid
import Data.Map
main :: IO ()
main = do
putStrLn "NSHaskell"
... | schell/nshaskell | src/Example.hs | mit | 520 | 0 | 12 | 100 | 156 | 82 | 74 | 21 | 1 |
-- | This module contains the code for all the user (programmer) facing
-- aspects, i.e. error messages, source-positions, overall results.
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Language.Adder.UX
(
-- * Representation
SourceSpan (..)
, Located (..)
-- * Extr... | ucsd-cse131/01-adder | lib/Language/Adder/UX.hs | mit | 5,626 | 0 | 10 | 999 | 1,290 | 690 | 600 | 122 | 1 |
{-# OPTIONS_GHC -F -pgmF htfpp #-}
module Main where
import Test.Framework
--import Test.Framework.BlackBoxTest
import {-@ HTF_TESTS @-} TestLokiJS
import {-@ HTF_TESTS @-} TestLokiPY
main :: IO ()
main = htfMainWithArgs ["--colors=true"] htf_importedTests
| Pancia/loki-lang | test/TestMain.hs | mit | 259 | 0 | 6 | 34 | 42 | 26 | 16 | 7 | 1 |
{-# htermination foldFM_GE :: (Bool -> b -> c -> c) -> c -> Bool -> FiniteMap Bool b -> c #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_foldFM_GE_8.hs | mit | 111 | 0 | 3 | 24 | 5 | 3 | 2 | 1 | 0 |
module Solidran.Cons.Detail
( readInput
, consensus
, profileMat
) where
import Data.Map (Map)
import Solidran.List (countIf, countDistinct)
import Data.Function (on)
import Data.List (maximumBy, transpose)
import qualified Data.Map as Map
import qualified Solidran.Fasta as Fasta
type ProfileMat = Ma... | Jefffrey/Solidran | src/Solidran/Cons/Detail.hs | mit | 910 | 0 | 11 | 238 | 323 | 189 | 134 | 26 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
#if __GLASGOW_HASKELL__ >= 810
{-# LANGUAGE EmptyCase #-}
#endif
module Test.Hspec.Core.Formatters.Pretty.Parser (
Expression(..)
, Literal(..)
, parseExpression
, unsafeParseExpression
) where
impo... | hspec/hspec | hspec-core/src/Test/Hspec/Core/Formatters/Pretty/Parser.hs | mit | 9,305 | 46 | 18 | 1,930 | 2,054 | 1,125 | 929 | 16 | 1 |
module Text.Pandoc.CrossRef.Util.ModifyMeta
(
modifyMeta
) where
import Text.Pandoc
import Text.Pandoc.Builder
import Text.Pandoc.CrossRef.Util.Options
import Text.Pandoc.CrossRef.Util.Meta
import Text.Pandoc.CrossRef.Util.Util
modifyMeta :: Options -> Meta -> Meta
modifyMeta opts meta
| isFormat "latex... | infotroph/pandoc-crossref | lib/Text/Pandoc/CrossRef/Util/ModifyMeta.hs | gpl-2.0 | 3,466 | 0 | 16 | 1,004 | 751 | 391 | 360 | 76 | 3 |
module Geometry.Main where
import Notes
import Geometry.AffineSpaces
geometry :: Note
geometry = chapter "Geometry" $ do
affineSpaces
| NorfairKing/the-notes | src/Geometry/Main.hs | gpl-2.0 | 163 | 0 | 7 | 46 | 34 | 19 | 15 | 6 | 1 |
module Make where
import Types
make :: FilePath -- Make directory
-> FilePath -- Make file
-> Maybe String -- Make rule
-> Execution
make dir mf mr = MakeExecution $ MakeTarget {
make_dir = dir
, make_file = mf
, make_rule = mr
}
| NorfairKing/eden | src/Make.hs | gpl-2.0 | 307 | 0 | 8 | 122 | 66 | 39 | 27 | 10 | 1 |
-- Record Syntax
data Person = Person { firstName :: String
, lastName :: String
, age :: Int
, height :: Float
, phoneNumber :: String
, flavor :: String
} deriving (Show)
d... | solvery/lang-features | haskell/type_4.hs | gpl-2.0 | 673 | 0 | 10 | 308 | 168 | 94 | 74 | 17 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module CloudFiles where
import Prelude hiding (log)
import Control.Monad.Free
import Data.Functor.Sum
-- | Defin... | capitanbatata/sandbox | free-monads/src/CloudFilesByBart.hs | gpl-3.0 | 3,482 | 0 | 13 | 751 | 1,259 | 630 | 629 | 93 | 2 |
{-|
A reader for CSV data, using an extra rules file to help interpret the data.
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGU... | mstksg/hledger | hledger-lib/Hledger/Read/CsvReader.hs | gpl-3.0 | 33,927 | 0 | 23 | 7,880 | 6,659 | 3,475 | 3,184 | 494 | 7 |
-- Blog articles.
module Blog
( ArticleMetadata (..),
articleLastModificationDate,
ArticleMetadataStore,
Slug (..),
storeFromMetadata,
metadataArticles,
getCacheArticle,
readMetadata,
updateModificationDate,
getArticleContent,
LiftArticleError (..),
ArticleError (..),
)
w... | phaazon/phaazon.net | backend/src/Blog.hs | gpl-3.0 | 5,543 | 0 | 14 | 935 | 1,251 | 696 | 555 | 105 | 3 |
{-# LANGUAGE CPP, FlexibleContexts #-}
-- | Debugging helpers
-- more:
-- http://hackage.haskell.org/packages/archive/TraceUtils/0.1.0.2/doc/html/Debug-TraceUtils.html
-- http://hackage.haskell.org/packages/archive/trace-call/0.1/doc/html/Debug-TraceCall.html
-- http://hackage.haskell.org/packages/archive/htrace/0.1/d... | kmels/hledger | hledger-lib/Hledger/Utils/Debug.hs | gpl-3.0 | 8,167 | 0 | 19 | 2,004 | 1,790 | 932 | 858 | 107 | 4 |
-- |
-- Module: Math.NumberTheory.Canon.Simple
-- Copyright: (c) 2015-2019 Frederick Schneider
-- Licence: MIT
-- Maintainer: Frederick Schneider <fws.nyc@gmail.com>
-- Stability: Provisional
--
-- This a wrapper for the Canonical Representation type found in the Internals module.
-- If you want to work... | grandpascorpion/canon | Math/NumberTheory/Canon/Simple.hs | gpl-3.0 | 11,573 | 0 | 11 | 2,922 | 2,899 | 1,494 | 1,405 | 180 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StandaloneDeriving #-}
-- |
-- Module : IndexShaSum
-- Copyright : Herbert Valerio Riedel
-- SPDX-License-Identifier: GPL-3.0-or-later
--
module IndexShaSum (run, IndexShaSumOptions(..)) wh... | hvr/hackage-cli | src/IndexShaSum.hs | gpl-3.0 | 5,215 | 0 | 16 | 1,357 | 1,592 | 827 | 765 | 102 | 4 |
module Output where
import Ast
import System
import Parser
import Check
import Elaborate
output :: Compile ()
output = return ()
{-
output [] = do putStrLn $ ""
output (a:as) = do putStrLn $ a
output as
return ()
output2 v ... | luebbers/reconos | tools/fsmLanguage/kurm/assembler/Output.hs | gpl-3.0 | 501 | 0 | 6 | 241 | 40 | 24 | 16 | 8 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-debugger/gen/Network/Google/Resource/CloudDebugger/Debugger/Debuggees/Breakpoints/Delete.hs | mpl-2.0 | 7,043 | 0 | 22 | 1,689 | 1,021 | 591 | 430 | 152 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/List.hs | mpl-2.0 | 4,413 | 0 | 15 | 953 | 487 | 287 | 200 | 77 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-kms/gen/Network/AWS/KMS/GenerateDataKey.hs | mpl-2.0 | 9,273 | 0 | 13 | 1,897 | 929 | 568 | 361 | 94 | 1 |
{-# OPTIONS -XMultiParamTypeClasses #-}
{-# OPTIONS -XFunctionalDependencies #-}
{-# OPTIONS -XFlexibleInstances #-}
--------------------------------------------------------------------------------
-- $Id: AccumulateM.hs,v 1.3 2004/01/22 19:53:46 graham Exp $
--
-- Copyright (c) 2003, G. KLYNE. All rights reserv... | amccausl/Swish | Swish/HaskellUtils/AccumulateM.hs | lgpl-2.1 | 5,035 | 0 | 9 | 1,115 | 728 | 422 | 306 | -1 | -1 |
--------------------------------------------------------------------------------
-- See end of this file for licence information.
--------------------------------------------------------------------------------
-- |
-- Module : Proof
-- Copyright : (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
-- ... | DougBurke/swish | src/Swish/Proof.hs | lgpl-2.1 | 11,675 | 0 | 16 | 2,956 | 1,843 | 1,017 | 826 | 123 | 3 |
module Parser where
import Control.Applicative
import Data.Attoparsec.Text
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HM
import Data.Text
type IniAsNestedMap = HashMap Text (HashMap Text Text)
parseIniToNestedMap :: Text -> Either String Ini... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/generics/ghc-generics/2017-12-justin-woo-two-tortellini/src/Parser.hs | unlicense | 1,092 | 0 | 14 | 244 | 398 | 201 | 197 | 36 | 1 |
-- greetIfCool2.hs
module GreetIfCool1 where
greetIfCool :: String -> IO ()
greetIfCool coolness =
if cool coolness
then putStrLn "eyyyy, What's shakin'?"
else
putStrLn "pshhhh."
where cool v = v == "downright frosty yo" | logistark/haskellbookexercises | 4 - BasicDatatypes/greetIfCool2.hs | apache-2.0 | 249 | 0 | 7 | 62 | 58 | 30 | 28 | 7 | 2 |
{-# LANGUAGE CPP #-}
-- |
-- Module : Data.Text.Internal.Functions
-- Copyright : 2010 Bryan O'Sullivan
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : GHC
--
-- /Warning/: this is an internal module, and does not have a stable
-- API or name. Fun... | bos/text | src/Data/Text/Internal/Functions.hs | bsd-2-clause | 1,267 | 0 | 9 | 234 | 208 | 124 | 84 | 16 | 2 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QSystemTrayIcon.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:14
Warning : this file is machine generated - ... | uduki/hsQt | Qtc/Gui/QSystemTrayIcon.hs | bsd-2-clause | 14,816 | 0 | 15 | 2,273 | 4,369 | 2,222 | 2,147 | -1 | -1 |
{-# LANGUAGE CPP #-}
module Main where
import System.Posix.Internals (c_read, c_open, c_close, c_write, o_RDWR, o_CREAT, o_NONBLOCK)
import System.Posix.Internals (c_safe_read, c_safe_open, c_close, c_safe_write, o_RDWR, o_CREAT, o_NONBLOCK)
import Foreign.C.String
import Foreign.Marshal.Alloc
import Control.Monad
imp... | winterland1989/stdio | bench/diskIO/AutoFFI.hs | bsd-3-clause | 2,538 | 0 | 23 | 860 | 696 | 352 | 344 | 62 | 7 |
{-# LANGUAGE FlexibleContexts, ViewPatterns, DataKinds #-}
-----------------------------------------------------------------------------
-- |
-- Module : Program.Model.Camera
-- Copyright : (c) Artem Chirkin
-- License : MIT
--
-- Maintainer : Artem Chirkin <chirkin@arch.ethz.ch>
-- Stability : exper... | achirkin/ghcjs-modeler | src/Program/Model/Camera.hs | bsd-3-clause | 24,093 | 0 | 22 | 8,022 | 5,104 | 2,839 | 2,265 | 312 | 11 |
{-# LANGUAGE DeriveGeneric, OverloadedStrings #-}
module Network.BitcoinRPC.Types
( BitcoinAmount(..)
, BitcoinAddress(..)
, TransactionID(..)
, BlockHash(..)
, RPCAuth(..)
, Transaction(..)
, TransactionHeader(..)
, TransactionOrigins(..)
, SerializedTransaction(..)
, BitcoinAdd... | javgh/bitcoin-rpc | Network/BitcoinRPC/Types.hs | bsd-3-clause | 8,926 | 0 | 22 | 3,780 | 1,964 | 1,079 | 885 | 192 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module Determination
( run
) where
import Control.Monad.Random
import Control.Concurrent (threadDelay)
import Control.Monad (forM_, liftM)
import Data.Monoid ((<>))
import Data.Text ... | 5outh/determination | src/Determination.hs | bsd-3-clause | 1,624 | 0 | 16 | 418 | 502 | 261 | 241 | 52 | 3 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE StandaloneDeriving #-}
module CircleImage where
import Codec.Picture
import Control.DeepSeq
import Control.Monad
import Data.Random
import qualif... | mattrrichard/darwin | src/CircleImage.hs | bsd-3-clause | 2,581 | 1 | 12 | 621 | 831 | 420 | 411 | 69 | 1 |
-----------------------------------------------------------------------------
-- |
-- Copyright : (C) 2015 Dimitri Sabadie
-- License : BSD3
--
-- Maintainer : Dimitri Sabadie <dimitri.sabadie@gmail.com>
-- Stability : experimental
-- Portability : portable
-----------------------------------------------------... | phaazon/agui | src/Graphics/UI/AGUI/Core/Parent.hs | bsd-3-clause | 728 | 0 | 10 | 124 | 86 | 62 | 24 | 7 | 0 |
{-
- Claq (c) 2013 NEC Laboratories America, Inc. All rights reserved.
-
- This file is part of Claq.
- Claq is distributed under the 3-clause BSD license.
- See the LICENSE file for more details.
-}
{-# LANGUAGE FlexibleContexts #-}
import qualified Data.ByteString.Lazy as ByteString
import Data.Foldable (for... | ti1024/claq | src/Main.hs | bsd-3-clause | 3,536 | 0 | 31 | 1,086 | 870 | 456 | 414 | 69 | 6 |
{-# LANGUAGE FlexibleInstances, OverloadedStrings #-}
import Control.Monad (foldM, guard, liftM, when)
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BL
import qualified Data.Colour as C
import qualified Data.Colour.Names as CN
import Data.Function (on)
import Data.List (find, groupBy, intercalate, so... | ronwalf/ridemap | src/ridemap.hs | bsd-3-clause | 11,226 | 0 | 20 | 3,498 | 4,218 | 2,244 | 1,974 | 287 | 4 |
-- | This modules contains functions for miscellaneous drawing operations that are not
-- adequately covered by the Primitives module
module Graphics.UI.SDL.Sprig.Drawing
( getPixel
, blit
, replaceColor
, floodFill
) where
import Foreign
import Foreign.C
import Data.Int
import Graphics.UI.SDL.Video
im... | liamoc/sprig-hs | Graphics/UI/SDL/Sprig/Drawing.hs | bsd-3-clause | 2,534 | 0 | 16 | 460 | 651 | 336 | 315 | 36 | 1 |
module Hilt.Server (module Hilt.Server, addHeaders) where
import Control.Concurrent (forkIO)
import Data.ByteString (ByteString)
import Data.Function ((&))
import qualified Network.Wai.Handler.Warp as W
import Network.HTTP.Types (status404, status200)
import Network.WebSockets (ServerApp... | supermario/hilt | src/Hilt/Server.hs | bsd-3-clause | 5,386 | 0 | 15 | 966 | 1,095 | 612 | 483 | 79 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module Main where
import Prednote
import Prelude hiding (any, all, maybe)
main :: IO ()
main = do
verboseTestStdout (all $ lessEq (5 :: Int)) [0..10]
verboseTestStdout (any $ equal (4 :: Int)) [0..3]
verboseTestStdout (any $ equal (... | massysett/prednote | tests/prednote-visual-tests.hs | bsd-3-clause | 469 | 0 | 13 | 89 | 199 | 106 | 93 | 13 | 1 |
{-# LANGUAGE Arrows, FlexibleContexts, FlexibleInstances,
MultiParamTypeClasses #-}
module Karamaan.Opaleye.LeftJoin
{-# DEPRECATED "This is for exploratory purposes only" #-}
where
{- Don't actually use this module! It was an attempt to see if I
could implement outer-join-like functionali... | karamaan/karamaan-opaleye | Karamaan/Opaleye/LeftJoin.hs | bsd-3-clause | 3,424 | 2 | 15 | 746 | 727 | 400 | 327 | 44 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module SecondFront.VirtualHosts.Route where
import System.Log.Logger
import Control.Lens
import Control.Concurrent.MVar
-- import Control.Exception as E
-- import Control.Concurrent
import Data.Foldable (find)
import Data.ByteString.Char8 (unpack)
import SecondTransfer
import S... | alcidesv/second-front | hs-src/SecondFront/VirtualHosts/Route.hs | bsd-3-clause | 2,648 | 0 | 19 | 697 | 551 | 292 | 259 | 65 | 4 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
module Llvm.Query.Conversion where
import Llvm.Hir.Data.Inst
import Llvm.Query.Qerror
import Llvm.Hir.Data.Type
import Debug.Trace
import Data.Int
strToApInt :: String -> Integer
-- strToApInt s | trace ("parsing " ++ show s ++ " as int") False = undefined
strT... | sanjoy/hLLVM | src/Llvm/Query/Conversion.hs | bsd-3-clause | 2,379 | 0 | 10 | 504 | 773 | 402 | 371 | 44 | 2 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
\section[Specialise]{Stamping out overloading, and (optionally) polymorphism}
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
module Specialise ( specProgram, specUnfoldi... | sdiehl/ghc | compiler/specialise/Specialise.hs | bsd-3-clause | 108,646 | 1 | 22 | 31,503 | 12,109 | 6,596 | 5,513 | -1 | -1 |
module GalFld.More.NumberTheory (
moebFkt
, primFactors
, isPrime
, divisors
) where
import Data.List
-- |Möbius-Funktion µ mit
-- µ(n) = (-1)^k,falls n quadratfrei, k = #Primfaktoren, 0 sonst
moebFkt :: Int -> Int
moebFkt n | facs == nub facs && even (length facs) = 1
| facs == nub facs && odd (... | maximilianhuber/softwareProjekt | src/GalFld/More/NumberTheory.hs | bsd-3-clause | 1,076 | 0 | 12 | 318 | 361 | 188 | 173 | 23 | 2 |
{-# LANGUAGE FlexibleContexts #-}
module TypeSystem.Parser.ParsingUtils where
import Utils.Utils
import Text.Parsec
import Data.Functor.Identity
import Data.List (foldl1)
-- Constants --
digits = ['0'..'9']
lowers = ['a'..'z']
uppers = ['A'..'Z']
hex = digits ++ ['a'..'f'] ++ ['A'..'F']
whitespace = [' ','\t']
... | pietervdvn/ALGT | src/TypeSystem/Parser/ParsingUtils.hs | bsd-3-clause | 3,855 | 167 | 16 | 840 | 1,639 | 856 | 783 | 120 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Network.Wreq (Response)
import qualified Network.Wreq as Wreq
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as BSL
import System.Directory (getCurrentDirectory)
import Control.Lens ((^.), (^?))
import Data.Aeson
import Data.A... | jasonkuhrt/weather | source/Main.hs | bsd-3-clause | 993 | 0 | 12 | 166 | 267 | 152 | 115 | 33 | 1 |
{-# LANGUAGE ImplicitParams, Rank2Types, NoMonomorphismRestriction #-}
{-| A module for fonts -}
module Font(withFont,fontSize) where
import Graphics
import Foreign.C.Types
import Paths_Epsilon
fontName = "resources/monofur.ttf"
withFont :: ((?font :: Font,?desc :: GLfloat,?asc :: GLfloat,?depth :: GLfloat
... | lih/Epsilon | src/Font.hs | bsd-3-clause | 744 | 0 | 12 | 155 | 203 | 109 | 94 | 20 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : $Header$
Copyright : (c) 2015 Swinburne Software Innovation Lab
License : BSD3
Maintainer : Shannon Pace <space@swin.edu.au>
Stability : unstable
Portability : portable
Utilities for testing Eclogues functionality.
-}
module TestUtils where
import Eclog... | futufeld/eclogues | eclogues-impl/test/TestUtils.hs | bsd-3-clause | 4,922 | 0 | 13 | 843 | 1,596 | 842 | 754 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable, ExistentialQuantification #-}
-- | [Process Binder]
--
-- This is a frontend to easily use Cloud Haskell inside other monads.
-- If you have a complex system and want to make it distributed withouth
-- having to deal with monad transformers or complex pipeing to connect
-- Cloud Haskel... | netogallo/process-binder | Control/Distributed/Process/Binder/Types.hs | bsd-3-clause | 3,648 | 1 | 13 | 760 | 890 | 451 | 439 | 69 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
module Parser
(
AST(..)
, Op(..)
, parseString
) where
import qualified Data.Data as Data
import qualified Control.Lens as L
import Data.Data.Lens (uniplate)
import Text.ParserCombinators.Parsec hiding ((<|>))
import Text.ParserCombinators.Parse... | benma/bfc | src/Parser.hs | bsd-3-clause | 5,330 | 0 | 20 | 1,609 | 1,554 | 865 | 689 | 110 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.