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 : Main
-- Copyright : (c) Amy de Buitléir 2012-2014
-- License : BSD-style
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : portable
--
-- Runs the QuickCheck tests.
--
------------... | mhwombat/creatur-realtra.OLD | test/Main.hs | bsd-3-clause | 705 | 0 | 6 | 118 | 101 | 68 | 33 | 11 | 1 |
module Data.STM.PriorityQueue (
Impl,
module Data.STM.PriorityQueue.Class
) where
import Data.STM.PriorityQueue.Class
import Data.STM.PriorityQueue.Internal.PTSTASLPQ
-- | The default implementation
type Impl = PTSTASLPQ
| Alllex/stm-data-collection | src/Data/STM/PriorityQueue.hs | bsd-3-clause | 233 | 0 | 5 | 33 | 42 | 30 | 12 | 6 | 0 |
foo = do
(-) <- Just 5
return ()
| mpickering/ghc-exactprint | tests/examples/ghc710/DoParens.hs | bsd-3-clause | 38 | 0 | 8 | 14 | 26 | 12 | 14 | 3 | 1 |
{- |
Module : Control.Monad.Cont
Copyright : (c) The University of Glasgow 2001,
(c) Jeff Newbern 2003-2007,
(c) Andriy Palamarchuk 2007
License : BSD-style (see the file LICENSE)
Maintainer : [email protected]
Stability : experimental
Portability : portable
[Comp... | johanneshilden/principle | public/mtl-2.2.1/Control/Monad/Cont.hs | bsd-3-clause | 5,202 | 0 | 5 | 1,019 | 99 | 72 | 27 | 19 | 0 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP
, MagicHash
, UnboxedTuples
, ScopedTypeVariables
#-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
-- kludge for the Control.Concurrent.QSem, Control.Concurrent.QSemN
-- and Control.Concurrent.SampleVar imports.
----------------------------... | alexander-at-github/eta | libraries/base/Control/Concurrent.hs | bsd-3-clause | 24,713 | 0 | 21 | 6,049 | 1,287 | 750 | 537 | 128 | 3 |
module RawSqlTest where
import qualified Data.Conduit as C
import qualified Data.Conduit.List as CL
import qualified Data.Text as T
import Init
import PersistTestPetType
import PersistentTestModels
specsWith :: Runner SqlBackend m => RunDb SqlBackend m -> Spec
specsWith runDb = describe "rawSql" $ do
it "2+2" $ ru... | gbwey/persistent | persistent-test/src/RawSqlTest.hs | mit | 5,078 | 0 | 18 | 1,805 | 1,801 | 877 | 924 | -1 | -1 |
module Deptup0 () where
import Language.Haskell.Liquid.Prelude
{-@ data Pair a b <p :: x0:a -> x1:b -> Prop> = P (x :: a) (y :: b<p x>) @-}
data Pair a b = P a b
{-@ mkP :: forall a <q :: y0:a -> y1:a -> Prop>. x: a -> y: a<q x> -> Pair <q> a a @-}
mkP :: a -> a -> Pair a a
mkP x y = P x y
incr :: Int -> Int
incr... | abakst/liquidhaskell | tests/pos/deptupW.hs | bsd-3-clause | 463 | 0 | 7 | 132 | 164 | 87 | 77 | 12 | 1 |
-- | Display mode is for drawing a static picture.
module Graphics.Gloss.Interface.Pure.Display
( module Graphics.Gloss.Data.Display
, module Graphics.Gloss.Data.Picture
, module Graphics.Gloss.Data.Color
, display)
where
import Graphics.Gloss.Data.Display
import Graphics.Gloss.Data.Picture
import Graphics... | gscalzo/HaskellTheHardWay | gloss-try/gloss-master/gloss/Graphics/Gloss/Interface/Pure/Display.hs | mit | 1,021 | 2 | 9 | 214 | 123 | 87 | 36 | 15 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.Path2D
(js_newPath2D, newPath2D, js_newPath2D', newPath2D',
js_newPath2D'', newPath2D'', js_addPath, addPath, js_closePath,
closePath, js_moveTo, moveTo, js_lineTo, lineTo,
js_quadra... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/Path2D.hs | mit | 6,260 | 132 | 10 | 1,164 | 1,638 | 885 | 753 | 101 | 1 |
-- | Load the Default profile in SWTOR and save it with the name "Default".
-- Then run this to generate Default.hs.
module Main (main) where
import Text.Show.Pretty
import SWTOR.UIProfile
import SWTOR.UIProfile.XMLSerialization
main :: IO ()
main = do
profilePath <- getProfilePath "Default"
let hsPath = "src/S... | ion1/swtor-ui | app/GenerateDefault.hs | mit | 875 | 0 | 10 | 155 | 146 | 76 | 70 | 19 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.Enumerator.Hoist where
import Control.Monad.Hoist
import qualified Data.Enumerator as E
instance MonadHoist (E.Iteratee a) where
hoist f m = E.Iteratee $ do
v <- f $ E.runIteratee m
case v of
E.Continue c -> return $ E.Continue ((hoist f) . c)
... | DanielWaterworth/siege | src/Data/Enumerator/Hoist.hs | mit | 394 | 0 | 17 | 93 | 154 | 78 | 76 | 11 | 0 |
-- Sum Times Tables
-- http://www.codewars.com/kata/551e51155ed5ab41450006e1/
module Codewars.Kata.Sum where
sumTimesTables :: [Integer] -> Integer -> Integer -> Integer
sumTimesTables tbl n m = sum . map (* ((n+m) * (m-n+1) `div` 2)) $ tbl
| gafiatulin/codewars | src/Beta/Sum.hs | mit | 243 | 0 | 14 | 36 | 87 | 50 | 37 | 3 | 1 |
import Control.Monad
import Data.List
readNumbers :: String -> [Int]
readNumbers = map read . words
readPair [a, b] = (a, b)
buy k toys = length $ takeWhile (<k) $ scanl (+) 0 toys
main :: IO ()
main = do
input <- getLine
let (n, k) = readPair (readNumbers input)
input <- getLine
let toys = sort $ re... | mgrebenets/hackerrank | alg/greedy/mark-and-toys.hs | mit | 399 | 0 | 12 | 106 | 185 | 94 | 91 | 14 | 1 |
{-# htermination addListToFM_C :: (b -> b -> b) -> FiniteMap Float b -> [(Float,b)] -> FiniteMap Float b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_addListToFM_C_6.hs | mit | 126 | 0 | 3 | 22 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-}
-- | Implementation details and the internal API.
module Hahet.Internal where
import Prelude hiding (FilePath)
import Control.Applicative
import Control.Lens
import Control.Monad.RWS
import Control.Monad.Logger
imp... | SimSaladin/hahet | src/Hahet/Internal.hs | mit | 6,976 | 0 | 14 | 1,607 | 1,311 | 730 | 581 | -1 | -1 |
import Data.Vector (Vector)
import qualified Data.Vector as Vec
triangle :: Vector (Vector Int)
triangle = Vec.fromList [
Vec.fromList [75],
Vec.fromList [95, 64],
Vec.fromList [17, 47, 82],
Vec.fromList [18, 35, 87, 10],
Vec.fromList [20, 04, 82, 47, 65],
Vec.fromList [19, 01, 23, 75, 03, 34],... | pshendry/project-euler-solutions | 0018/solution.hs | mit | 1,186 | 0 | 14 | 297 | 703 | 414 | 289 | 27 | 1 |
module Logic.Simulation where
import Logic.Types
import Logic.Data.Units
import Control.Lens
import Control.Monad.State
import Data.Maybe (fromJust)
import qualified Data.Map as Map (lookup, fromList)
tickTime = 1.0/60.0 :: Float
simulationStep :: PlayerCommandSet -> GameState -> GameState
simulationStep... | HarvestGame/logic-prototype | src/Logic/Simulation.hs | mit | 2,885 | 0 | 13 | 920 | 834 | 425 | 409 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable , ExistentialQuantification
,ScopedTypeVariables, StandaloneDeriving, RecordWildCards, FlexibleContexts, CPP
,GeneralizedNewtypeDeriving #-}
module Main where
import Prelude hiding (div)
import Transient.Base
#ifdef ghcjs_HOST_OS
hiding ( option,runCloud')
#endif
import GHCJ... | geraldus/transient-universe | examples/widgets.hs | mit | 3,228 | 0 | 19 | 826 | 577 | 303 | 274 | 45 | 1 |
module Utilities (
build, buildWithCmdOptions, buildWithResources, applyPatch, runBuilder,
runBuilderWith, builderEnvironment, needBuilder, needLibrary,
installDirectory, installData, installScript, installProgram, linkSymbolic,
contextDependencies, stage1Dependencies, libraryTargets, topsortPackages,
... | izgzhen/hadrian | src/Utilities.hs | mit | 10,577 | 0 | 21 | 2,560 | 2,679 | 1,334 | 1,345 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
module Main where
import Data.Maybe (mapMaybe)
import Data.Foldable (Foldable, foldrM, forM_)
import Data.Traversable (mapAccumL)
import Data.Array ((!))
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.UTF8 as UT... | marshall-lee/the_iron_searcher | Main.hs | mit | 5,372 | 0 | 18 | 1,317 | 1,672 | 882 | 790 | 121 | 4 |
import Data.Char(ord)
import Data.List(sort)
getNames :: String -> [String]
getNames input = read $ "[" ++ input ++ "]"
charToInt c = ord c - ord '@'
wordToInt w = sum $ map charToInt w
main = do
input <- readFile "euler_0022.dat"
print $ sum $ zipWith (*) [1..] $ map wordToInt $ sort $ getNames input
| dpieroux/euler | 0/0022.hs | mit | 316 | 0 | 12 | 70 | 142 | 71 | 71 | 9 | 1 |
-- going back and forth between chapters to remember functions
-- eg. I couldn't remember translucent so had to go back to chpt 1
-- even though I was on chpt 1
-- I couldn't tab :/ it would shift entire line
-- eg. tab = to push = forward would tab entire line of code
-- is there any way to make the code pa... | kammitama5/kammitama5.github.io | images/play_img/notes2.hs | mit | 771 | 1 | 11 | 181 | 145 | 83 | 62 | -1 | -1 |
-- Recursion Schemes
{-
Name
Catamorphism
foldr :: (a -> b -> b) -> b -> [a] -> b
Deconstructs a data structure
Anamorphism
unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
Constructs a structure level by level
-}
-- | A fix-point type.
newtype Fix f = Fix { unFix :: f (Fix f) }
-- | Catamorphism o... | Airtnp/Freshman_Simple_Haskell_Lib | Intro/WIW/Interpreter/Recursion-Schemes.hs | mit | 2,566 | 0 | 12 | 678 | 1,103 | 568 | 535 | -1 | -1 |
-- Questions ?
-- on generalise (autant que possible) le type des fonctions du bloc1
myHead :: [a] -> a
myHead (x:_) = x
myTail :: [a] -> [a]
myTail (_:xs) = xs
myAppend :: [a] -> [a] -> [a]
myAppend xs ys = myAppend' xs
where --myAppend' :: [Int] -> [Int]
myAppend' (x:xs) = x:myAppend' ... | romanlp/mines-haskell | tp/TP2.hs | mit | 4,487 | 18 | 14 | 1,164 | 2,417 | 1,303 | 1,114 | 126 | 2 |
{-#LANGUAGE GADTSyntax, RankNTypes, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances#-}
module Typeclass.TermAlgebra(TermAlgebra(var, con)) where
class Functor f => TermAlgebra h f | h -> f where
var :: forall a . a -> h a
con :: forall a . f (h a) -> h a
| MichielDeCuyper/Algebraic-Effect-Handlers | src/Typeclass/TermAlgebra.hs | mit | 304 | 0 | 11 | 53 | 85 | 47 | 38 | 8 | 0 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses #-}
{- |
Module : ./QVTR/Logic_QVTR.hs
Description : Instance of class Logic for the QVTR logic
Copyright : (c) Daniel Calegari Universidad de la Republica, Uruguay 2013
License : GPLv2 or higher, see LICENSE.txt
Maintainer : d... | spechub/Hets | QVTR/Logic_QVTR.hs | gpl-2.0 | 2,078 | 0 | 7 | 614 | 352 | 192 | 160 | 56 | 0 |
module GUI where
import Graphics.UI.Gtk
import Expr
import Lit
import Parsing
import Data.Either
import Helper
main :: IO ()
main = do
initGUI
window <- windowNew
set window [windowTitle := "Calculator", containerBorderWidth := 5,
windowDefaultWidth := 400, windowDefaultHeight := 500]
ta... | MaximKN/Haskell1 | src/GUI.hs | gpl-3.0 | 3,914 | 0 | 18 | 836 | 1,116 | 511 | 605 | 86 | 2 |
module System.Console.RemoteCLI.CommandLine (
CommandLine (..)
, Scope (..)
, Option (..)
, Value (..)
, fromString
, toString
) where
import Text.ParserCombinators.Parsec
import Control.Monad.Writer (Writer, execWriter, tell)
import Data.Char (isSpace)
import Data.List (dropWhileEnd)
import Control.Appl... | SneakingCat/rcli | src/System/Console/RemoteCLI/CommandLine.hs | gpl-3.0 | 3,937 | 0 | 11 | 1,062 | 1,118 | 591 | 527 | 83 | 6 |
module Chapter8_recursion where
import Data.List (intersperse)
mc91 :: Int -> Int
mc91 n
| n > 100 = n - 10
| otherwise = mc91 . mc91 $ n + 11
digitToWord :: Int -> String
digitToWord 1 = "one"
digitToWord 2 = "two"
digitToWord 3 = "three"
digitToWord 4 = "four"
digitToWord 5 = "five"
digitToWord 6 = "six"
digit... | maruks/haskell-book | src/Chapter8_recursion.hs | gpl-3.0 | 665 | 0 | 11 | 153 | 293 | 148 | 145 | 25 | 1 |
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
module HipSpec.Lang.PolyFOL.Types where
import Data.Foldable (Foldable)
import Data.Traversable (Traversable)
{-# ANN module "HLint: ignore Use camelCase" #-}
-- | Clauses.
--
-- The a type variable is used for many different identifiers:
-- * Quantif... | danr/hipspec | src/HipSpec/Lang/PolyFOL/Types.hs | gpl-3.0 | 3,294 | 0 | 11 | 943 | 726 | 428 | 298 | 58 | 0 |
module KRPCHS.Internal.NetworkUtils
( helloMsg
, helloStreamMsg
, connNameMsg
, recvN
, recvId
, recvMsg
, sendMsg
) where
import KRPCHS.Internal.SerializeUtils
import Control.Monad
import Network.Socket hiding (send, recv, sendTo, recvFrom)
import Network.Socket.ByteString
import qualified Data.ByteString ... | Cahu/krpc-hs | src/KRPCHS/Internal/NetworkUtils.hs | gpl-3.0 | 1,937 | 0 | 16 | 513 | 617 | 316 | 301 | 52 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad.Trans
import Control.Monad (forM_)
import Data.List
import Data.Monoid
import Hakyll
import Hakyll.Web.Paginate
import Hakyll.Web.Sass
import Schnizle.Config
import ... | felixsch/schnizle | schnizle.hs | gpl-3.0 | 4,578 | 0 | 20 | 936 | 1,063 | 508 | 555 | 93 | 2 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
-- |
-- Module : Aura.Dependencies
-- Copyright : (c) Colin Woodbury, 2012 - 2020
-- License : GPL3
-- Maintainer: Colin Woodbury <[email protected]>
--
-- Library for handling package dependencies and version conflicts.
... | bb010g/aura | aura/lib/Aura/Dependencies.hs | gpl-3.0 | 7,513 | 0 | 18 | 1,881 | 2,227 | 1,140 | 1,087 | -1 | -1 |
-----------------------------------------------------------------------------
--
-- Module : Cmd_arguments
-- Copyright : (c) hokum
-- License : GPL3
--
-- Maintainer :
-- Stability : experimental
-- Portability :
--
-- |
--
-----------------------------------------------------------------------------... | Collocalini/GenImplicit | genimplicit/src/Cmd_arguments.hs | gpl-3.0 | 4,197 | 0 | 14 | 827 | 764 | 411 | 353 | 68 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Shoppingadsprogram/Requestreview.hs | mpl-2.0 | 5,602 | 0 | 19 | 1,298 | 810 | 469 | 341 | 118 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-bigtableadmin/gen/Network/Google/Resource/BigtableAdmin/Projects/Instances/Get.hs | mpl-2.0 | 5,052 | 0 | 15 | 1,128 | 714 | 419 | 295 | 106 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/RegionInstanceGroups/List.hs | mpl-2.0 | 7,338 | 0 | 19 | 1,615 | 753 | 452 | 301 | 110 | 1 |
module Betty.Signup.MailText
(
verHeaders,
verText,
verHtml
)
where
import ClassyPrelude.Yesod
import Network.Mail.Mime (Encoding (None), Part (..))
import Text.Blaze.Html.Renderer.Utf8 (renderHtml)
import Text.Shakespeare.Text (stext)
import Yesod.Au... | sajith/betty-web | Betty/Signup/MailText.hs | agpl-3.0 | 2,066 | 0 | 7 | 543 | 245 | 157 | 88 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
--
-- Copyright (c) 2009-2012 Stefan Wehr - http://www.stefanwehr.de
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundat... | ekarayel/HTF | Test/Framework/TestManager.hs | lgpl-2.1 | 20,400 | 0 | 26 | 6,558 | 4,378 | 2,258 | 2,120 | 337 | 12 |
module Terminology.Roots (quizByRoot, quizByMeaning) where
import Colors
questions = [("aer","air")
,("aero","gas")
,("acous, audi","hearing")
,("acusis","hearing condition")
,("aden","gland")
,("adip","fat")
,("adrena","adrenal")
,("... | kohabi/rxquiz | src/Terminology/Roots.hs | unlicense | 5,399 | 0 | 9 | 2,063 | 1,450 | 958 | 492 | 154 | 1 |
-- Copyright 2017 Google Inc.
--
-- 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 in ... | robinp/haskell-indexer | haskell-indexer-backend-ghc/src/Language/Haskell/Indexer/Backend/GhcArgs.hs | apache-2.0 | 1,448 | 0 | 11 | 299 | 127 | 84 | 43 | 18 | 1 |
module Main where
import SIL.Serializer.C
import SIL.Serializer
import SIL
import Foreign.Marshal.Alloc
import Test.Hspec
import Test.QuickCheck
import Common
serializerSpec :: Spec
serializerSpec = do
describe "C dynamic representation" $ do
it "Serializing to C dynamic representation and back will giv... | sfultong/stand-in-language | test/SerializerSpec.hs | apache-2.0 | 3,221 | 0 | 22 | 1,239 | 633 | 287 | 346 | 67 | 1 |
module RecursiveContents (getRecursiveContents) where
import Control.Monad (forM)
import System.Directory (doesDirectoryExist, getDirectoryContents)
import System.FilePath ((</>))
getRecursiveContents :: FilePath -> IO [FilePath]
getRecursiveContents topDir = do
names <- getDirectoryContents topDir
let proper... | EricYT/Haskell | src/real_haskell/chapter-9/RecursiveContents.hs | apache-2.0 | 648 | 0 | 16 | 131 | 177 | 94 | 83 | 15 | 2 |
-- 101524
import Data.List(genericLength, group, partition, sort, transpose)
-- XXX community chest and chance are only shuffled once, not a random draw
-- XXX current markov state can't handle that accurately
nn = 3
dd = 4 -- XXX figure out why this doesn't give the right result for 6
-- matrix converges to correc... | higgsd/euler | hs/84.hs | bsd-2-clause | 4,011 | 0 | 15 | 1,248 | 1,430 | 807 | 623 | 62 | 4 |
{-# LANGUAGE OverloadedStrings #-}
-- | 'GenericPackageDescription' Field descriptions
module Distribution.PackageDescription.Parsec.FieldDescr (
-- * Package description
pkgDescrFieldDescrs,
storeXFieldsPD,
-- * Library
libFieldDescrs,
storeXFieldsLib,
-- * Foreign library
foreignLibFie... | mydaum/cabal | Cabal/Distribution/PackageDescription/Parsec/FieldDescr.hs | bsd-3-clause | 26,793 | 0 | 18 | 7,379 | 5,562 | 3,054 | 2,508 | 454 | 7 |
{-# LANGUAGE OverloadedStrings #-}
module ReadXLSX.Internal
where
import Codec.Xlsx
import Codec.Xlsx.Formatted
import Control.Lens
import Data.Aeson.Types (Value, Value (Number), Value (String),
Value (Bool), Value (Null))
import qual... | stla/jsonxlsx | src/ReadXLSX/Internal.hs | bsd-3-clause | 9,082 | 0 | 16 | 2,808 | 2,494 | 1,315 | 1,179 | 175 | 5 |
{-|
This module contains the datatype definitions of the Abstract Syntax Tree
-}
module NScriptParser.AST where
data Program
= DefStmt String Exp
| ExpStmt Exp
data Exp
= Let String Exp Exp
| Lambda String Exp
| FunApp Exp Exp
| If Exp Exp Exp
| Arith ArithOp Exp Exp
... | grievejia/njuscript | src/NScriptParser/AST.hs | bsd-3-clause | 695 | 0 | 6 | 266 | 168 | 98 | 70 | 30 | 0 |
module Main where
-- Wir sollten die tatsaechlichen Algorithmen trennen
-- von den Bedingungen, wie lange iteriert wird.
-- Das würde alles viel einfacher machen, denn
-- die Abbruchbedingungen sind nur Nebensache.
--
-- So koennen die eigentlichen Algorithmen unabhängig von
-- den Abbruchbedingungen programmiert w... | energyflowanalysis/efa-2.1 | sandbox/loops/Main.hs | bsd-3-clause | 2,728 | 0 | 13 | 512 | 611 | 330 | 281 | 41 | 1 |
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, UndecidableInstances #-}
module TypeError(TypeError(..), TypeErrorMonad, untypable, notRank1Types, tooMuchTypes) where
import Control.Monad.Error
data TypeError = TooMuchTypes [String]
| NotRank1Types [String... | projedi/type-inference-rank2 | src/TypeError.hs | bsd-3-clause | 1,107 | 0 | 8 | 220 | 275 | 150 | 125 | 22 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
--------------------------------------------------------------------------
-- |
-- Module: Game.Waddle.ExportJS
-- Copyright: (c) 2015 Martin Grabmueller
-- License: BSD3
--
-- Maintainer: [email protected]
-- Stability: provisional
-... | mgrabmueller/waddle | Game/Waddle/ExportJS.hs | bsd-3-clause | 12,220 | 0 | 20 | 2,229 | 3,628 | 1,807 | 1,821 | 210 | 2 |
{-# LANGUAGE DeriveGeneric, KindSignatures, TemplateHaskell,
QuasiQuotes, FlexibleInstances, TypeOperators, TypeSynonymInstances,
MultiParamTypeClasses, FunctionalDependencies, OverlappingInstances,
ScopedTypeVariables, EmptyDataDecls, DefaultSignatures, ViewPatterns,
UndecidableInstances, FlexibleCont... | jfischoff/simple-c-value | tests/Main.hs | bsd-3-clause | 9,666 | 0 | 19 | 2,353 | 2,369 | 1,259 | 1,110 | 250 | 2 |
import Control.Monad
import LispError
import LispEval
import LispVal
import LispParser
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck as QC
import Text.Parsec
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests = testGroup "Tests" [properties, unitTests]
properties :: TestTree
prop... | rashack/scheme-in-48h | test/Spec.hs | bsd-3-clause | 7,809 | 0 | 28 | 1,926 | 2,348 | 1,186 | 1,162 | 146 | 2 |
{-# LANGUAGE OverloadedStrings, StandaloneDeriving #-}
module Web.Neo.Internal where
import Web.Rest (
RestT,rest,
runRestT,Hostname,Port,RestError,
Request(Request),Method(POST,PUT,GET),Location,ContentType,Body,
Response(code,responseType,responseBody),
ResponseCode)
import Control.Error (Either... | phischu/haskell-neo | src/Web/Neo/Internal.hs | bsd-3-clause | 11,125 | 0 | 14 | 2,158 | 2,965 | 1,626 | 1,339 | -1 | -1 |
module Language.Haskell.Liquid.TH (
lq
) where
import Control.Monad
import Data.List
import Data.Maybe
import Language.Haskell.TH
import Language.Haskell.TH.Quote
import Language.Haskell.TH.Syntax
import Language.Fixpoint.Types (val)
import... | spinda/liquidhaskell | src/Language/Haskell/Liquid/TH.hs | bsd-3-clause | 2,339 | 0 | 16 | 621 | 537 | 296 | 241 | 51 | 1 |
module Try
(
displayHelp
, echoHelp
, dec2binHelp
, bin2decHelp
, googleHelp
, gmt_timeHelp
, local_timeHelp
, cowsNbullsHelp
, guesssHelp
, randomCoinHelp
, rDieHelp
, weatherHelp
) where
import System.Random
import System.IO
import Data.List
displayHelp :: String
displayHelp =
"Implemented Commands... | Sahil-yerawar/IRChbot | src/Try.hs | bsd-3-clause | 2,474 | 40 | 6 | 389 | 255 | 151 | 104 | 63 | 1 |
{-# LANGUAGE OverloadedStrings, RecordWildCards, DeriveDataTypeable, ConstraintKinds, FlexibleContexts #-}
module Test.WebDriver.Exceptions.Internal
( InvalidURL(..), HTTPStatusUnknown(..), HTTPConnError(..)
, UnknownCommand(..), ServerError(..)
, FailedCommand(..), failedCommand, mkFailedCommandI... | zerobuzz/hs-webdriver | src/Test/WebDriver/Exceptions/Internal.hs | bsd-3-clause | 7,272 | 0 | 17 | 2,587 | 1,369 | 747 | 622 | 129 | 1 |
{-# LANGUAGE DeriveGeneric, KindSignatures, TemplateHaskell,
QuasiQuotes, FlexibleInstances, TypeOperators, TypeSynonymInstances,
MultiParamTypeClasses, FunctionalDependencies, OverlappingInstances,
ScopedTypeVariables, EmptyDataDecls, DefaultSignatures, ViewPatterns,
UndecidableInstances, FlexibleContexts... | jfischoff/minimal-resource-protocol | src/MRP/CommandsC.hs | bsd-3-clause | 5,932 | 0 | 13 | 2,138 | 610 | 332 | 278 | 52 | 1 |
-- Solution to Stanford Compilers Course.
-- (c) Copyright 2012 Michael Starzinger. All Rights Reserved.
module Main (main) where
import Assembler.Printer (prettyAsm)
import CoolCodegen (generate)
import CoolSemant (Result(..),semant)
import Data.List (find)
import Data.Maybe (fromJust,isJust)
import System.Console.Ge... | mstarzinger/coolc | generator.hs | bsd-3-clause | 1,411 | 6 | 20 | 269 | 447 | 240 | 207 | 29 | 6 |
{-#LANGUAGE OverloadedStrings#-}
-- convert sam file to fastq file
-- Min Zhang
-- 10-10-14
-- Version 0.0.1
import qualified System.Environment as Sys
import IO
import qualified Safe
main = do
instructions
inputArguments <- interactive
test inputArguments
process inputArguments
instructions = putStrLn "\nsa... | Min-/fourseq | src/utils/SamToFastq.hs | bsd-3-clause | 1,349 | 0 | 12 | 305 | 358 | 177 | 181 | 28 | 2 |
--
-- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) a... | abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/src/System/Plugins/Utils.hs | bsd-3-clause | 15,029 | 0 | 18 | 3,959 | 3,584 | 1,902 | 1,682 | 264 | 6 |
{-|
Module : CPE
Description : Data types and parsers for CPEs
Copyright : (c) Stephen O'Brien 2016
License : MIT
Maintainer : [email protected]
Stability : experimental
Portability :
-}
module CPE.Parser.CPE where
| wayofthepie/cpe | src/CPE/Parser/CPE.hs | bsd-3-clause | 263 | 0 | 3 | 77 | 8 | 6 | 2 | 1 | 0 |
module ProcLang.Evaluator
( valueOf
, run
, eval
, evalProgram
) where
import Control.Applicative ((<|>))
import ProcLang.Data
import ProcLang.Parser
type EvaluateResult = Try ExpressedValue
liftMaybe :: a -> Maybe b -> Either a b
liftMaybe _ (Just x) = Right x
liftMaybe y Nothing = Le... | li-zhirui/EoplLangs | src/ProcLang/Evaluator.hs | bsd-3-clause | 7,387 | 0 | 13 | 1,728 | 2,474 | 1,265 | 1,209 | 172 | 6 |
-- | Operations on the 'Area' type that involve random numbers.
module Game.LambdaHack.Server.DungeonGen.AreaRnd
( -- * Picking points inside areas
mkFixed, pointInArea, findPointInArea, mkVoidRoom, mkRoom
-- * Choosing connections
, connectGrid, randomConnection
-- * Plotting corridors
, HV(..), Corr... | LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Server/DungeonGen/AreaRnd.hs | bsd-3-clause | 16,236 | 1 | 20 | 4,919 | 5,240 | 2,829 | 2,411 | -1 | -1 |
{-# LANGUAGE LambdaCase #-}
module Path
( Path
, empty
, cons
, uncons
, length
, toList
, lca
, keep
, (~=)
) where
import Data.Function (fix)
import Prelude hiding (head, length)
infix 4 ~=
data Path a
= Nil
| Cons
{-# UNPACK #-} !Int
... | sonyandy/mlf | src/Path.hs | bsd-3-clause | 3,069 | 0 | 17 | 1,017 | 1,585 | 793 | 792 | 118 | 7 |
import Data.DIntMap as DIM
import Control.Monad
import Data.Hashable
xs :: [Int]
xs = [0..1000000]
f = hash
main = do
dmap <- DIM.new "hello" :: IO (DIM.DIntMap Int)
root <- DIM.getRoot dmap
root' <- foldM (\t i->DIM.insert dmap (f i) 1 t) root xs
DIM.putRoot dmap root'
--putStrLn $ showTree root'... | bgamari/dtree | DIntMapTest.hs | bsd-3-clause | 418 | 0 | 13 | 97 | 161 | 82 | 79 | 12 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Main (main) where
import Control.Applicative ((<$>))
import Control.Concurrent (forkIO)
import Data.Char (toLower)
import Data.Time.Clock.POSIX (getPOSIXTime)
import System.Console.CmdArgs.Implicit
import Cu... | noteed/curved | bin/curved.hs | bsd-3-clause | 3,663 | 0 | 21 | 807 | 942 | 488 | 454 | 104 | 1 |
module Cardano.Wallet.API.V1.Internal.Update where
import Servant
import Cardano.Wallet.API.Response (ValidJSON)
type API =
"update"
:> ( "apply"
:> Post '[ValidJSON] NoContent
:<|> "postpone"
:> Post '[ValidJSON] NoContent
)
| input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/API/V1/Internal/Update.hs | mit | 281 | 0 | 12 | 81 | 70 | 42 | 28 | -1 | -1 |
module Collatz.Inverse where
-- $Id$
import qualified Collatz.Parameter as P
import Collatz.Config
import Collatz.Roll
import Inter.Types
import Inter.Quiz
import Autolib.ToDoc
import Autolib.Hash
import Autolib.Util.Seed
import qualified Challenger as C
import Data.Typeable
import Autolib.Reporter
data Collatz_I... | florianpilz/autotool | src/Collatz/Inverse.hs | gpl-2.0 | 1,577 | 3 | 14 | 347 | 374 | 199 | 175 | -1 | -1 |
{-# OPTIONS_JHC -fno-prelude #-}
module Jhc.List where
import Jhc.Basics
import Jhc.IO(error)
import Jhc.Int
import Jhc.Order
import Jhc.String
-- | our fusion routines
build :: (forall b . (a -> b -> b) -> b -> b) -> [a]
build g = g (:) []
augment :: forall a. (forall b. (a->b->b) -> b -> b) -> [a] -> [a]
augment ... | dec9ue/jhc_copygc | lib/jhc/Jhc/List.hs | gpl-2.0 | 11,773 | 8 | 12 | 3,739 | 2,903 | 1,536 | 1,367 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="es-ES">
<title>Reglas de exploración activa | ZAP extensión</title>
<maps>
<homeID>top</hom... | veggiespam/zap-extensions | addOns/ascanrules/src/main/javahelp/org/zaproxy/zap/extension/ascanrules/resources/help_es_ES/helpset_es_ES.hs | apache-2.0 | 996 | 80 | 66 | 162 | 423 | 214 | 209 | -1 | -1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[RnSource]{Main pass of renamer}
-}
{-# LANGUAGE CPP, ScopedTypeVariables #-}
module RnSource (
rnSrcDecls, addTcgDUs, findSplice
) where
#include "HsVersions.h"
import {-# SOURCE #-} RnExpr( rnLExpr )
import {-# SOURCE #-} RnSplice (... | olsner/ghc | compiler/rename/RnSource.hs | bsd-3-clause | 98,600 | 1 | 25 | 30,858 | 17,858 | 9,447 | 8,411 | 1,137 | 8 |
--------------------------------------------------------------------------------
{-|
Module : OpenGL
Copyright : (c) Daan Leijen 2003
License : wxWindows
Maintainer : [email protected]
Stability : provisional
Portability : portable
Convenience wrappers for the openG... | sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/OpenGL.hs | lgpl-2.1 | 4,483 | 0 | 15 | 1,168 | 741 | 419 | 322 | 65 | 23 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-------------------... | getyourguide/fbthrift | thrift/compiler/test/fixtures/qualified/gen-hs/Module2_Types.hs | apache-2.0 | 8,049 | 0 | 18 | 1,232 | 2,393 | 1,353 | 1,040 | 128 | 3 |
{-
(c) The AQUA Project, Glasgow University, 1993-1998
\section[CoreMonad]{The core pipeline monad}
-}
{-# LANGUAGE CPP #-}
module CoreMonad (
-- * Configuration of the core-to-core passes
CoreToDo(..), runWhen, runMaybe,
SimplifierMode(..),
FloatOutSwitches(..),
pprPassDetails,
-- * Plugins... | snoyberg/ghc | compiler/simplCore/CoreMonad.hs | bsd-3-clause | 34,652 | 0 | 18 | 10,685 | 6,418 | 3,460 | 2,958 | 511 | 4 |
module AddLocalDecl2 where
-- |This is a function
foo = x -- comment 0
where p = 2 -- comment 1
-- |Another fun
bar = a -- comment 2
where nn = 2
p = 2 -- comment 3
| mpickering/ghc-exactprint | tests/examples/transform/AddLocalDecl2.hs | bsd-3-clause | 179 | 0 | 6 | 54 | 39 | 26 | 13 | 6 | 1 |
-----------------------------------------------------------------------------------------
{-| Module : ParseC
Copyright : (c) Daan Leijen 2003
License : BSD-style
Maintainer : [email protected]
Stability : provisional
Portability : portable
Basic Types
-... | ekmett/wxHaskell | wxdirect/src/Types.hs | lgpl-2.1 | 4,359 | 0 | 12 | 1,375 | 860 | 495 | 365 | 93 | 1 |
module MaybeIn1 where
f x@(y:ys) = Just y
| mpickering/HaRe | old/testing/simplifyExpr/MaybeIn1_TokOut.hs | bsd-3-clause | 46 | 0 | 8 | 12 | 25 | 14 | 11 | 2 | 1 |
-- This is similar to T11982b but 'locker' inlined which allows the module to
-- compile.
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ApplicativeDo #-}
module Main where
import Control.Concurrent.MVar
type Locker = forall a. IO a -> IO a
main :: IO ()
main = do
line <- getLine
lock <- newMVar ()
f line $ wi... | sdiehl/ghc | testsuite/tests/typecheck/should_compile/T11982c.hs | bsd-3-clause | 411 | 0 | 9 | 92 | 121 | 62 | 59 | 12 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program.Strip
--
-- Maintainer : [email protected]
-- Portability : portable
--
-- This module provides an library interface to... | mydaum/cabal | Cabal/Distribution/Simple/Program/Strip.hs | bsd-3-clause | 2,922 | 0 | 20 | 881 | 542 | 285 | 257 | 46 | 8 |
{-# LANGUAGE QuasiQuotes #-}
module Main where
import Expr
main :: IO ()
main = do case [expr|1 + 2|] of
[expr|$x + $x|] -> print x
_ -> return ()
| olsner/ghc | testsuite/tests/quasiquotation/qq006/Main.hs | bsd-3-clause | 190 | 0 | 11 | 74 | 58 | 34 | 24 | 7 | 2 |
{-# LANGUAGE ViewPatterns,DeriveDataTypeable #-}
module T4371 where
import Data.Typeable
data E1 = E1 deriving Typeable
data E2 = E2 deriving Typeable
f :: Typeable a => a-> ()
f x = case x of
(cast -> Just E1) -> ()
(cast -> Just E2) -> ()
| tibbe/ghc | testsuite/tests/deSugar/should_compile/T4371.hs | bsd-3-clause | 248 | 0 | 10 | 53 | 96 | 52 | 44 | 9 | 2 |
module Matrix where
import Data.List (sort)
type Row a = [a]
type Col a = [a]
type Matrix a = [Row a]
cp :: [[a]] -> [[a]]
cp [] = [[]]
cp (xs:xss) = [x:ys | x <- xs, ys <- yss]
where yss = cp xss
m1 :: Matrix Int
m1 = [[1,2,3],[4,5,6],[7,8,9]]
m2 :: Matrix Int
m2 = [[7,8,9],[4,5,6],[1,2,3]]
-- |Identity matrix... | dirkz/Thinking_Functionally_With_Haskell | 5/Matrix.hs | isc | 2,675 | 0 | 11 | 637 | 1,323 | 719 | 604 | 70 | 2 |
reciprocal :: Int -> (String, Int)
reciprocal n | n > 1 = ('0' : '.' : digits, recur)
| otherwise = error
"attempting to compute reciprocal of number <= 1"
where
(digits, recur) = divide n 1 []
divide :: Int -> Int -> [Int] -> (String, Int)
divide n c cs | c `elem` cs = ([], position c cs)
... | hpacheco/HAAP | examples/minimalistic/HPCTest.hs | mit | 903 | 2 | 10 | 296 | 466 | 236 | 230 | 26 | 2 |
module Language.ElementaryArithmetic(
exprParser
, interpFile
, interpString
)where
-- Author: [email protected]
-- Last Modified:2016年02月09日 星期二 19时09分51秒 二
import Control.Applicative hiding ((<|>))
import Data.String
import Text.ParserCombinators.Parsec
... | Alaya-in-Matrix/Anjelica | src/Language/ElementaryArithmetic.hs | mit | 2,560 | 0 | 14 | 802 | 930 | 462 | 468 | 55 | 2 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module DetermineTheType where
-- Num a => a
example = 1
-- Num a => a
a = (* 9) 6
-- Num t => (t, [Char])
b = head [(0,"doge"), (1,"kitteh")]
-- [(Integer, [Char])]
c = [(0 :: Integer ,"doge"),(1,"kitteh")]
-- Bool
d = if False then True else False
-- Int
e = length [1,... | candu/haskellbook | ch5/determineTheType.hs | mit | 568 | 0 | 8 | 150 | 226 | 139 | 87 | 18 | 2 |
-- Gradually Adding Parameters
-- http://www.codewars.com/kata/555b73a81a6285b6ce000047/
module Codewars.Kata.AddingParameters where
add :: Num a => [a] -> a
add = fst . foldl (\(s, m) v -> (s + m * v, m + 1) ) (0, 1)
| gafiatulin/codewars | src/7 kyu/AddingParameters.hs | mit | 221 | 0 | 11 | 40 | 82 | 48 | 34 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
import Control.Lens as Lens
import Data.Aeson as Aeson
import Data.Aeson.Lens as Lens
import Data.Foldable (traverse_)
import Data.Map.Strict as Map
import Data.Text as Text
import Database.SQLite.Simple as Sql
import Network.HTTP.Simple as Http
import ... | nicball/playground | invest/getdata.hs | mit | 1,744 | 0 | 19 | 339 | 582 | 315 | 267 | -1 | -1 |
--
-- GTKTest.hs
-- Sandbox for GTK+ 3 experiments
--
-- Jonatan H Sundqvist
-- January 13 2015
--
-- TODO | - Carmichael numbers
-- -
-- SPEC | -
-- -
-- ghc --make GTKTest.hs -odir bin/ -o bin/GTKTest
import Graphics.UI.Gtk
import Graphics.UI.Gtk.Builder
import Control.Monad.Trans (liftIO)
hell... | SwiftsNamesake/ElegantChess | GTKTest.hs | mit | 2,066 | 2 | 18 | 456 | 585 | 285 | 300 | 56 | 1 |
{- applyinhg Key and copy texture without scaling -}
{-# LANGUAGE OverloadedStrings #-}
module Lesson10 where
--
import qualified SDL
--
import Data.Word (Word8(..))
import Linear.Affine (Point(..))
import Linear.V2 (V2(..))
import Linear.V4 (V4(..))
import Foreign.C.Types (CInt)
--
import Control.Concurrent (threadDel... | jaiyalas/sdl2-examples | src/Lesson10.hs | mit | 2,598 | 0 | 18 | 578 | 725 | 364 | 361 | 57 | 1 |
module Skull ( SkullGame
, SkullInfo(..)
, Log(..)
, initSkullInfo
, command
) where
import Message
import Data.List
import Control.Monad.State
import qualified Data.Map.Strict as Map
import Data.Random.Extras (shuffle)
import Data.Random.RVar (runRVar... | gchelfi/skullbot | Skull.hs | mit | 11,297 | 0 | 21 | 3,303 | 4,353 | 2,174 | 2,179 | 278 | 4 |
{-
H-99 Problems
Copyright 2015 (c) Adrian Nwankwo (Arcaed0x)
Problem : 16
Description : Drop every N'th element from a list.
License : MIT (See LICENSE file)
-}
dropEveryN :: [a] -> Int -> [a]
dropEveryN [] _ = []
dropEveryN lst y = dropOn lst y
where dropOn [] _ = []
dropOn... | Arcaed0x/H-99-Solutions | src/prob16.hs | mit | 438 | 0 | 11 | 169 | 116 | 60 | 56 | 7 | 3 |
import Test.QuickCheck
import Text.Printf
import Control.Applicative
import Control.Monad
import Automaton
import Data.List
import Debug.Trace
tests = [
("DFA Negation", quickCheck propNegateDFA),
("DFA Union", quickCheck propUnionDFA),
("DFA Intersection", quickCheck propIntersectDFA),
("DFA Conca... | banacorn/formal-language | haskell-legacy/test.hs | mit | 15,020 | 0 | 20 | 4,199 | 4,465 | 2,297 | 2,168 | 327 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE QuasiQuotes #-}
module Graphics.Urho3D.Graphics.Geometry(
Geometry
, SharedGeometry
, VectorSharedPtrGeometry
, VectorVectorSharedPtrGeometry
, geometryContext
, geometrySetNumVertexBuffers
, geometrySetVertexBuffer
, geometrySetIndexBuffer
, geomet... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Graphics/Geometry.hs | mit | 20,126 | 0 | 24 | 3,345 | 3,735 | 2,018 | 1,717 | -1 | -1 |
module Purecoin.Network.DataTypes
( NetworkAddress(..)
, InventoryVector(..)
, Version(..)
, GetBlocks(..)
, Inv(..)
, protocolVersion, protocolSubVersion
) where
import Control.Applicative ((<$>), (<*>))
import Data.Word (Word16, Word32, Word64)
import Data.Time (UTCTi... | laanwj/Purecoin | Purecoin/Network/DataTypes.hs | mit | 3,286 | 0 | 15 | 1,253 | 739 | 421 | 318 | 70 | 1 |
module Y2020.M09.D08.Solution where
{--
Yesterday* ...
--}
import Y2020.M09.D01.Solution
{--
*time is so fluid for me, ... it being time, and all ... *rolleyes*
... we build this city ...
... wait: we built this ONTOLOGY of words to novels in the top 100-read
books in gutenberg.
OR. DID. WE?
I concluded that exe... | geophf/1HaskellADay | exercises/HAD/Y2020/M09/D08/Solution.hs | mit | 3,465 | 0 | 11 | 638 | 361 | 211 | 150 | 27 | 1 |
module Day1 (day1, day1', run) where
day1 :: String -> Int
day1 = foldl move 0
move :: Int -> Char -> Int
move x c = case c of
'(' -> x + 1
')' -> x - 1
_ -> x
day1' :: String -> Int
day1' = day1'' 0 0
day1'' :: Int -> Int -> String -> Int
day1'' (-1) index _ = index
day1'' _ ... | brianshourd/adventOfCode2015 | src/Day1.hs | mit | 630 | 0 | 10 | 206 | 269 | 137 | 132 | 21 | 3 |
import Expr
data DefUseE = Def String Expr | Use String
traceMExpr :: [DefUseE] -> [(String, Int)]
| kdungs/coursework-functional-programming | 12/trans.hs | mit | 102 | 0 | 7 | 20 | 41 | 24 | 17 | 3 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Yesod.Default.Main
( defaultMain
, defaultMainLog
, defaultRunner
, defaultDevelApp
, LogFunc
) where
import Yesod.Default.Config
import Network... | wujf/yesod | yesod/Yesod/Default/Main.hs | mit | 4,460 | 0 | 16 | 999 | 921 | 512 | 409 | 85 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric #-}
module Pump.CF.Type where
import Autolib.Size
import Autolib.Hash
import Autolib.Reader
import Autolib.ToDoc
import Data.Typeable
import GHC.Generics
data Zerlegung = Zerlegung
{ u :: String, v :: String
, x :: String, y :: String, z :: ... | marcellussiegburg/autotool | collection/src/Pump/CF/Type.hs | gpl-2.0 | 536 | 2 | 9 | 129 | 146 | 85 | 61 | 16 | 0 |
module Cfg where
import Data.Maybe
import Data.List
import System.Path
import System.Directory
import Language.Haskell.Interpreter
data Cfg = Cfg {files :: [String], views :: [(String,String)]} deriving (Show)
defaultCfg = Cfg {files = [],views=[(".pdf","gv"),(".ps","gv")]} -- (1)
parsedCfg = defaultCfg {files = ["... | zaxtax/hsbib | Cfg.hs | gpl-2.0 | 1,230 | 0 | 11 | 228 | 444 | 236 | 208 | 31 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.